Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.