Skip to content

Instantly share code, notes, and snippets.

@Karniej
Created October 1, 2018 19:28
Show Gist options
  • Save Karniej/7253dc8c36d18d1bba9560fea5338a70 to your computer and use it in GitHub Desktop.
Save Karniej/7253dc8c36d18d1bba9560fea5338a70 to your computer and use it in GitHub Desktop.
Detox - React Native E2E Testing
describe('Login credentials', () => {
it('Should write the Login in the text Input', async () => {
await expect(element(by.text('Log In'))).toBeVisible()
await element(by.id('Login')).clearText()
await element(by.id('Login')).typeText('Admin')
})
it('Should write the Password in the text Input', async () => {
await element(by.id('Password')).clearText()
await element(by.id('Password')).typeText('password')
})
it('Should tap on the login button and log in to the app', async () => {
await element(by.text('Log In')).tap()
await expect(element(by.text('React Native Boilerplate'))).toBeVisible()
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment