Verify TZ Table 7 Карта полетов breadcrumb = [Главная] only

This commit is contained in:
2026-04-21 17:53:16 +03:00
parent 266a6f910c
commit 2fe5364187
2 changed files with 24 additions and 3 deletions
@@ -334,6 +334,29 @@ describe("FlightsMapStartPage — polylines from search results (C.3)", () => {
});
});
describe("TZ §4.1.4 Table 7 breadcrumbs — Flight-Map pages (rows 1-3)", () => {
it("4.1.4-R-Map-Crumb: Flight-Map page shows only [Главная] per TZ Table 7 rows 1-3", () => {
dictState.dictionaries = buildDictionaries();
dictState.loading = false;
dictState.error = null;
searchState.routes = [];
searchState.loading = false;
searchState.error = null;
const { container } = render(<FlightsMapStartPage />);
// Breadcrumbs component auto-prepends Home (Главная), so passing []
// means exactly 1 breadcrumb item should render: just Home.
const crumbItems = container.querySelectorAll('[data-testid="breadcrumbs"] li');
expect(crumbItems).toHaveLength(1);
// The single item should not have any child links or extra content
// (just the Home link auto-prepended, no self-referential "Карта полетов" crumb).
const homeLink = container.querySelector('[data-testid="breadcrumbs"] a');
expect(homeLink).toBeTruthy();
});
});
describe("FlightsMapStartPage — C.4 integration", () => {
beforeEach(() => {
lastMapCanvasProps = null;
@@ -295,9 +295,7 @@ export const FlightsMapStartPage: FC<FlightsMapStartPageProps> = ({
{t("FLIGHTS-MAP.TITLE")}
</h1>
}
breadcrumbs={[
{ label: t("FLIGHTS-MAP.TITLE"), url: `/${locale}/flights-map` },
]}
breadcrumbs={[]}
contentLeft={
<FlightsMapFilter
value={filterState}