Skip to content

Instantly share code, notes, and snippets.

@ddikodroid
Forked from xiongemi/e2e.spec.ts
Created November 14, 2022 06:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ddikodroid/46cb9dd8f74bdba8cb42027841ed01df to your computer and use it in GitHub Desktop.
Save ddikodroid/46cb9dd8f74bdba8cb42027841ed01df 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