mirror of
https://github.com/musistudio/claude-code-router.git
synced 2026-08-29 03:12:10 +08:00
test(e2e): pin the provider-edit spec to the en-US locale
Review follow-up: the spec hard-codes English UI strings ("Providers"
nav, the "Edit <name>" provider aria-label), but the web UI defaults to
the system language, so the suite failed on zh-locale hosts. The
Playwright context locale is now pinned per suite, which keeps the
selectors deterministic without dual-language lookups everywhere.
This commit is contained in:
@@ -1,6 +1,12 @@
|
||||
import { expect, test, type Page } from "@playwright/test";
|
||||
import { disposeCliWebRuntime, startCliWebServer, type CliWebRuntime } from "./cli-web-runtime";
|
||||
|
||||
// The web UI defaults to the system language, and this suite asserts strings
|
||||
// that are localized ("Providers" nav, the "Edit <name>" provider button
|
||||
// aria-label). Pin the context to English so the spec is independent of the
|
||||
// host's locale instead of hard-coding dual-language selectors.
|
||||
test.use({ locale: "en-US" });
|
||||
|
||||
const cliWebAuthToken = "playwright-provider-edit-token";
|
||||
|
||||
// A provider shaped like a hand-written config entry: the dialog renders none of
|
||||
|
||||
Reference in New Issue
Block a user