Mirror Angular shell placeholders
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
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 ({
|
||||
test("Russian standalone pages render Angular-style Aeroflot shell placeholders", async ({
|
||||
page,
|
||||
consoleMessages,
|
||||
}) => {
|
||||
@@ -9,38 +9,31 @@ test.describe("TIRREDESIGN-30 — standalone header and footer", () => {
|
||||
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(header.locator('afl-component.header[data-component="Header"]')).toHaveCount(1);
|
||||
|
||||
await expect(page.locator("#main-content h1")).toHaveText("Страница проверки");
|
||||
await expect(page.locator("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");
|
||||
await expect(page.locator('afl-component.footer[data-component="Footer"]')).toHaveCount(1);
|
||||
await expect(
|
||||
page.locator('.banner--top afl-component[data-component="BannersOffers"] afl-item[data-item="positionId"]'),
|
||||
).toHaveText("383");
|
||||
await expect(
|
||||
page.locator('.banner--bottom afl-component[data-component="BannersOffers"] afl-item[data-item="positionId"]'),
|
||||
).toHaveText("384");
|
||||
});
|
||||
|
||||
test("English standalone pages localize shell chrome", async ({
|
||||
test("local dev uses Angular-style placeholder loader mode", async ({
|
||||
page,
|
||||
consoleMessages,
|
||||
}) => {
|
||||
await page.goto("/en/smoke");
|
||||
await page.goto("/ru/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");
|
||||
await expect(
|
||||
page.locator('meta[name="aeroflot-shell-loader"][content="placeholder"]'),
|
||||
).toHaveCount(1);
|
||||
await expect(
|
||||
page.locator('script[src="https://www.aeroflot.ru/frontend/static/js/afl-frontend-loader.bundle.js"]'),
|
||||
).toHaveCount(0);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user