fix(plex): a matched episode and a collection member offer Details in their menu
Their titles open the item's page, a pointer-only door; the card menu is the keyboard's.
This commit is contained in:
@@ -411,4 +411,18 @@ describe("a collection strip's card", () => {
|
||||
fireEvent.click(restart.find((r) => r.textContent === "card.restartTitle")!);
|
||||
await vi.waitFor(() => expect(onPlayItem).toHaveBeenCalledWith("m2", true));
|
||||
});
|
||||
|
||||
// Its title opens the member's page, a pointer's door: the menu offers the same to the keyboard.
|
||||
it("opens the member's page from its menu, as its title does", async () => {
|
||||
const onOpenInfo = vi.fn();
|
||||
wrap(
|
||||
<PlexInfo detail={withColl} variant="page" onPlayItem={vi.fn()} onOpenInfo={onOpenInfo} />,
|
||||
);
|
||||
const strip = screen.getByRole("heading", { name: "The Collection" }).parentElement!
|
||||
.parentElement!;
|
||||
fireEvent.click(strip.querySelector<HTMLButtonElement>("button[aria-haspopup]")!);
|
||||
const rows = await screen.findAllByRole("menuitem", { hidden: true });
|
||||
fireEvent.click(rows.find((r) => r.textContent === "plex.info.title")!);
|
||||
await vi.waitFor(() => expect(onOpenInfo).toHaveBeenCalledWith("m2"));
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user