Support Angular country-language locales

This commit is contained in:
2026-05-20 20:11:38 +03:00
parent 7fd789e06a
commit 2b47ca799f
3 changed files with 55 additions and 30 deletions
+23
View File
@@ -50,6 +50,29 @@ test.describe("Smoke tests", () => {
await expect(page.getByText("en-en", { exact: true })).toBeVisible();
});
test("/ru-en/onlineboard uses English language with Russia country prefix", async ({
page,
consoleMessages,
}) => {
await page.goto("/ru-en/onlineboard?_preferredLanguage=en&_preferredLocale=ruh");
await page.waitForLoadState("domcontentloaded");
await expect(page).toHaveURL(/\/ru-en\/onlineboard/);
await expect(page.locator("h1")).toHaveText("Online Timetable", {
timeout: 10000,
});
await expect(page.getByTestId("standalone-header")).toContainText("Services", {
timeout: 15000,
});
await expect(page.getByTestId("standalone-header")).toContainText("EN", {
timeout: 15000,
});
await expect(page.locator('afl-component[data-component="Footer"]')).toContainText(
"Contact us",
{ timeout: 15000 },
);
});
test("/xx/smoke shows 404 or unknown locale message", async ({ page, consoleMessages }) => {
await page.goto("/xx/smoke");
await page.waitForLoadState("domcontentloaded");