rallly/apps/web/tests/i18n.spec.ts
Luke Vella c22b3abc4d
⬆️ v3.0.0 (#704)
2023-06-19 17:17:00 +01:00

15 lines
574 B
TypeScript

import test, { expect } from "@playwright/test";
test("should show correct language if supported", async ({ browser }) => {
const context = await browser.newContext({ locale: "de" });
const page = await context.newPage();
await page.goto("/");
await expect(page.locator("text=Neue Umfrage")).toBeVisible();
});
test("should default to english", async ({ browser }) => {
const context = await browser.newContext({ locale: "mt" });
const page = await context.newPage();
await page.goto("/new");
await expect(page.locator("text=New Poll")).toBeVisible();
});