Файли
openidea/e2e/vueHighlight.spec.ts
T
l0ng-ai edd2e90b9b feat(editor): colour Vue component tags apart from HTML elements (#7059)
Component tags in Vue templates (<Icon>, <el-input>) had the same colour as HTML elements. PascalCase or hyphenated tag names now use a new --syn-custom-tag token, the Custom tag name colour: #2fbaa3 in Islands Dark and #b21dbf in Islands Light, with values for high contrast, the palette themes and Harbor Night; other themes fall back to the tag colour.

Fixes #6894
2026-11-30 21:59:52 +08:00

15 рядки
692 B
TypeScript

import { expect, test } from "@playwright/test";
for (const [theme, custom, tag] of [
["dark", "rgb(47, 186, 163)", "rgb(213, 183, 120)"],
["light", "rgb(178, 29, 191)", "rgb(0, 51, 179)"],
] as const) {
test(`Vue component tags have the custom tag colour (${theme})`, async ({ page }) => {
await page.goto(`/e2e/vueHighlight.html?theme=${theme}`);
const line = page.locator(".cm-line").nth(1);
await expect(line.getByText("Icon", { exact: true })).toHaveCSS("color", custom);
await expect(line.getByText("el-input", { exact: true }).first()).toHaveCSS("color", custom);
await expect(line.getByText("div", { exact: true }).first()).toHaveCSS("color", tag);
});
}