Skip to content

Commit b0e622a

Browse files
committed
feat: use dpb action steps
1 parent d219976 commit b0e622a

File tree

8 files changed

+480
-429
lines changed

8 files changed

+480
-429
lines changed

injected/integration-test/type-helpers.mjs

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -73,16 +73,7 @@ export class Build {
7373
*/
7474
static supported(name) {
7575
/** @type {ImportMeta['injectName'][]} */
76-
const items = [
77-
'apple',
78-
'apple-isolated',
79-
'windows',
80-
'integration',
81-
'android',
82-
'android-autofill-import',
83-
'chrome-mv3',
84-
'firefox',
85-
];
76+
const items = ['apple', 'apple-isolated', 'windows', 'integration', 'android', 'android-autofill-import', 'chrome-mv3', 'firefox'];
8677
if (items.includes(name)) {
8778
return name;
8879
}
Lines changed: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,164 @@
1+
{
2+
"actions": [
3+
{
4+
"id": "deselect-all-button-click",
5+
"actionType": "click",
6+
"elements": [
7+
{
8+
"type": "element",
9+
"selector": "div[role=\"tabpanel\"] div:nth-child(2) div:nth-child(2) button"
10+
}
11+
]
12+
},
13+
{
14+
"id": "deselect-all-button-expectation",
15+
"actionType": "expectation",
16+
"expectations": [
17+
{
18+
"type": "element",
19+
"selector": "div[role=\"tabpanel\"] div:nth-child(10) input[type=\"checkbox\"][checked]:not(:checked)"
20+
}
21+
]
22+
},
23+
{
24+
"id": "chrome-section-scroll",
25+
"actionType": "scroll",
26+
"selector": "c-wiz [data-id=\"chrome\"]"
27+
},
28+
{
29+
"id": "chrome-section-select",
30+
"actionType": "click",
31+
"elements": [
32+
{
33+
"type": "element",
34+
"selector": "div[role=\"tabpanel\"] div:nth-child(10) input[type=\"checkbox\"][checked]:not(:checked)"
35+
}
36+
]
37+
},
38+
{
39+
"id": "chrome-data-button-click",
40+
"actionType": "click",
41+
"elements": [
42+
{
43+
"type": "element",
44+
"selector": "div[role=\"tabpanel\"] div:nth-child(10) > div:nth-child(2) > div:nth-child(2) button"
45+
}
46+
]
47+
},
48+
{
49+
"id": "bookmark-modal-expectation",
50+
"actionType": "expectation",
51+
"expectations": [
52+
{
53+
"type": "element",
54+
"selector": "fieldset.rcetic"
55+
}
56+
]
57+
},
58+
{
59+
"id": "bookmark-deselect-all-button-click",
60+
"actionType": "click",
61+
"elements": [
62+
{
63+
"type": "element",
64+
"selector": "fieldset.rcetic div:nth-child(2) button:nth-of-type(2)"
65+
}
66+
]
67+
},
68+
{
69+
"id": "bookmark-checkbox-expectation",
70+
"actionType": "expectation",
71+
"expectations": [
72+
{
73+
"type": "element",
74+
"selector": "fieldset.rcetic div:nth-child(3) > div:nth-of-type(2) input[checked]:not(:checked)"
75+
}
76+
]
77+
},
78+
{
79+
"id": "bookmark-checkbox-click",
80+
"actionType": "click",
81+
"elements": [
82+
{
83+
"type": "element",
84+
"selector": "fieldset.rcetic div:nth-child(3) > div:nth-of-type(2) input[checked]:not(:checked)"
85+
}
86+
]
87+
},
88+
{
89+
"id": "ok-button-expectation",
90+
"actionType": "expectation",
91+
"elements": [
92+
{
93+
"type": "element",
94+
"selector": "div[isfullscreen] div:nth-child(3) div:last-child[aria-disabled=\"false\"]"
95+
}
96+
],
97+
"expectations": [
98+
{
99+
"type": "element",
100+
"selector": "div[isfullscreen] div:nth-child(3) div:last-child[aria-disabled=\"false\"]"
101+
},
102+
{
103+
"type": "element",
104+
"selector": "fieldset.rcetic div:nth-child(3) > div:nth-of-type(2) input[checked]:checked"
105+
}
106+
]
107+
},
108+
{
109+
"id": "ok-button-click",
110+
"actionType": "click",
111+
"elements": [
112+
{
113+
"type": "element",
114+
"selector": "div[isfullscreen] div:nth-child(3) div:last-child[aria-disabled=\"false\"]"
115+
}
116+
]
117+
},
118+
{
119+
"id": "next-step-button-scroll",
120+
"actionType": "scroll",
121+
"elements": [
122+
{
123+
"type": "element",
124+
"selector": "div[role=\"tabpanel\"] > div:nth-child(1) > div:nth-child(2) button"
125+
}
126+
]
127+
},
128+
{
129+
"id": "next-step-button-click",
130+
"actionType": "click",
131+
"elements": [
132+
{
133+
"type": "element",
134+
"selector": "div[role=\"tabpanel\"] > div:nth-child(1) > div:nth-child(2) button"
135+
}
136+
]
137+
},
138+
{
139+
"id": "create-export-button-scroll",
140+
"actionType": "scroll",
141+
"selector": "div[data-configure-step=\"1\"] button"
142+
},
143+
{
144+
"id": "create-export-button-click",
145+
"actionType": "click",
146+
"elements": [
147+
{
148+
"type": "element",
149+
"selector": "div[data-configure-step=\"1\"] button"
150+
}
151+
]
152+
},
153+
{
154+
"id": "manage-button-click",
155+
"actionType": "click",
156+
"elements": [
157+
{
158+
"type": "element",
159+
"selector": "a[href=\"manage\"]"
160+
}
161+
]
162+
}
163+
]
164+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"selectors": {
3+
"tabPanel": "div[role=\"tabpanel\"]",
4+
"deselectAllButton": "div[role=\"tabpanel\"] div:nth-child(2) div:nth-child(2) button",
5+
"bookmarkModal": "fieldset.rcetic",
6+
"bookmarkSelectButton": "fieldset.rcetic input",
7+
"bookmarkDeselectAllButton": "fieldset.rcetic div:nth-child(2) button:nth-of-type(2)",
8+
"chromeInputCheckbox": "div[role=\"tabpanel\"] div:nth-child(10) input[type=\"checkbox\"]",
9+
"chromeSection": "c-wiz [data-id=\"chrome\"]",
10+
"chromeDataButton": "div[role=\"tabpanel\"] div:nth-child(10) > div:nth-child(2) > div:nth-child(2) button",
11+
"nextStepButton": "div[role=\"tabpanel\"] > div:nth-child(1) > div:nth-child(2) button",
12+
"createExportButton": "div[data-configure-step=\"1\"] button",
13+
"inputCheckbox": "div[role=\"tabpanel\"] input[type=\"checkbox\"]",
14+
"okButton": "div[isfullscreen] div:nth-child(3) div:last-child[aria-disabled=\"false\"]",
15+
"bookmarkCheckbox": "fieldset.rcetic div:nth-child(3) > div:nth-of-type(2) input[checked]:not(:checked)",
16+
"bookmarkCheckboxChecked": "fieldset.rcetic div:nth-child(3) > div:nth-of-type(2) input[checked]:checked",
17+
"manageButton": "a[href=\"manage\"]",
18+
"chromeInputCheckboxUnchecked": "div[role=\"tabpanel\"] div:nth-child(10) input[type=\"checkbox\"][checked]:not(:checked)"
19+
}
20+
}

0 commit comments

Comments
 (0)