mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-09 22:25:02 +03:00
15 lines
552 B
TypeScript
15 lines
552 B
TypeScript
import { expect, story } from "../../stories/playwright/story"
|
|
|
|
story("shows the fallback glyph when an icon chunk fails to load", async ({ mount, page }) => {
|
|
await page.route("**/file-types/typescript.svg*", (route) => route.abort())
|
|
const root = await mount("components-file-icon--samples")
|
|
|
|
await expect(
|
|
root
|
|
.locator("div")
|
|
.filter({ hasText: /^index\.ts$/ })
|
|
.locator("use"),
|
|
).toHaveAttribute("href", "#file-icon-Document")
|
|
await expect(page.locator("#file-icon-sprite > #file-icon-Document")).toHaveCount(1)
|
|
})
|