Skip to content

Instantly share code, notes, and snippets.

@barsumek
Created November 22, 2018 10:17
Show Gist options
  • Save barsumek/64c1095c9529ad6562902f360a3f61fe to your computer and use it in GitHub Desktop.
Save barsumek/64c1095c9529ad6562902f360a3f61fe to your computer and use it in GitHub Desktop.
Detox your GraphQL: Pokemon Screen test
// /* eslint-env detox/detox, mocha */
describe("Test Pokemon screen", () => {
beforeEach(async () => {
await device.reloadReactNative();
});
it("Display MaxLvl if the pokemon has maximum level.", async () => {
await expect(element(by.id("pokemonButton"))).toBeVisible();
await element(by.id("pokemonButton")).tap();
await expect(element(by.text("Level: MaxLvl"))).toBeVisible();
});
it("Display level if the pokemon does not have maximum level.", async () => {
await expect(element(by.id("pokemonButton"))).toBeVisible();
await element(by.id("pokemonButton")).tap();
await expect(element(by.text("Level: 10"))).toBeVisible();
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment