1 | const ACTION_DELAY = 25;
|
2 |
|
3 | function testFall(url) {
|
4 | return (browser) => {
|
5 | console.log(url);
|
6 | try {
|
7 | browser
|
8 | .url(url)
|
9 | .pause(ACTION_DELAY)
|
10 | .waitForElementVisible('h1')
|
11 | .pause(ACTION_DELAY)
|
12 | .click('#edit-0')
|
13 | .pause(ACTION_DELAY)
|
14 | .clearValue('#edit_title')
|
15 | .pause(ACTION_DELAY)
|
16 | .setValue('#edit_title', 'Baum')
|
17 | .pause(ACTION_DELAY)
|
18 | .click('#submit')
|
19 | .pause(ACTION_DELAY)
|
20 | .click('#add')
|
21 | .pause(ACTION_DELAY)
|
22 | .setValue('#new_title', 'Äpfel')
|
23 | .pause(ACTION_DELAY)
|
24 | .setValue('#new_unit', 'Pack')
|
25 | .pause(ACTION_DELAY)
|
26 | .click('#submit')
|
27 | .pause(ACTION_DELAY)
|
28 | .click('#edit-0')
|
29 | .pause(ACTION_DELAY)
|
30 | .click('#delete')
|
31 | .pause(ACTION_DELAY)
|
32 | .click('#edit-1')
|
33 | .pause(ACTION_DELAY)
|
34 | .click('#delete')
|
35 | .pause(ACTION_DELAY)
|
36 | .click('#edit-2')
|
37 | .pause(ACTION_DELAY)
|
38 | .click('#delete')
|
39 | .pause(ACTION_DELAY)
|
40 | .click('#start')
|
41 | .pause(ACTION_DELAY)
|
42 | .end();
|
43 | } catch (e) {}
|
44 | };
|
45 | }
|
46 |
|
47 | const tests = {};
|
48 | ['https://github.modevel.de/poc/preact.html'].forEach((url) => {
|
49 | tests[url] = testFall(url);
|
50 | });
|
51 | module.exports = tests;
|