Hide board number in flight details
This commit is contained in:
@@ -67,22 +67,12 @@ describe("AircraftPanel", () => {
|
||||
expect(screen.getByTestId("aircraft-panel")).toBeTruthy();
|
||||
});
|
||||
|
||||
// §4.1.15.4: tail number (registration mark) in aircraft panel
|
||||
it("4.1.15.4-TailNumber: renders tail number when aircraft.registration is present", () => {
|
||||
it("TIRREDESIGN-29: omits tail number when aircraft.registration is present", () => {
|
||||
const eq: IEquipmentFull = {
|
||||
aircraft: { actual: { title: "Airbus A320", registration: "VP-BQS" } },
|
||||
};
|
||||
render(<AircraftPanel equipment={eq} />);
|
||||
expect(screen.getByText("VP-BQS")).toBeTruthy();
|
||||
// label key is AIRPLANE.TAIL-NUMBER (t mock returns key)
|
||||
expect(screen.getByText("AIRPLANE.TAIL-NUMBER")).toBeTruthy();
|
||||
});
|
||||
|
||||
it("4.1.15.4-TailNumber-Absent: omits tail-number row when registration is not present", () => {
|
||||
const eq: IEquipmentFull = {
|
||||
aircraft: { actual: { title: "Airbus A320" } },
|
||||
};
|
||||
render(<AircraftPanel equipment={eq} />);
|
||||
expect(screen.queryByText("VP-BQS")).toBeNull();
|
||||
expect(screen.queryByText("AIRPLANE.TAIL-NUMBER")).toBeNull();
|
||||
});
|
||||
|
||||
|
||||
@@ -112,11 +112,6 @@ export const AircraftPanel: FC<AircraftPanelProps> = ({
|
||||
className?: string;
|
||||
}> = [];
|
||||
if (aircraft?.name) props.push({ label: t("AIRPLANE.NAME"), value: aircraft.name });
|
||||
// §4.1.15.4: tail number (registration mark, e.g. "VP-BQS") from the
|
||||
// aircraft.actual.registration field. Shown when present.
|
||||
if (aircraft?.registration) {
|
||||
props.push({ label: t("AIRPLANE.TAIL-NUMBER"), value: aircraft.registration });
|
||||
}
|
||||
if (total > 0) props.push({ label: t("AIRPLANE.SEATS-TOTAL"), value: total });
|
||||
if (economy > 0) props.push({ label: t("AIRPLANE.SEATS-ECONOMY"), value: economy });
|
||||
if (comfort > 0) props.push({ label: t("AIRPLANE.SEATS-COMFORT"), value: comfort });
|
||||
|
||||
Reference in New Issue
Block a user