Created
November 22, 2018 10:17
-
-
Save barsumek/64c1095c9529ad6562902f360a3f61fe to your computer and use it in GitHub Desktop.
Detox your GraphQL: Pokemon Screen test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// /* 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