Skip to content

Instantly share code, notes, and snippets.

@mfrachet
Last active August 22, 2017 11:50
Show Gist options
  • Save mfrachet/4813cae1886264ba3c93ed633837834a to your computer and use it in GitHub Desktop.
Save mfrachet/4813cae1886264ba3c93ed633837834a to your computer and use it in GitHub Desktop.
detox-assertion
describe('Handle changes on input text', () => {
it('should have displayed the Add button when a text is filled in the input', async () => {
const itemAdder = await element(by.id('inputAdder'));
const touchableAdder = await element(by.id('touchableAdder'));
// Check that it's not visible before typing text
await expect(touchableAdder).toBeNotVisible();
// Focus the input field
await itemAdder.tap();
await itemAdder.typeText('Item');
// Check that it's visible after typing text
await expect(touchableAdder).toBeVisible();
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment