-
Notifications
You must be signed in to change notification settings - Fork 857
/
Copy pathprogressButtons.js
51 lines (49 loc) · 1.09 KB
/
progressButtons.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
47
48
49
50
51
import { frameworks, initSurvey, url } from "../helper";
import { Selector, fixture, test } from "testcafe";
const title = "progressButtons";
const json = {
pages: [
{
name: "page1",
elements: [
{
type: "text",
name: "question1"
}
]
},
{
name: "page2",
elements: [
{
type: "text",
name: "question2"
}
]
},
{
name: "page3",
elements: [
{
type: "text",
name: "question3"
}
]
}
],
showProgressBar: "top",
progressBarType: "buttons"
};
frameworks.forEach((framework) => {
fixture`${framework} ${title}`
.page`${url}${framework}`.beforeEach(async (t) => {
await initSurvey(framework, json);
});
test("check progress buttons", async (t) => {
await t.hover(Selector("[data-name='question1']"));
await t.click(Selector("[title='page3']"));
await t.hover(Selector("[data-name='question3']"));
await t.click(Selector("[title='page2']"));
await t.hover(Selector("[data-name='question2']"));
});
});