optimized events
This commit is contained in:
@@ -26,6 +26,7 @@ describe("UpcomingEventsPanel", () => {
|
||||
expect.stringContaining("Brücke Mitte"),
|
||||
expect.stringContaining("Hafen Weit")
|
||||
]);
|
||||
expect(within(list).getAllByText("Infos")).toHaveLength(3);
|
||||
|
||||
fireEvent.click(screen.getByRole("button", { name: /Brücken/ }));
|
||||
expect(screen.getByRole("button", { name: /Brücken/ })).toHaveAttribute(
|
||||
@@ -81,6 +82,12 @@ describe("UpcomingEventsPanel", () => {
|
||||
expect(within(detail).getByText("3.8 m")).toBeVisible();
|
||||
const reserve = within(detail).getByText("Reserve").closest("div");
|
||||
expect(reserve).toHaveTextContent("0.4 m Reserve");
|
||||
expect(
|
||||
within(detail).getByRole("link", { name: "Brücke Mitte anrufen" })
|
||||
).toHaveAttribute("href", "tel:+4949123457");
|
||||
expect(
|
||||
within(detail).getByRole("link", { name: "Website von Brücke Mitte öffnen" })
|
||||
).toHaveAttribute("href", "https://bridge.example/");
|
||||
expect(within(detail).queryByRole("button", { name: "Auf Karte zeigen" })).not.toBeInTheDocument();
|
||||
});
|
||||
|
||||
@@ -180,7 +187,10 @@ const events: UpcomingRouteEvent[] = [
|
||||
requiredAirDraftM: 3.8,
|
||||
marginM: 0.4,
|
||||
status: "tight",
|
||||
source: "Test"
|
||||
source: "Test",
|
||||
phone: "+49 49 123457",
|
||||
website: "bridge.example",
|
||||
operator: "Brückenamt"
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user