1
- const Utils = require ( './Utils' ) ;
2
- const Android = require ( './AndroidUtils' ) ;
3
- const TestIDs = require ( '../playground/src/testIDs' ) ;
4
- const includes = require ( 'lodash/includes' ) ;
1
+ import Utils from './Utils' ;
2
+ import Android from './AndroidUtils' ;
3
+ import TestIDs from '../playground/src/testIDs' ;
4
+ import includes from 'lodash/includes' ;
5
5
6
6
const { elementByLabel, elementById, sleep } = Utils ;
7
7
const IS_RELEASE = includes ( process . argv , '--release' ) ;
8
8
const KEY_CODE_R = 46 ;
9
9
10
10
describe ( 'application lifecycle test' , ( ) => {
11
11
beforeEach ( async ( ) => {
12
- await device . relaunchApp ( ) ;
12
+ await device . launchApp ( { newInstance : true } ) ;
13
13
} ) ;
14
14
15
15
it ( 'push a screen to ensure its not there after reload' , async ( ) => {
@@ -26,7 +26,7 @@ describe('application lifecycle test', () => {
26
26
await expect ( elementByLabel ( 'Pushed Screen' ) ) . toBeVisible ( ) ;
27
27
28
28
await device . sendToHome ( ) ;
29
- await device . launchApp ( ) ;
29
+ await device . launchApp ( { newInstance : false } ) ;
30
30
31
31
await expect ( elementByLabel ( 'Pushed Screen' ) ) . toBeVisible ( ) ;
32
32
} ) ;
@@ -38,7 +38,7 @@ describe('application lifecycle test', () => {
38
38
39
39
Android . pressBack ( ) ;
40
40
41
- await device . launchApp ( ) ;
41
+ await device . launchApp ( { newInstance : false } ) ;
42
42
await expect ( elementByLabel ( 'Pushed Screen' ) ) . toBeNotVisible ( ) ;
43
43
} ) ;
44
44
@@ -60,7 +60,7 @@ describe('application lifecycle test', () => {
60
60
61
61
await togglePhonePermission ( ) ;
62
62
await sleep ( 1000 ) ;
63
- await device . launchApp ( ) ;
63
+ await device . launchApp ( { newInstance : false } ) ;
64
64
65
65
await expect ( elementByLabel ( 'Pushed Screen' ) ) . toBeNotVisible ( ) ;
66
66
await expect ( elementById ( TestIDs . WELCOME_SCREEN_HEADER ) ) . toBeVisible ( ) ;
0 commit comments