Skip to content

Instantly share code, notes, and snippets.

@rotemmiz
Last active September 9, 2017 11:32
Show Gist options
  • Save rotemmiz/0d2b36cbaa57dc9b985f88ac741f2ae6 to your computer and use it in GitHub Desktop.
Save rotemmiz/0d2b36cbaa57dc9b985f88ac741f2ae6 to your computer and use it in GitHub Desktop.
Detox.Medium.DetoxSignupExample.js
describe('Login flow', () => {
it('should login successfully', async () => {
  await device.reloadReactNative();
  await expect(element(by.id('email'))).toBeVisible();
  await element(by.id('email')).typeText('[email protected]');
  await element(by.id('password')).typeText('123456');
  await element(by.text('Login')).tap();
  await expect(element(by.text('Welcome'))).toBeVisible();
  await expect(element(by.id('email'))).toNotExist();
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment