-
Notifications
You must be signed in to change notification settings - Fork 4
/
App.test.js
33 lines (28 loc) · 798 Bytes
/
App.test.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import wd from 'wd';
import server from './test-config/server';
import capabilities from './test-config/capabilities';
jasmine.DEFAULT_TIMEOUT_INTERVAL = 5 * 60 * 1000;
const driver = wd.promiseChainRemote(server.url, server.port);
describe('App', () => {
beforeAll(async () => {
try {
await driver.init(capabilities);
await driver.sleep(2 * 1000); // wait for app to load
}
catch(error) {
console.error(error);
}
});
afterAll(async () => {
try {
await driver.quit();
}
catch(error) {
console.error(error);
}
});
it('should render correctly', async () => {
expect(await driver.hasElementByAccessibilityId('notthere')).toBe(false);
expect(await driver.hasElementByAccessibilityId('testview')).toBe(true);
});
})