Support Angular country-language locales
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user