-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathtest.js
46 lines (39 loc) · 1.35 KB
/
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
34
35
36
37
38
39
40
41
42
43
44
45
46
gemini.suite('vaadin-confirm-dialog', function(rootSuite) {
function wait(actions, find) {
return actions
.waitForJSCondition(function(window) {
return window.webComponentsAreReady;
}, 80000);
}
function goToAboutBlank(actions, find) {
// Firefox stops responding on socket after a test, workaround:
return actions.executeJS(function(window) {
window.location.href = 'about:blank'; // just go away, please!
});
}
rootSuite
.before(wait)
.after(goToAboutBlank);
['ltr', 'rtl'].forEach(direction => {
['lumo', 'material'].forEach(theme => {
gemini.suite(`default-tests-${theme}-${direction}`, function(suite) {
suite
.setUrl(`default.html?theme=${theme}&dir=${direction}`)
.setCaptureElements('body')
.capture('confirm-dialog');
});
gemini.suite(`three-actions-tests-${theme}-${direction}`, function(suite) {
suite
.setUrl(`three-actions.html?theme=${theme}&dir=${direction}`)
.setCaptureElements('body')
.capture('confirm-dialog');
});
gemini.suite(`custom-buttons-tests-${theme}-${direction}`, function(suite) {
suite
.setUrl(`custom-buttons.html?theme=${theme}&dir=${direction}`)
.setCaptureElements('body')
.capture('confirm-dialog');
});
});
});
});