Restore standalone shell chrome

This commit is contained in:
2026-05-20 16:01:30 +03:00
parent 80087ded8b
commit ee08795811
7 changed files with 580 additions and 5 deletions
+2 -2
View File
@@ -36,7 +36,7 @@ test.describe("Smoke tests", () => {
await expect(heading).toHaveText("Страница проверки");
// Locale should be displayed
await expect(page.locator("text=ru")).toBeVisible();
await expect(page.getByText("ru-ru", { exact: true })).toBeVisible();
});
test("/en/smoke renders with English text", async ({ page, consoleMessages }) => {
@@ -47,7 +47,7 @@ test.describe("Smoke tests", () => {
await expect(heading).toBeVisible({ timeout: 10000 });
await expect(heading).toHaveText("Smoke test page");
await expect(page.locator("text=en")).toBeVisible();
await expect(page.getByText("en-en", { exact: true })).toBeVisible();
});
test("/xx/smoke shows 404 or unknown locale message", async ({ page, consoleMessages }) => {
+46
View File
@@ -0,0 +1,46 @@
import { test, expect } from "./fixtures/console-gate";
test.describe("TIRREDESIGN-30 — standalone header and footer", () => {
test("Russian standalone pages render Aeroflot shell around React content", async ({
page,
consoleMessages,
}) => {
await page.goto("/ru/smoke");
await page.waitForLoadState("domcontentloaded");
const header = page.getByTestId("standalone-header");
await expect(header).toBeVisible();
await expect(header).toContainText("Купить билет");
await expect(header).toContainText("Аэроэкспресс");
await expect(header).toContainText("Тестовая версия");
await expect(page.locator("#main-content h1")).toHaveText("Страница проверки");
const footer = page.getByTestId("standalone-footer");
await expect(footer).toBeVisible();
await expect(footer).toContainText("Контакты");
await expect(footer).toContainText("8 (800) 444-55-55");
await expect(footer).toContainText("© Авиакомпания «Аэрофлот» 2008-2026");
});
test("English standalone pages localize shell chrome", async ({
page,
consoleMessages,
}) => {
await page.goto("/en/smoke");
await page.waitForLoadState("domcontentloaded");
const header = page.getByTestId("standalone-header");
await expect(header).toBeVisible();
await expect(header).toContainText("Book a flight");
await expect(header).toContainText("Aeroexpress");
await expect(header).toContainText("Test version");
await expect(page.locator("#main-content h1")).toHaveText("Smoke test page");
const footer = page.getByTestId("standalone-footer");
await expect(footer).toBeVisible();
await expect(footer).toContainText("Contacts");
await expect(footer).toContainText("© Aeroflot 2008-2026");
});
});