45 lines
1.8 KiB
TypeScript
45 lines
1.8 KiB
TypeScript
import { test, expect } from "./fixtures/console-gate";
|
|
|
|
test.describe("TIRREDESIGN-30 — standalone header and footer", () => {
|
|
test("Russian standalone pages render Angular-style Aeroflot shell placeholders", async ({
|
|
page,
|
|
consoleMessages,
|
|
}) => {
|
|
await page.goto("/ru-ru/smoke");
|
|
await page.waitForLoadState("domcontentloaded");
|
|
|
|
const header = page.getByTestId("standalone-header");
|
|
await expect(header.locator('afl-component.header[data-component="Header"]')).toHaveCount(1);
|
|
await expect(header).toContainText("Сервисы и услуги", { timeout: 15_000 });
|
|
await expect(header).toContainText("Личный кабинет", { timeout: 15_000 });
|
|
|
|
await expect(page.locator("h1")).toHaveText("Страница проверки");
|
|
|
|
const footer = page.locator('afl-component.footer[data-component="Footer"]');
|
|
await expect(footer).toHaveCount(1);
|
|
await expect(footer).toContainText("Контакты", { timeout: 15_000 });
|
|
await expect(footer).toContainText("8 (800) 444-55-55", { timeout: 15_000 });
|
|
await expect(
|
|
page.locator('.banner--top afl-component[data-component="BannersOffers"].initialized'),
|
|
).toHaveCount(1);
|
|
await expect(
|
|
page.locator('.banner--bottom afl-component[data-component="BannersOffers"].initialized'),
|
|
).toHaveCount(1);
|
|
});
|
|
|
|
test("local dev hydrates placeholders through same-origin Aeroflot loader proxy", async ({
|
|
page,
|
|
consoleMessages,
|
|
}) => {
|
|
await page.goto("/ru-ru/smoke");
|
|
await page.waitForLoadState("domcontentloaded");
|
|
|
|
await expect(
|
|
page.locator('meta[name="aeroflot-shell-loader"][content="proxy"]'),
|
|
).toHaveCount(1);
|
|
await expect(
|
|
page.locator('script[src="/frontend/static/js/afl-frontend-loader.bundle.js"]'),
|
|
).toHaveCount(1);
|
|
});
|
|
});
|