fix(ui): reconcile shared accessibility and read recovery
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user