Compare commits

...
Author SHA1 Message Date
l0ng-ai a1f93bc294 test(e2e): allow a fractional pixel in the Recent Locations snippet height
Three 30px lines measured 89.94px on some machines, failing an exact
comparison with 90.
2026-11-20 17:28:54 +08:00
l0ng-ai 0716c77f7c test(e2e): expect Darcula's unused colour in a Darcula-based scheme
The Python highlighting fixture's scheme is based on Darcula and doesn't
name NOT_USED_ELEMENT_ATTRIBUTES. Since #4737 such attributes come from
Darcula (#72737A) instead of the UI theme's faint text colour.
2026-11-20 17:27:13 +08:00
2 changed files with 4 additions and 2 deletions

No files matched your search

+2 -1
View File
@@ -53,7 +53,8 @@ test("Python syntax supplements retain PyCharm colours without a language server
await expect(page.locator(".cm-sem-python-predefined-definition")).toHaveCSS("color", "rgb(187, 153, 34)");
await expect(page.locator(".cm-sem-python-predefined-usage")).toHaveCSS("color", "rgb(204, 170, 51)");
await expect(page.locator(".cm-sem-keyword").filter({ hasText: /^type$/ })).toHaveCSS("color", "rgb(17, 34, 51)");
await expect(page.locator(".cm-sem-unused")).toHaveCSS("color", "rgb(111, 115, 122)");
// The scheme is Darcula-based and doesn't name NOT_USED_ELEMENT_ATTRIBUTES: Darcula's #72737A applies.
await expect(page.locator(".cm-sem-unused")).toHaveCSS("color", "rgb(114, 115, 122)");
expect(errors).toEqual([]);
await page.screenshot({ path: info.outputPath("python-highlighting.png") });
});
+2 -1
View File
@@ -84,7 +84,8 @@ test("Recent Locations keeps all snippet lines visible when the editor font grow
await expect(code).toHaveCSS("font-size", "19px");
await expect(code).toHaveCSS("line-height", "30px");
await expect(code).toHaveCSS("font-family", /"Fira Code".*"Maple Mono NF CN"/);
expect((await code.boundingBox())!.height).toBe(90);
// Three 30px lines; layout may land on a fractional pixel.
expect((await code.boundingBox())!.height).toBeCloseTo(90, 0);
await page.setViewportSize({ width: 400, height: 500 });
const filter = dialog.getByRole("textbox", { name: "Filter recent locations" });