actions-on-google / actions-on-google-testing-nodejs

Apache License 2.0
75 stars 18 forks source link

Avoid cancel when mic closed + update node to v10 #49

Closed adamcohenrose closed 4 years ago

adamcohenrose commented 4 years ago

It appears that AoG has changed how it behaves when given input outside of the action. Previously it would ignore that input and leave the conversation closed. Now it appears to open a new conversation which confuses the tests.

Consequently, always saying "cancel" after every test will cause problems when there are multiple tests in a single file.

This PR detects when the mic is closed and skips saying "cancel" if so.

Another change that appears to have happened to AoG is that the debug_info content is no longer being returned. This means that much of the content (including the previous flag for the microphone being closed!) is no longer available.

This PR grabs the microphone_mode value from the dialog_state_out which is still returned to discover if the mic has been closed.

Additional changes in this PR

Added a prepare lifecycle step to package.json so that the project can be used as a dependency straight from a github branch.

Updated node to v10 and typescript output to ES2017 to match -- node 8 is now deprecated and node 10 is the minimum LTS. Completely understand if you want to do the node update as a separate PR.

googlebot commented 4 years ago

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

adamcohenrose commented 4 years ago

argh - committed with wrong email. moving to https://github.com/actions-on-google/actions-on-google-testing-nodejs/pull/50