fix(e2e): size-check both close button svgs in findUsages-ui (#3834)

The Close Tab button now stacks idle and hovered icons, so the single-svg locator hit Playwright's strict mode. The spec checks every svg each toolbar button renders.

Closes #3828

Co-authored-by: Inf1mum <8135225+Inf1mum@users.noreply.github.com>
This commit is contained in:
Vadim Lazuk
2026-11-17 03:46:36 +08:00
committed by GitHub
co-authored by Inf1mum
parent 77e6679701
commit 17e7b98cfc
+3 -1
View File
@@ -69,8 +69,10 @@ for (const theme of ["light", "dark"] as const) {
await checkSize(fileIcon);
await checkSize(directoryIcon);
await checkSize(find.getByRole("status", { name: "Loading", exact: true }));
// The close button stacks idle and hovered icons (both 16px); check every svg each button renders.
for (const title of ["Stop", "Expand All", "Collapse All", "Close Tab"])
await checkSize(find.getByRole("button", { name: title, exact: true }).last().locator("svg"));
for (const icon of await find.getByRole("button", { name: title, exact: true }).last().locator("svg").all())
await checkSize(icon);
await page.evaluate(async () => {
const path = "/src/ui/iconAppearance.ts";