test(release): strengthen production verification
CI and Deploy / test (pull_request) Successful in 5m35s
CI and Deploy / test (push) Successful in 5m17s
CI and Deploy / deploy (pull_request) Has been skipped
CI and Deploy / deploy (push) Failing after 8s

This commit is contained in:
cesnimda
2026-08-24 20:21:37 +02:00
parent 367b70681a
commit 44dba5d08d
16 changed files with 62 additions and 16 deletions
+4 -4
View File
@@ -12,7 +12,7 @@ afterEach(() => jest.clearAllMocks());
test("shows honest source metadata and offers the existing reviewed save flow", async () => {
mockedApi.get.mockResolvedValue({ data: [{ id: "abc", title: "Backend Developer", company: "Acme", location: "OSLO", modifiedAt: "2026-08-01T10:00:00Z", deadline: "2026-08-15T23:59:59Z", url: "https://arbeidsplassen.nav.no/stillinger/stilling/abc", source: "nav", sourceName: "NAV Arbeidsplassen", acquisitionType: "searched", retrievedAt: "2026-08-10T10:00:00Z", countryCode: "NO" }] } as any);
render(<MemoryRouter future={{ v7_startTransition: true, v7_relativeSplatPath: true }}><JobDiscoveryPage /></MemoryRouter>);
render(<MemoryRouter><JobDiscoveryPage /></MemoryRouter>);
fireEvent.change(screen.getByLabelText("Role or company"), { target: { value: "backend" } });
fireEvent.click(screen.getByRole("button", { name: "Search NAV" }));
@@ -27,7 +27,7 @@ test("shows honest source metadata and offers the existing reviewed save flow",
test("distinguishes the initial guidance from a completed empty search", async () => {
mockedApi.get.mockResolvedValue({ data: [] } as any);
render(<MemoryRouter future={{ v7_startTransition: true, v7_relativeSplatPath: true }}><JobDiscoveryPage /></MemoryRouter>);
render(<MemoryRouter><JobDiscoveryPage /></MemoryRouter>);
expect(screen.getByText("Search recent active vacancies by role, company, or municipality.")).toBeInTheDocument();
fireEvent.click(screen.getByRole("button", { name: "Search NAV" }));
@@ -38,7 +38,7 @@ test("distinguishes the initial guidance from a completed empty search", async (
test("retries the last submitted search after an error", async () => {
mockedApi.get.mockRejectedValueOnce(new Error("offline")).mockResolvedValueOnce({ data: [] } as any);
render(<MemoryRouter future={{ v7_startTransition: true, v7_relativeSplatPath: true }}><JobDiscoveryPage /></MemoryRouter>);
render(<MemoryRouter><JobDiscoveryPage /></MemoryRouter>);
fireEvent.change(screen.getByLabelText("Role or company"), { target: { value: " utvikler " } });
fireEvent.change(screen.getByLabelText("Municipality"), { target: { value: " Oslo " } });
@@ -54,7 +54,7 @@ test("sorts returned vacancies by title", async () => {
{ id: "2", title: "Zoologist", url: "https://arbeidsplassen.nav.no/2", source: "nav", countryCode: "NO" },
{ id: "1", title: "Analyst", url: "https://arbeidsplassen.nav.no/1", source: "nav", countryCode: "NO" },
] } as any);
render(<MemoryRouter future={{ v7_startTransition: true, v7_relativeSplatPath: true }}><JobDiscoveryPage /></MemoryRouter>);
render(<MemoryRouter><JobDiscoveryPage /></MemoryRouter>);
fireEvent.click(screen.getByRole("button", { name: "Search NAV" }));
await screen.findByText("2 vacancies found");