mirror of
https://github.com/maputnik/editor.git
synced 2026-07-09 07:27:35 +00:00
8af1cfd5f8
Pure file moves (no content changes) so git records them as renames and history/blame is preserved through the migration that follows: cypress/e2e/*.cy.ts -> e2e/*.spec.ts cypress/e2e/*-driver.ts -> e2e/*-driver.ts cypress/fixtures/ -> e2e/fixtures/ cypress.config.ts -> playwright.config.ts InputAutocomplete.cy.tsx -> InputAutocomplete.browser.test.tsx Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
36 lines
1018 B
TypeScript
36 lines
1018 B
TypeScript
import { MaputnikDriver } from "./maputnik-driver";
|
|
|
|
describe("i18n", () => {
|
|
const { beforeAndAfter, get, when, then } = new MaputnikDriver();
|
|
beforeAndAfter();
|
|
|
|
describe("language detector", () => {
|
|
it("English", () => {
|
|
const url = "?lng=en";
|
|
when.visit(url);
|
|
then(get.elementByTestId("maputnik-lang-select")).shouldHaveValue("en");
|
|
});
|
|
|
|
it("Japanese", () => {
|
|
const url = "?lng=ja";
|
|
when.visit(url);
|
|
then(get.elementByTestId("maputnik-lang-select")).shouldHaveValue("ja");
|
|
});
|
|
});
|
|
|
|
describe("language switcher", () => {
|
|
beforeEach(() => {
|
|
when.setStyle("layer");
|
|
});
|
|
|
|
it("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("スタイル設定");
|
|
});
|
|
});
|
|
});
|