Verify TZ Table 7 Карта полетов breadcrumb = [Главная] only
This commit is contained in:
@@ -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", () => {
|
describe("FlightsMapStartPage — C.4 integration", () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
lastMapCanvasProps = null;
|
lastMapCanvasProps = null;
|
||||||
|
|||||||
@@ -295,9 +295,7 @@ export const FlightsMapStartPage: FC<FlightsMapStartPageProps> = ({
|
|||||||
{t("FLIGHTS-MAP.TITLE")}
|
{t("FLIGHTS-MAP.TITLE")}
|
||||||
</h1>
|
</h1>
|
||||||
}
|
}
|
||||||
breadcrumbs={[
|
breadcrumbs={[]}
|
||||||
{ label: t("FLIGHTS-MAP.TITLE"), url: `/${locale}/flights-map` },
|
|
||||||
]}
|
|
||||||
contentLeft={
|
contentLeft={
|
||||||
<FlightsMapFilter
|
<FlightsMapFilter
|
||||||
value={filterState}
|
value={filterState}
|
||||||
|
|||||||
Reference in New Issue
Block a user