forked from italia/18app
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from Roma-JS/feature/detox
Implement detox as e2e test runner on iOS
- Loading branch information
Showing
10 changed files
with
85 additions
and
6 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
node_modules/ | ||
.expo/ | ||
npm-debug.* | ||
bin |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
const {reloadApp} = require('detox-expo-helpers'); | ||
|
||
describe('Drawer', () => { | ||
before(async () => { | ||
await reloadApp(); | ||
}); | ||
|
||
it('should show drawer component after profile tap', async () => { | ||
await element(by.id('login-spid')).tap(); | ||
await waitFor(element(by.id('home-screen'))) | ||
.toBeVisible() | ||
.withTimeout(2000); | ||
await element(by.id('header-profile-button')) | ||
.atIndex(0) | ||
.tap(); | ||
|
||
await waitFor(element(by.id('drawer'))) | ||
.toBeVisible() | ||
.withTimeout(2000); | ||
|
||
await expect(element(by.id('drawer'))).toBeVisible(); | ||
}); | ||
}); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
require('babel-polyfill'); | ||
const detox = require('detox'); | ||
const config = require('../package.json').detox; | ||
|
||
before(async () => { | ||
await detox.init(config); | ||
}); | ||
|
||
after(async () => { | ||
await detox.cleanup(); | ||
}); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
const {reloadApp} = require('detox-expo-helpers'); | ||
|
||
describe('Login screen', () => { | ||
before(async () => { | ||
await reloadApp(); | ||
}); | ||
|
||
it('should be shown as first screen', async () => { | ||
await expect(element(by.id('login-screen'))).toBeVisible(); | ||
}); | ||
|
||
it('should have a login-spid button', async () => { | ||
await expect(element(by.id('login-spid'))).toBeVisible(); | ||
}); | ||
|
||
it('should be replaced by home-screen when login-spid is tapped', async () => { | ||
await element(by.id('login-spid')).tap(); | ||
await waitFor(element(by.id('home-screen'))) | ||
.toBeVisible() | ||
.withTimeout(2000); | ||
|
||
await expect(element(by.id('home-screen')).atIndex(0)).toBeVisible(); | ||
await expect(element(by.id('drawer'))).toBeNotVisible(); | ||
}); | ||
}); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
--recursive --timeout 1200000 --bail |
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
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
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
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
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