UNPKG

1.65 kBJavaScriptView Raw
1const ACTION_DELAY = 250;
2
3function 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
47const tests = {};
48[
49 'https://github.modevel.de/poc/angular.html',
50 'https://github.modevel.de/poc/angularjs.html',
51 'https://github.modevel.de/poc/aurelia.html',
52 'https://github.modevel.de/poc/inferno.html',
53 'https://github.modevel.de/poc/react.html',
54 'https://github.modevel.de/poc/preact.html',
55 'https://github.modevel.de/poc/svelte.html',
56 'https://github.modevel.de/poc/preact.html',
57].forEach((url) => {
58 tests[url] = testFall(url);
59});
60module.exports = tests;