Created
February 22, 2018 00:01
-
-
Save rotemmiz/f61665a8714dedd61fa2f8b2511ebb18 to your computer and use it in GitHub Desktop.
Detox: A Year in. Building It, Testing With It
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
describe('Login', () => { | |
const server = new MockServer(); | |
beforeEach(async () => { | |
await server.start(); | |
}); | |
afterEach(async () => { | |
await server.stop(); | |
}); | |
it('should login and persist login after restart', async () => { | |
server.forUser(server.testUserId()).withBusinesses(1); | |
await device.launchApp({delete: true, permissions: {notifications: 'YES'}}); | |
await element(by.text('Log In TestUser1')).tap(); | |
await expect(element(by.text('feed.FeedScreen'))).toBeVisible(); | |
await device.launchApp({newInstance: true}); | |
await expect(element(by.text('feed.FeedScreen'))).toBeVisible(); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment