Skip to content
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

Testing exit app scenario #1544

Closed
sdvig opened this issue Jul 21, 2019 · 1 comment
Closed

Testing exit app scenario #1544

sdvig opened this issue Jul 21, 2019 · 1 comment

Comments

@sdvig
Copy link

sdvig commented Jul 21, 2019

This questions was already raised before, but left without answer in the issue.
What is recommended way to test the current scenario, when on a click of the button there is a
BackHandler.exitApp() event.
I tried to test like this:

await element(by.id('licenseCancelButton')).tap();
await expect(element(by.id('licensePage'))).toBeNotVisible();

But I get this error:

Error: No activities found. Did you forget to launch the activity by calling getActivity() or startActivitySync or similar?
      at Client.execute (node_modules/detox/src/client/Client.js:92:28)
      at InvocationManager.execute (node_modules/detox/src/invoke.js:11:33)
      at WaitForInteraction.execute (node_modules/detox/src/android/expect.js:128:35)
      at WaitForInteraction.withTimeout (node_modules/detox/src/android/expect.js:161:16)
      at Context.it (e2e/firstTest.spec.js:8:69)
      at process._tickCallback (internal/process/next_tick.js:68:7)

Thank you very much in advance!

@support
Copy link

support bot commented Jul 21, 2019

We use the issue tracker exclusively for bug reports and feature requests. This issue appears to be a general usage or support question. Instead, please ask a question on Stack Overflow with the detox tag.

Feel free to post your Stack Overflow question here for more visility. We'll take a look at it.

For more information on bots in this reporsitory, read this discussion.

@support support bot closed this as completed Jul 21, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jul 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant