mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-24 08:03:19 +00:00
test(e2e): fix the Python highlighting and Recent Locations specs (#4752)
pythonHighlight: the fixture's Darcula-based scheme doesn't name NOT_USED_ELEMENT_ATTRIBUTES, which since #4737 comes from Darcula (#72737A). recentNavigationLayout: the snippet height check allows a fractional pixel (89.94px vs 90px).
This commit is contained in:
@@ -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") });
|
||||
});
|
||||
|
||||
@@ -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" });
|
||||
|
||||
Reference in New Issue
Block a user