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:
songkuan-zheng
2026-08-25 06:05:31 +00:00
parent bb6c256b06
commit a5a5481307
+6
View File
@@ -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