Skip to content

Instantly share code, notes, and snippets.

@Karniej
Created October 1, 2018 19:26
Show Gist options
  • Save Karniej/b3f3ee284d68c39d225bd344f428d8fa to your computer and use it in GitHub Desktop.
Save Karniej/b3f3ee284d68c39d225bd344f428d8fa to your computer and use it in GitHub Desktop.
Detox - React Native E2E Testing
describe('Go through the app', () => {
it('should Go to the Second Screen ', async () => {
await expect(element(by.text('Log In'))).toBeVisible()
await element(by.text('Log In')).tap()
await expect(element(by.text('Second Screen'))).toBeVisible()
await element(by.text('Second Screen')).tap()
})
it('should tap on a filter', async () => {
await expect(element(by.text('Filter Label'))).toBeVisible()
await element(by.text('Filter Label')).tap()
})
it('Should choose an option from filter', async () => {
await element(by.text('Tomato')).tap()
})
it('Should Go to the Third Screen', async () => {
await element(by.text('Third Screen')).tap()
})
it('Should Log out and go back to the Log In screen', async () => {
await element(by.text('Log Out')).tap()
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment