mirror of
https://github.com/maputnik/editor.git
synced 2026-07-09 15:37:28 +00:00
be9456d11b
## Launch Checklist Renames the e2e test and reduces changes as a preparation step from playwright in the following PR: - #1988 This is to keep as much history as possible. <img width="1907" height="933" alt="image" src="https://github.com/user-attachments/assets/b52075b3-eb3b-45dc-93dc-8c5e9cfd35dd" /> - [x] Briefly describe the changes in this PR. --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
38 lines
1.0 KiB
TypeScript
38 lines
1.0 KiB
TypeScript
import { MaputnikDriver } from "./maputnik-driver";
|
|
|
|
const test = it;
|
|
|
|
describe("i18n", () => {
|
|
const { beforeAndAfter, get, when, then } = new MaputnikDriver();
|
|
beforeAndAfter();
|
|
|
|
describe("language detector", () => {
|
|
test("English", () => {
|
|
const url = "?lng=en";
|
|
when.visit(url);
|
|
then(get.elementByTestId("maputnik-lang-select")).shouldHaveValue("en");
|
|
});
|
|
|
|
test("Japanese", () => {
|
|
const url = "?lng=ja";
|
|
when.visit(url);
|
|
then(get.elementByTestId("maputnik-lang-select")).shouldHaveValue("ja");
|
|
});
|
|
});
|
|
|
|
describe("language switcher", () => {
|
|
beforeEach(() => {
|
|
when.setStyle("layer");
|
|
});
|
|
|
|
test("the language switcher switches to Japanese", () => {
|
|
const selector = "maputnik-lang-select";
|
|
then(get.elementByTestId(selector)).shouldExist();
|
|
when.select(selector, "ja");
|
|
then(get.elementByTestId(selector)).shouldHaveValue("ja");
|
|
|
|
then(get.elementByTestId("nav:settings")).shouldHaveText("スタイル設定");
|
|
});
|
|
});
|
|
});
|