Skip to content

Instantly share code, notes, and snippets.

@llaine
Last active August 2, 2017 15:03
Show Gist options
  • Save llaine/f90fcec25cfa1378b162c5fe4b22179d to your computer and use it in GitHub Desktop.
Save llaine/f90fcec25cfa1378b162c5fe4b22179d to your computer and use it in GitHub Desktop.
How to do end-to-end testing with React-Native - easy test.
describe('Employee List', () => {
beforeEach(async () => {
await device.reloadReactNative();
});
it('should be able to search for a specific employee and see his profile', async () => {
await element(by.id('search_bar')).typeText('Amy');
await expect(element(by.id('employee_list_item_AnupGupta'))).toBeNotVisible();
await expect(element(by.id('employee_list_item_AmyTaylor'))).toBeVisible();
await expect(element(by.text('CEO'))).toBeVisible()
await element(by.text('CEO')).multiTap(2)
await expect(element(by.id('employee_details_view'))).toBeVisible()
})
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment