Skip to content

Instantly share code, notes, and snippets.

@xiongemi
Created April 10, 2022 07:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save xiongemi/371fe12b63284d25a9ac99bdb582e4a6 to your computer and use it in GitHub Desktop.
Save xiongemi/371fe12b63284d25a9ac99bdb582e4a6 to your computer and use it in GitHub Desktop.
e2e test template
import { device, element, by, expect } from 'detox';
describe('<your page>', () => {
beforeEach(async () => {
await device.reloadReactNative();
});
it('should ...', async () => {
await waitFor(element(by.id('your page testID')))
.toBeVisible()
.withTimeout(5000);
});
...
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment