fix(ui): reconcile shared accessibility and read recovery

This commit is contained in:
cesnimda
2026-10-20 20:26:48 +02:00
parent bba52af4b8
commit d8c0187305
25 changed files with 802 additions and 25 deletions
@@ -86,6 +86,19 @@ test("prep renders grouped items with progress and marks AI-sourced ones", async
expect(screen.getByText("From AI")).toBeInTheDocument();
});
test("delete tooltip describes its wrapper while the disabled button keeps its item name", async () => {
routeGet();
mockedApi.patch.mockReturnValueOnce(new Promise(() => {}));
render(<ApplicationInterviewPrep jobId={7} />);
const remove = await screen.findByRole("button", { name: "Delete: Funding history" });
expect(remove.parentElement).not.toHaveAttribute("aria-label");
fireEvent.click(screen.getByRole("checkbox", { name: "Ready: Funding history" }));
expect(remove).toBeDisabled();
fireEvent.mouseOver(remove.parentElement!);
expect(await screen.findByRole("tooltip")).toHaveTextContent("Delete");
expect(mockedApi.delete).not.toHaveBeenCalled();
});
test("adding a prep item posts the chosen category and title", async () => {
routeGet();
mockedApi.post.mockResolvedValue({ data: board.groups[0].items[0] } as any);