Hide board number in flight details
This commit is contained in:
@@ -8,6 +8,9 @@ import { nextOnlineboardDetailsFixture } from "./helpers/onlineboard-fixtures";
|
||||
// title under "Борт" must be a clickable external link that opens in a new tab.
|
||||
// Angular renders:
|
||||
// http://www.aeroflot.ru/cms/{language}/flight/plane_park
|
||||
//
|
||||
// TIRREDESIGN-29 — Angular does not show the aircraft tail/board number in
|
||||
// this online-board details card, even when the API payload contains it.
|
||||
|
||||
const FIXTURE_DIR = path.resolve(
|
||||
path.dirname(fileURLToPath(import.meta.url)),
|
||||
@@ -24,12 +27,19 @@ test("Onlineboard details aircraft title opens Aeroflot plane park in a new tab"
|
||||
consoleMessages,
|
||||
}) => {
|
||||
const details = nextOnlineboardDetailsFixture(onlineboardDetails);
|
||||
const detailsPayload = JSON.parse(details.body);
|
||||
detailsPayload.data.routes[0].leg.equipment.aircraft.actual = {
|
||||
type: "SU9",
|
||||
title: "Sukhoi SuperJet 100",
|
||||
registration: "89104",
|
||||
name: "Ессентуки",
|
||||
};
|
||||
|
||||
await page.route("**/api/flights/v1.1/ru/onlineboard/details?**", async (route) => {
|
||||
await route.fulfill({
|
||||
status: 200,
|
||||
contentType: "application/json",
|
||||
body: details.body,
|
||||
body: JSON.stringify(detailsPayload),
|
||||
});
|
||||
});
|
||||
|
||||
@@ -49,6 +59,8 @@ test("Onlineboard details aircraft title opens Aeroflot plane park in a new tab"
|
||||
|
||||
const link = aircraftRow.locator("a.details-row__subtitle-link");
|
||||
await expect(link).toHaveText("Sukhoi SuperJet 100");
|
||||
await expect(aircraftRow.getByText("Бортовой номер")).toHaveCount(0);
|
||||
await expect(aircraftRow.getByText("89104")).toHaveCount(0);
|
||||
await expect(link).toHaveAttribute(
|
||||
"href",
|
||||
"http://www.aeroflot.ru/cms/ru/flight/plane_park",
|
||||
|
||||
Reference in New Issue
Block a user