AI-native design editor. Open-source Figma alternative.
fix(tests): let the app Playwright suite load every spec (#842)
Danila Poyarkovf133957b0b72
diff --git a/packages/fig/docs/observations/styled-saved-glyphs.md b/packages/fig/docs/observations/styled-saved-glyphs.mdindex 39a8be596..c195d7f8b 100644--- a/packages/fig/docs/observations/styled-saved-glyphs.md+++ b/packages/fig/docs/observations/styled-saved-glyphs.md@@ -1,6 +1,6 @@# Styled saved glyph fixture-`styled-saved-glyphs.json` is a reduced SceneGraph conversion of a temporary Figma-authored text node containing `office affine` at 40 px Inter Regular. The first word has a red solid fill at 50% opacity; the second has a blue solid fill. The node was captured from Figma's Save local copy canvas payload, then the temporary page was removed.+[`tests/fixtures/styled-saved-glyphs.json`](../../../../tests/fixtures/styled-saved-glyphs.json), which the saved-glyph and occurrence-text canvas specs load, is a reduced SceneGraph conversion of a temporary Figma-authored text node containing `office affine` at 40 px Inter Regular. The first word has a red solid fill at 50% opacity; the second has a blue solid fill. The node was captured from Figma's Save local copy canvas payload, then the temporary page was removed.Only typography, dimensions, fills, style runs, and saved glyph outlines/character indices are retained. This is not a full document or font binary. It contains 13 glyphs for 13 characters and **does not prove ligature coverage**.diff --git a/tests/e2e/chat/real-llm.spec.ts b/tests/e2e/chat/real-llm.spec.tsindex 72e68ed7f..1359bb68d 100644--- a/tests/e2e/chat/real-llm.spec.ts+++ b/tests/e2e/chat/real-llm.spec.ts@@ -3,12 +3,19 @@ import { expect, test } from '@playwright/test'import { CanvasHelper } from '#tests/helpers/canvas'import { ChatHarness } from '#tests/helpers/chat/harness'-const apiKey = process.env.OPENROUTER_API_KEY--if (!apiKey) throw new Error('OPENROUTER_API_KEY is required for real LLM smoke tests')+/**+ * Read when a test runs, not when the file loads: `bun run test` loads this file only to+ * exclude it, and must not fail for lack of a key. `test:real-llm` still fails without one.+ */+function openRouterKey(): string {+ const apiKey = process.env.OPENROUTER_API_KEY+ if (!apiKey) throw new Error('OPENROUTER_API_KEY is required for real LLM smoke tests')+ return apiKey+}test.describe('OpenRouter chat', { tag: '@real-llm' }, () => {test('streams a Markdown response from the configured Design model', async ({ page }) => {+ const apiKey = openRouterKey()const chat = new ChatHarness(page)await chat.open()const canvas = new CanvasHelper(page)diff --git a/packages/fig/docs/observations/styled-saved-glyphs.json b/tests/fixtures/styled-saved-glyphs.jsonsimilarity index 100%rename from packages/fig/docs/observations/styled-saved-glyphs.jsonrename to tests/fixtures/styled-saved-glyphs.json