Rollen Chunk 5: Genehmigungs-Status mit Eigen-UI
This commit is contained in:
1 parent
0729864f73
commit
f97b2fffdc
1 file changed
+23
@@ -16,6 +16,7 @@ test("books a half-day for one date", async () => {
|
||||
startDate: "2026-04-13",
|
||||
endDate: "2026-04-13",
|
||||
dayFraction: "half",
|
||||
status: "bestätigt" as const,
|
||||
units: 1,
|
||||
});
|
||||
render(<VacationForm />);
|
||||
@@ -54,3 +55,25 @@ test("applies a preset range from the calendar", () => {
|
||||
expect(screen.getByLabelText("Von")).toHaveValue("2026-04-13");
|
||||
expect(screen.getByLabelText("Bis")).toHaveValue("2026-04-17");
|
||||
});
|
||||
|
||||
test("meldet Anfrage statt Buchung bei beantragt", async () => {
|
||||
mockSave.mockResolvedValue({
|
||||
id: 9,
|
||||
startDate: "2026-07-06",
|
||||
endDate: "2026-07-06",
|
||||
dayFraction: "full",
|
||||
status: "beantragt",
|
||||
units: 2,
|
||||
});
|
||||
render(<VacationForm />);
|
||||
fireEvent.change(screen.getByLabelText("Von"), {
|
||||
target: { value: "2026-07-06" },
|
||||
});
|
||||
fireEvent.change(screen.getByLabelText("Bis"), {
|
||||
target: { value: "2026-07-06" },
|
||||
});
|
||||
fireEvent.click(screen.getByRole("button", { name: "Urlaub buchen" }));
|
||||
expect(
|
||||
await screen.findByText("Angefragt: 1 Tag (wartet auf Bestätigung)."),
|
||||
).toBeInTheDocument();
|
||||
});
|
||||
Reference in new issue
Block a user