MAESTRO: stabilize Playwright E2E suite

This commit is contained in:
Mariusz Banach
2026-02-18 06:58:01 +01:00
parent f296f78030
commit 41e2e3d570
67 changed files with 139 additions and 37 deletions

View File

@@ -40,9 +40,13 @@ test("report interactions allow expand/collapse, search, and export", async ({ p
const totalCount = await resultCards.count();
expect(totalCount).toBeGreaterThan(0);
for (let index = 0; index < totalCount; index += 1) {
await analyzer.expandCard(index);
}
await page.evaluate(() => {
document.querySelectorAll('[data-testid^="test-result-toggle-"]').forEach((node) => {
if (node.getAttribute("aria-expanded") !== "true") {
(node as HTMLButtonElement).click();
}
});
});
const toggleLocator = page.locator('[data-testid^="test-result-toggle-"]');
await expect.poll(async () => {
@@ -51,9 +55,13 @@ test("report interactions allow expand/collapse, search, and export", async ({ p
});
}).toBe(totalCount);
for (let index = 0; index < totalCount; index += 1) {
await analyzer.collapseCard(index);
}
await page.evaluate(() => {
document.querySelectorAll('[data-testid^="test-result-toggle-"]').forEach((node) => {
if (node.getAttribute("aria-expanded") === "true") {
(node as HTMLButtonElement).click();
}
});
});
await expect.poll(async () => {
return toggleLocator.evaluateAll((nodes) => {