Skip to content

Instantly share code, notes, and snippets.

@adam-stasiak
Last active April 26, 2018 11:41
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save adam-stasiak/10e1ae1d93ec96c076bcf1b2b1395127 to your computer and use it in GitHub Desktop.
Save adam-stasiak/10e1ae1d93ec96c076bcf1b2b1395127 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