aria-ease 6.0.0 → 6.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/cli.cjs +21 -8
- package/bin/cli.js +1 -1
- package/bin/{contractTestRunnerPlaywright-PMSOP5FY.js → contractTestRunnerPlaywright-HL2VPEEV.js} +21 -8
- package/bin/{test-X6K2LCMO.js → test-HH2EW2NM.js} +1 -1
- package/dist/{contractTestRunnerPlaywright-ZO6GM4TU.js → contractTestRunnerPlaywright-EXEBWWPC.js} +21 -8
- package/dist/index.cjs +21 -8
- package/dist/index.js +1 -1
- package/dist/src/utils/test/{contractTestRunnerPlaywright-CREJNINL.js → contractTestRunnerPlaywright-LJHY3AB4.js} +21 -8
- package/dist/src/utils/test/index.cjs +21 -8
- package/dist/src/utils/test/index.js +1 -1
- package/package.json +1 -1
package/bin/cli.cjs
CHANGED
|
@@ -676,7 +676,6 @@ async function runContractTestsPlaywright(componentName, url) {
|
|
|
676
676
|
const passes = [];
|
|
677
677
|
const skipped = [];
|
|
678
678
|
let page = null;
|
|
679
|
-
const useNavigation = !!url;
|
|
680
679
|
try {
|
|
681
680
|
page = await createTestPage();
|
|
682
681
|
if (url) {
|
|
@@ -690,8 +689,7 @@ async function runContractTestsPlaywright(componentName, url) {
|
|
|
690
689
|
if (!mainSelector) {
|
|
691
690
|
throw new Error(`No main selector (trigger, input, or container) found in contract for ${componentName}`);
|
|
692
691
|
}
|
|
693
|
-
|
|
694
|
-
await page.locator(mainSelector).first().waitFor({ state: "attached", timeout: elementTimeout });
|
|
692
|
+
await page.locator(mainSelector).first().waitFor({ state: "attached", timeout: 3e4 });
|
|
695
693
|
if (componentName === "menu" && componentContract.selectors.trigger) {
|
|
696
694
|
await page.locator(componentContract.selectors.trigger).first().waitFor({
|
|
697
695
|
state: "visible",
|
|
@@ -802,15 +800,13 @@ async function runContractTestsPlaywright(componentName, url) {
|
|
|
802
800
|
menuClosed = await (0, test_exports.expect)(popupElement).toBeHidden({ timeout: 2e3 }).then(() => true).catch(() => false);
|
|
803
801
|
}
|
|
804
802
|
if (!menuClosed) {
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
`\u274C FATAL: Cannot close menu between tests. Menu remains visible after trying:
|
|
803
|
+
throw new Error(
|
|
804
|
+
`\u274C FATAL: Cannot close menu between tests. Menu remains visible after trying:
|
|
808
805
|
1. Escape key
|
|
809
806
|
2. Clicking trigger
|
|
810
807
|
3. Clicking outside
|
|
811
808
|
This indicates a problem with the menu component's close functionality.`
|
|
812
|
-
|
|
813
|
-
}
|
|
809
|
+
);
|
|
814
810
|
}
|
|
815
811
|
if (componentContract.selectors.input) {
|
|
816
812
|
await page.locator(componentContract.selectors.input).first().clear();
|
|
@@ -821,6 +817,23 @@ This indicates a problem with the menu component's close functionality.`
|
|
|
821
817
|
}
|
|
822
818
|
}
|
|
823
819
|
}
|
|
820
|
+
if (componentContract.selectors.panel && componentContract.selectors.trigger && !componentContract.selectors.popup) {
|
|
821
|
+
const triggerSelector = componentContract.selectors.trigger;
|
|
822
|
+
const panelSelector = componentContract.selectors.panel;
|
|
823
|
+
if (triggerSelector && panelSelector) {
|
|
824
|
+
const allTriggers = await page.locator(triggerSelector).all();
|
|
825
|
+
for (const trigger of allTriggers) {
|
|
826
|
+
const isExpanded = await trigger.getAttribute("aria-expanded") === "true";
|
|
827
|
+
const triggerPanel = await trigger.getAttribute("aria-controls");
|
|
828
|
+
if (isExpanded && triggerPanel) {
|
|
829
|
+
await trigger.click();
|
|
830
|
+
const panel = page.locator(`#${triggerPanel}`);
|
|
831
|
+
await (0, test_exports.expect)(panel).toBeHidden({ timeout: 1e3 }).catch(() => {
|
|
832
|
+
});
|
|
833
|
+
}
|
|
834
|
+
}
|
|
835
|
+
}
|
|
836
|
+
}
|
|
824
837
|
let shouldSkipTest = false;
|
|
825
838
|
for (const act of action) {
|
|
826
839
|
if (act.type === "keypress" && (act.target === "submenuTrigger" || act.target === "submenu")) {
|
package/bin/cli.js
CHANGED
|
@@ -204,7 +204,7 @@ program.command("audit").description("Run axe-core powered accessibility audit o
|
|
|
204
204
|
console.log(chalk.green("\n\u{1F389} All audits completed."));
|
|
205
205
|
});
|
|
206
206
|
program.command("test").description("Run core a11y accessibility standard tests on UI components").action(async () => {
|
|
207
|
-
const { runTest } = await import("./test-
|
|
207
|
+
const { runTest } = await import("./test-HH2EW2NM.js");
|
|
208
208
|
runTest();
|
|
209
209
|
});
|
|
210
210
|
program.command("help").description("Display help information").action(() => {
|
package/bin/{contractTestRunnerPlaywright-PMSOP5FY.js → contractTestRunnerPlaywright-HL2VPEEV.js}
RENAMED
|
@@ -36,7 +36,6 @@ async function runContractTestsPlaywright(componentName, url) {
|
|
|
36
36
|
const passes = [];
|
|
37
37
|
const skipped = [];
|
|
38
38
|
let page = null;
|
|
39
|
-
const useNavigation = !!url;
|
|
40
39
|
try {
|
|
41
40
|
page = await createTestPage();
|
|
42
41
|
if (url) {
|
|
@@ -50,8 +49,7 @@ async function runContractTestsPlaywright(componentName, url) {
|
|
|
50
49
|
if (!mainSelector) {
|
|
51
50
|
throw new Error(`No main selector (trigger, input, or container) found in contract for ${componentName}`);
|
|
52
51
|
}
|
|
53
|
-
|
|
54
|
-
await page.locator(mainSelector).first().waitFor({ state: "attached", timeout: elementTimeout });
|
|
52
|
+
await page.locator(mainSelector).first().waitFor({ state: "attached", timeout: 3e4 });
|
|
55
53
|
if (componentName === "menu" && componentContract.selectors.trigger) {
|
|
56
54
|
await page.locator(componentContract.selectors.trigger).first().waitFor({
|
|
57
55
|
state: "visible",
|
|
@@ -162,15 +160,13 @@ async function runContractTestsPlaywright(componentName, url) {
|
|
|
162
160
|
menuClosed = await (0, test_exports.expect)(popupElement).toBeHidden({ timeout: 2e3 }).then(() => true).catch(() => false);
|
|
163
161
|
}
|
|
164
162
|
if (!menuClosed) {
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
`\u274C FATAL: Cannot close menu between tests. Menu remains visible after trying:
|
|
163
|
+
throw new Error(
|
|
164
|
+
`\u274C FATAL: Cannot close menu between tests. Menu remains visible after trying:
|
|
168
165
|
1. Escape key
|
|
169
166
|
2. Clicking trigger
|
|
170
167
|
3. Clicking outside
|
|
171
168
|
This indicates a problem with the menu component's close functionality.`
|
|
172
|
-
|
|
173
|
-
}
|
|
169
|
+
);
|
|
174
170
|
}
|
|
175
171
|
if (componentContract.selectors.input) {
|
|
176
172
|
await page.locator(componentContract.selectors.input).first().clear();
|
|
@@ -181,6 +177,23 @@ This indicates a problem with the menu component's close functionality.`
|
|
|
181
177
|
}
|
|
182
178
|
}
|
|
183
179
|
}
|
|
180
|
+
if (componentContract.selectors.panel && componentContract.selectors.trigger && !componentContract.selectors.popup) {
|
|
181
|
+
const triggerSelector = componentContract.selectors.trigger;
|
|
182
|
+
const panelSelector = componentContract.selectors.panel;
|
|
183
|
+
if (triggerSelector && panelSelector) {
|
|
184
|
+
const allTriggers = await page.locator(triggerSelector).all();
|
|
185
|
+
for (const trigger of allTriggers) {
|
|
186
|
+
const isExpanded = await trigger.getAttribute("aria-expanded") === "true";
|
|
187
|
+
const triggerPanel = await trigger.getAttribute("aria-controls");
|
|
188
|
+
if (isExpanded && triggerPanel) {
|
|
189
|
+
await trigger.click();
|
|
190
|
+
const panel = page.locator(`#${triggerPanel}`);
|
|
191
|
+
await (0, test_exports.expect)(panel).toBeHidden({ timeout: 1e3 }).catch(() => {
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
184
197
|
let shouldSkipTest = false;
|
|
185
198
|
for (const act of action) {
|
|
186
199
|
if (act.type === "keypress" && (act.target === "submenuTrigger" || act.target === "submenu")) {
|
|
@@ -114,7 +114,7 @@ Error: ${error instanceof Error ? error.message : String(error)}`
|
|
|
114
114
|
const devServerUrl = await checkDevServer(url);
|
|
115
115
|
if (devServerUrl) {
|
|
116
116
|
console.log(`\u{1F3AD} Running Playwright tests on ${devServerUrl}`);
|
|
117
|
-
const { runContractTestsPlaywright } = await import("./contractTestRunnerPlaywright-
|
|
117
|
+
const { runContractTestsPlaywright } = await import("./contractTestRunnerPlaywright-HL2VPEEV.js");
|
|
118
118
|
contract = await runContractTestsPlaywright(componentName, devServerUrl);
|
|
119
119
|
} else {
|
|
120
120
|
throw new Error(
|
package/dist/{contractTestRunnerPlaywright-ZO6GM4TU.js → contractTestRunnerPlaywright-EXEBWWPC.js}
RENAMED
|
@@ -34,7 +34,6 @@ async function runContractTestsPlaywright(componentName, url) {
|
|
|
34
34
|
const passes = [];
|
|
35
35
|
const skipped = [];
|
|
36
36
|
let page = null;
|
|
37
|
-
const useNavigation = !!url;
|
|
38
37
|
try {
|
|
39
38
|
page = await createTestPage();
|
|
40
39
|
if (url) {
|
|
@@ -48,8 +47,7 @@ async function runContractTestsPlaywright(componentName, url) {
|
|
|
48
47
|
if (!mainSelector) {
|
|
49
48
|
throw new Error(`No main selector (trigger, input, or container) found in contract for ${componentName}`);
|
|
50
49
|
}
|
|
51
|
-
|
|
52
|
-
await page.locator(mainSelector).first().waitFor({ state: "attached", timeout: elementTimeout });
|
|
50
|
+
await page.locator(mainSelector).first().waitFor({ state: "attached", timeout: 3e4 });
|
|
53
51
|
if (componentName === "menu" && componentContract.selectors.trigger) {
|
|
54
52
|
await page.locator(componentContract.selectors.trigger).first().waitFor({
|
|
55
53
|
state: "visible",
|
|
@@ -160,15 +158,13 @@ async function runContractTestsPlaywright(componentName, url) {
|
|
|
160
158
|
menuClosed = await (0, test_exports.expect)(popupElement).toBeHidden({ timeout: 2e3 }).then(() => true).catch(() => false);
|
|
161
159
|
}
|
|
162
160
|
if (!menuClosed) {
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
`\u274C FATAL: Cannot close menu between tests. Menu remains visible after trying:
|
|
161
|
+
throw new Error(
|
|
162
|
+
`\u274C FATAL: Cannot close menu between tests. Menu remains visible after trying:
|
|
166
163
|
1. Escape key
|
|
167
164
|
2. Clicking trigger
|
|
168
165
|
3. Clicking outside
|
|
169
166
|
This indicates a problem with the menu component's close functionality.`
|
|
170
|
-
|
|
171
|
-
}
|
|
167
|
+
);
|
|
172
168
|
}
|
|
173
169
|
if (componentContract.selectors.input) {
|
|
174
170
|
await page.locator(componentContract.selectors.input).first().clear();
|
|
@@ -179,6 +175,23 @@ This indicates a problem with the menu component's close functionality.`
|
|
|
179
175
|
}
|
|
180
176
|
}
|
|
181
177
|
}
|
|
178
|
+
if (componentContract.selectors.panel && componentContract.selectors.trigger && !componentContract.selectors.popup) {
|
|
179
|
+
const triggerSelector = componentContract.selectors.trigger;
|
|
180
|
+
const panelSelector = componentContract.selectors.panel;
|
|
181
|
+
if (triggerSelector && panelSelector) {
|
|
182
|
+
const allTriggers = await page.locator(triggerSelector).all();
|
|
183
|
+
for (const trigger of allTriggers) {
|
|
184
|
+
const isExpanded = await trigger.getAttribute("aria-expanded") === "true";
|
|
185
|
+
const triggerPanel = await trigger.getAttribute("aria-controls");
|
|
186
|
+
if (isExpanded && triggerPanel) {
|
|
187
|
+
await trigger.click();
|
|
188
|
+
const panel = page.locator(`#${triggerPanel}`);
|
|
189
|
+
await (0, test_exports.expect)(panel).toBeHidden({ timeout: 1e3 }).catch(() => {
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
182
195
|
let shouldSkipTest = false;
|
|
183
196
|
for (const act of action) {
|
|
184
197
|
if (act.type === "keypress" && (act.target === "submenuTrigger" || act.target === "submenu")) {
|
package/dist/index.cjs
CHANGED
|
@@ -365,7 +365,6 @@ async function runContractTestsPlaywright(componentName, url) {
|
|
|
365
365
|
const passes = [];
|
|
366
366
|
const skipped = [];
|
|
367
367
|
let page = null;
|
|
368
|
-
const useNavigation = !!url;
|
|
369
368
|
try {
|
|
370
369
|
page = await createTestPage();
|
|
371
370
|
if (url) {
|
|
@@ -379,8 +378,7 @@ async function runContractTestsPlaywright(componentName, url) {
|
|
|
379
378
|
if (!mainSelector) {
|
|
380
379
|
throw new Error(`No main selector (trigger, input, or container) found in contract for ${componentName}`);
|
|
381
380
|
}
|
|
382
|
-
|
|
383
|
-
await page.locator(mainSelector).first().waitFor({ state: "attached", timeout: elementTimeout });
|
|
381
|
+
await page.locator(mainSelector).first().waitFor({ state: "attached", timeout: 3e4 });
|
|
384
382
|
if (componentName === "menu" && componentContract.selectors.trigger) {
|
|
385
383
|
await page.locator(componentContract.selectors.trigger).first().waitFor({
|
|
386
384
|
state: "visible",
|
|
@@ -491,15 +489,13 @@ async function runContractTestsPlaywright(componentName, url) {
|
|
|
491
489
|
menuClosed = await (0, test_exports.expect)(popupElement).toBeHidden({ timeout: 2e3 }).then(() => true).catch(() => false);
|
|
492
490
|
}
|
|
493
491
|
if (!menuClosed) {
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
`\u274C FATAL: Cannot close menu between tests. Menu remains visible after trying:
|
|
492
|
+
throw new Error(
|
|
493
|
+
`\u274C FATAL: Cannot close menu between tests. Menu remains visible after trying:
|
|
497
494
|
1. Escape key
|
|
498
495
|
2. Clicking trigger
|
|
499
496
|
3. Clicking outside
|
|
500
497
|
This indicates a problem with the menu component's close functionality.`
|
|
501
|
-
|
|
502
|
-
}
|
|
498
|
+
);
|
|
503
499
|
}
|
|
504
500
|
if (componentContract.selectors.input) {
|
|
505
501
|
await page.locator(componentContract.selectors.input).first().clear();
|
|
@@ -510,6 +506,23 @@ This indicates a problem with the menu component's close functionality.`
|
|
|
510
506
|
}
|
|
511
507
|
}
|
|
512
508
|
}
|
|
509
|
+
if (componentContract.selectors.panel && componentContract.selectors.trigger && !componentContract.selectors.popup) {
|
|
510
|
+
const triggerSelector = componentContract.selectors.trigger;
|
|
511
|
+
const panelSelector = componentContract.selectors.panel;
|
|
512
|
+
if (triggerSelector && panelSelector) {
|
|
513
|
+
const allTriggers = await page.locator(triggerSelector).all();
|
|
514
|
+
for (const trigger of allTriggers) {
|
|
515
|
+
const isExpanded = await trigger.getAttribute("aria-expanded") === "true";
|
|
516
|
+
const triggerPanel = await trigger.getAttribute("aria-controls");
|
|
517
|
+
if (isExpanded && triggerPanel) {
|
|
518
|
+
await trigger.click();
|
|
519
|
+
const panel = page.locator(`#${triggerPanel}`);
|
|
520
|
+
await (0, test_exports.expect)(panel).toBeHidden({ timeout: 1e3 }).catch(() => {
|
|
521
|
+
});
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
}
|
|
513
526
|
let shouldSkipTest = false;
|
|
514
527
|
for (const act of action) {
|
|
515
528
|
if (act.type === "keypress" && (act.target === "submenuTrigger" || act.target === "submenu")) {
|
package/dist/index.js
CHANGED
|
@@ -1278,7 +1278,7 @@ Error: ${error instanceof Error ? error.message : String(error)}`
|
|
|
1278
1278
|
const devServerUrl = await checkDevServer(url);
|
|
1279
1279
|
if (devServerUrl) {
|
|
1280
1280
|
console.log(`\u{1F3AD} Running Playwright tests on ${devServerUrl}`);
|
|
1281
|
-
const { runContractTestsPlaywright } = await import("./contractTestRunnerPlaywright-
|
|
1281
|
+
const { runContractTestsPlaywright } = await import("./contractTestRunnerPlaywright-EXEBWWPC.js");
|
|
1282
1282
|
contract = await runContractTestsPlaywright(componentName, devServerUrl);
|
|
1283
1283
|
} else {
|
|
1284
1284
|
throw new Error(
|
|
@@ -19,7 +19,6 @@ async function runContractTestsPlaywright(componentName, url) {
|
|
|
19
19
|
const passes = [];
|
|
20
20
|
const skipped = [];
|
|
21
21
|
let page = null;
|
|
22
|
-
const useNavigation = !!url;
|
|
23
22
|
try {
|
|
24
23
|
page = await createTestPage();
|
|
25
24
|
if (url) {
|
|
@@ -33,8 +32,7 @@ async function runContractTestsPlaywright(componentName, url) {
|
|
|
33
32
|
if (!mainSelector) {
|
|
34
33
|
throw new Error(`No main selector (trigger, input, or container) found in contract for ${componentName}`);
|
|
35
34
|
}
|
|
36
|
-
|
|
37
|
-
await page.locator(mainSelector).first().waitFor({ state: "attached", timeout: elementTimeout });
|
|
35
|
+
await page.locator(mainSelector).first().waitFor({ state: "attached", timeout: 3e4 });
|
|
38
36
|
if (componentName === "menu" && componentContract.selectors.trigger) {
|
|
39
37
|
await page.locator(componentContract.selectors.trigger).first().waitFor({
|
|
40
38
|
state: "visible",
|
|
@@ -145,15 +143,13 @@ async function runContractTestsPlaywright(componentName, url) {
|
|
|
145
143
|
menuClosed = await expect(popupElement).toBeHidden({ timeout: 2e3 }).then(() => true).catch(() => false);
|
|
146
144
|
}
|
|
147
145
|
if (!menuClosed) {
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
`\u274C FATAL: Cannot close menu between tests. Menu remains visible after trying:
|
|
146
|
+
throw new Error(
|
|
147
|
+
`\u274C FATAL: Cannot close menu between tests. Menu remains visible after trying:
|
|
151
148
|
1. Escape key
|
|
152
149
|
2. Clicking trigger
|
|
153
150
|
3. Clicking outside
|
|
154
151
|
This indicates a problem with the menu component's close functionality.`
|
|
155
|
-
|
|
156
|
-
}
|
|
152
|
+
);
|
|
157
153
|
}
|
|
158
154
|
if (componentContract.selectors.input) {
|
|
159
155
|
await page.locator(componentContract.selectors.input).first().clear();
|
|
@@ -164,6 +160,23 @@ This indicates a problem with the menu component's close functionality.`
|
|
|
164
160
|
}
|
|
165
161
|
}
|
|
166
162
|
}
|
|
163
|
+
if (componentContract.selectors.panel && componentContract.selectors.trigger && !componentContract.selectors.popup) {
|
|
164
|
+
const triggerSelector = componentContract.selectors.trigger;
|
|
165
|
+
const panelSelector = componentContract.selectors.panel;
|
|
166
|
+
if (triggerSelector && panelSelector) {
|
|
167
|
+
const allTriggers = await page.locator(triggerSelector).all();
|
|
168
|
+
for (const trigger of allTriggers) {
|
|
169
|
+
const isExpanded = await trigger.getAttribute("aria-expanded") === "true";
|
|
170
|
+
const triggerPanel = await trigger.getAttribute("aria-controls");
|
|
171
|
+
if (isExpanded && triggerPanel) {
|
|
172
|
+
await trigger.click();
|
|
173
|
+
const panel = page.locator(`#${triggerPanel}`);
|
|
174
|
+
await expect(panel).toBeHidden({ timeout: 1e3 }).catch(() => {
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
167
180
|
let shouldSkipTest = false;
|
|
168
181
|
for (const act of action) {
|
|
169
182
|
if (act.type === "keypress" && (act.target === "submenuTrigger" || act.target === "submenu")) {
|
|
@@ -336,7 +336,6 @@ async function runContractTestsPlaywright(componentName, url) {
|
|
|
336
336
|
const passes = [];
|
|
337
337
|
const skipped = [];
|
|
338
338
|
let page = null;
|
|
339
|
-
const useNavigation = !!url;
|
|
340
339
|
try {
|
|
341
340
|
page = await createTestPage();
|
|
342
341
|
if (url) {
|
|
@@ -350,8 +349,7 @@ async function runContractTestsPlaywright(componentName, url) {
|
|
|
350
349
|
if (!mainSelector) {
|
|
351
350
|
throw new Error(`No main selector (trigger, input, or container) found in contract for ${componentName}`);
|
|
352
351
|
}
|
|
353
|
-
|
|
354
|
-
await page.locator(mainSelector).first().waitFor({ state: "attached", timeout: elementTimeout });
|
|
352
|
+
await page.locator(mainSelector).first().waitFor({ state: "attached", timeout: 3e4 });
|
|
355
353
|
if (componentName === "menu" && componentContract.selectors.trigger) {
|
|
356
354
|
await page.locator(componentContract.selectors.trigger).first().waitFor({
|
|
357
355
|
state: "visible",
|
|
@@ -462,15 +460,13 @@ async function runContractTestsPlaywright(componentName, url) {
|
|
|
462
460
|
menuClosed = await test.expect(popupElement).toBeHidden({ timeout: 2e3 }).then(() => true).catch(() => false);
|
|
463
461
|
}
|
|
464
462
|
if (!menuClosed) {
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
`\u274C FATAL: Cannot close menu between tests. Menu remains visible after trying:
|
|
463
|
+
throw new Error(
|
|
464
|
+
`\u274C FATAL: Cannot close menu between tests. Menu remains visible after trying:
|
|
468
465
|
1. Escape key
|
|
469
466
|
2. Clicking trigger
|
|
470
467
|
3. Clicking outside
|
|
471
468
|
This indicates a problem with the menu component's close functionality.`
|
|
472
|
-
|
|
473
|
-
}
|
|
469
|
+
);
|
|
474
470
|
}
|
|
475
471
|
if (componentContract.selectors.input) {
|
|
476
472
|
await page.locator(componentContract.selectors.input).first().clear();
|
|
@@ -481,6 +477,23 @@ This indicates a problem with the menu component's close functionality.`
|
|
|
481
477
|
}
|
|
482
478
|
}
|
|
483
479
|
}
|
|
480
|
+
if (componentContract.selectors.panel && componentContract.selectors.trigger && !componentContract.selectors.popup) {
|
|
481
|
+
const triggerSelector = componentContract.selectors.trigger;
|
|
482
|
+
const panelSelector = componentContract.selectors.panel;
|
|
483
|
+
if (triggerSelector && panelSelector) {
|
|
484
|
+
const allTriggers = await page.locator(triggerSelector).all();
|
|
485
|
+
for (const trigger of allTriggers) {
|
|
486
|
+
const isExpanded = await trigger.getAttribute("aria-expanded") === "true";
|
|
487
|
+
const triggerPanel = await trigger.getAttribute("aria-controls");
|
|
488
|
+
if (isExpanded && triggerPanel) {
|
|
489
|
+
await trigger.click();
|
|
490
|
+
const panel = page.locator(`#${triggerPanel}`);
|
|
491
|
+
await test.expect(panel).toBeHidden({ timeout: 1e3 }).catch(() => {
|
|
492
|
+
});
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
}
|
|
484
497
|
let shouldSkipTest = false;
|
|
485
498
|
for (const act of action) {
|
|
486
499
|
if (act.type === "keypress" && (act.target === "submenuTrigger" || act.target === "submenu")) {
|
|
@@ -106,7 +106,7 @@ Error: ${error instanceof Error ? error.message : String(error)}`
|
|
|
106
106
|
const devServerUrl = await checkDevServer(url);
|
|
107
107
|
if (devServerUrl) {
|
|
108
108
|
console.log(`\u{1F3AD} Running Playwright tests on ${devServerUrl}`);
|
|
109
|
-
const { runContractTestsPlaywright } = await import('./contractTestRunnerPlaywright-
|
|
109
|
+
const { runContractTestsPlaywright } = await import('./contractTestRunnerPlaywright-LJHY3AB4.js');
|
|
110
110
|
contract = await runContractTestsPlaywright(componentName, devServerUrl);
|
|
111
111
|
} else {
|
|
112
112
|
throw new Error(
|