feat(interviews): add durable debrief loop
This commit is contained in:
@@ -102,6 +102,24 @@ test("adding a prep item posts the chosen category and title", async () => {
|
||||
));
|
||||
});
|
||||
|
||||
test("starts a structured interview debrief without inventing answers", async () => {
|
||||
routeGet();
|
||||
mockedApi.post.mockResolvedValue({ data: board.groups[0].items[0] } as any);
|
||||
render(<ApplicationInterviewPrep jobId={7} />);
|
||||
|
||||
fireEvent.click(await screen.findByRole("button", { name: "Start debrief" }));
|
||||
|
||||
await waitFor(() => expect(mockedApi.post).toHaveBeenCalledWith(
|
||||
"/jobapplications/7/interview-prep",
|
||||
{
|
||||
category: "debrief",
|
||||
title: "Interview debrief",
|
||||
content: expect.stringContaining("Questions asked:"),
|
||||
},
|
||||
));
|
||||
expect(mockedApi.post.mock.calls[0][1].content).not.toMatch(/Acme|achievement|metric/i);
|
||||
});
|
||||
|
||||
test("marking an item ready patches it", async () => {
|
||||
routeGet();
|
||||
mockedApi.patch.mockResolvedValue({ data: board.groups[1].items[0] } as any);
|
||||
|
||||
Reference in New Issue
Block a user