-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support testing APLA directives #20
Comments
Can you provide details on the use case or show a piece of sample code? That would make it easier to follow. |
You can test it adding this piece of code on the file lambda/test.js in the project https://github.com/xavidop/alexa-skill-pokedex describe('LaunchRequest', function() {
alexaTest.test([
{
request: new test.LaunchRequestBuilder(skillSettings).build(),
saysLike: i18n.t('WELCOME_MSG'), repromptsNothing: false, shouldEndSession: false,
},
]);
}); |
@hoegertn
Or we can create a new validator altogether: APLAValidator.ts What do you think? Here is an APL-A snippet in case you want to read through. |
Hello team! any updates of the PR? Xavi |
Was just trying this out and it's a nice start in that it helps me assert that the response includes the expected document and data source. But...and I know that I'm asking for a big thing here...permit me to think aloud... It would be AMAZING if I could write the test to render the APL-A document into text and then compare that to expected text. Something like this:
Of course, the rendered APL-A could include sound files, so...I'd think that the best that could be done is to render the "Speech" elements into flat text...maybe including audio in the resulting text as something like "[audio 'soundbank://soundlibrary/water/nature/nature_08']" so that it can also be checked for from the expected response. What's missing here is that APL-A renderer. Does such a thing already exist (ideally as a module that can be imported and used easily here)? If not...I wonder how difficult it would be to create such a renderer. (APL-A is relatively simple as compared to APL, but it still could get tricky I suppose. The |
Happy to look into this if you can provide a PR. Currently, I don't have the bandwidth to implement this. |
Description
It is important to support APLA Documents. I saw that you are supporting APL documents.
Steps to Reproduce
Test a resquest of an intent with an APLA directive
Expected behavior: work with APLA documents
Actual behavior: It does not work
Environment
NodeJS-Version: Node.js 10.x
OS: Windows 10
The text was updated successfully, but these errors were encountered: