Skip to content

Instantly share code, notes, and snippets.

@eldorplus
Forked from adam-stasiak/firstTest.spec.js
Created April 26, 2018 11:41
Show Gist options
  • Save eldorplus/2d5089f395e51dae428baab4b2fd8f66 to your computer and use it in GitHub Desktop.
Save eldorplus/2d5089f395e51dae428baab4b2fd8f66 to your computer and use it in GitHub Desktop.
describe('Example', () => {
beforeEach(async () => {
await device.reloadReactNative();
await waitFor(element(by.id('ButtonText'))).toBeVisible().withTimeout(10000);
});
it('should Press me text be displayed', async () => {
await waitFor(element(by.text("Press Me"))).toBeVisible().withTimeout(100);
});
it('should ButtonText id be displayed', async () => {
await expect(element(by.id('ButtonText'))).toBeVisible();
});
it('should Polidea logo be displayed after click on button', async () => {
await element(by.id('ButtonText')).tap();
await waitFor(element(by.id('ButtonImage'))).toBeVisible().withTimeout(2000);
});
it ('should Press me text be morphed in Polidea title after click on button',async () =>{
await element(by.id('ButtonText')).tap();
await waitFor(element(by.text("Press Me"))).toNotExist().withTimeout(2000);
await waitFor(element(by.text("Polidea"))).toBeVisible().withTimeout(100);
});
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment