test: shared e2e helpers, vi.stubEnv, drop placeholder specs

- tests/e2e/lib: openApp(page, { path, config }), MODEL_CONFIGS_KEY,
  savedModelConfigs, settingsDialog, chunkedReplies, sse() and
  toolCallEvents() replace about 70 copies of goto + wait for iframe,
  three local openApp functions, 14 window.fetch overrides and the
  Node-side SSE serialisers; unused fixtures removed
- delete theme, save, history, model-config, upload and copy-paste
  specs (the copy-button test moves to chat.spec.ts); trim
  iframe-interaction, history-restore, keyboard and smoke to tests that
  can fail; file-upload asserts on the preview image
- settings-review-fixes.spec.ts split by topic into settings-bedrock,
  settings-tabs-sync and settings-providers
- unit tests use vi.stubEnv with unstubEnvs: true instead of
  hand-written process.env save and restore loops
This commit is contained in:
dayuan.jiang
2026-10-12 09:11:25 +09:00
parent 9a6a808187
commit 1333ed68c6
54 changed files with 2025 additions and 2988 deletions
+2 -3
View File
@@ -1,5 +1,5 @@
import { expect, type Page, test } from "@playwright/test"
import { getIframe, sendMessage } from "./lib/fixtures"
import { openApp, sendMessage } from "./lib/fixtures"
/** Answer the chat request with the given response and send a message */
async function chatWith(
@@ -7,8 +7,7 @@ async function chatWith(
response: { status: number; contentType: string; body: string },
) {
await page.route("**/api/chat", (route) => route.fulfill(response))
await page.goto("/", { waitUntil: "networkidle" })
await getIframe(page).waitFor({ state: "visible", timeout: 30000 })
await openApp(page)
await sendMessage(page, "Draw a box")
}