-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathonboarding.ts
More file actions
29 lines (24 loc) · 1.07 KB
/
onboarding.ts
File metadata and controls
29 lines (24 loc) · 1.07 KB
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
import moment from 'moment';
/**
* This is a sample script that interacts with the Wikipedia app
* and searches for the article about today's date
*/
describe('Wikipedia Android - Onboarding', () => {
it('goes through onboarding', async () => {
await driver.log('Going through onboarding screens', {}, 'info');
await driver.tapElement('text', 'CONTINUE');
await driver.screenshot(`android/screenshot-onboarding.png`);
await driver.tapElement('text', 'CONTINUE');
await driver.tapElement('text', 'CONTINUE');
await driver.tapElement('text', 'GET STARTED');
});
it("Search today's date", async () => {
const today = moment().format('MMMM Do');
await driver.tapElement('text', 'Search Wikipedia');
await driver.log(`Will search for today's date`, { date: today }, 'info');
await driver.typeInElement('text', 'Search Wikipedia', today);
await driver.tapElement('text', 'Day of the year');
await driver.waitForElement('text', 'Day of the year', 10_000, 500, true);
await driver.screenshot(`android/screenshot-today.png`);
});
});