fix(design): an audit of the S3d claims — the float shadow, filter hints, one action size per row (E28 S3d)
- A glass role's shadow is one token (shadow-float); the header search's drop-shadow utility had replaced its top highlight, and the debug pill's shadow-lg did the same. The surface-role lint rule now refuses a shadow size beside a role. - Plex: every value that filters carries a hint (genre, certificate, studio had none), and the facts panel's year and certificate filter like the header's. filterKeyword -> filterValue. - Downloads: the row resized its buttons with a [&_button] override that the save link escaped (28px beside 32px); the size is the primitive's md rung now.
This commit is contained in:
@@ -101,6 +101,26 @@ describe("PlexInfo enriched detail (page)", () => {
|
||||
expect(onFilter).toHaveBeenCalledWith({ keywords: ["heist"] });
|
||||
});
|
||||
|
||||
// E28: every value that filters says so on hover — the genre, certificate and studio had no hint
|
||||
// while the keyword and the year did — and a value filters in the facts panel as in the header.
|
||||
it("every filtering value carries a filter hint", () => {
|
||||
wrap(<PlexInfo detail={detail} variant="page" onFilter={() => {}} />);
|
||||
for (const v of ["heist", "Crime", "R", "Studio A"])
|
||||
for (const el of screen.getAllByText(v))
|
||||
expect(el.closest("[title]")?.getAttribute("title")).toBe(`plex.info.filterValue:${v}`);
|
||||
});
|
||||
|
||||
it("the facts panel's year and certificate filter like the header's", () => {
|
||||
const onFilter = vi.fn();
|
||||
wrap(<PlexInfo detail={detail} variant="page" onFilter={onFilter} />);
|
||||
const [, factsCert] = screen.getAllByText("R");
|
||||
fireEvent.click(factsCert!);
|
||||
expect(onFilter).toHaveBeenLastCalledWith({ contentRatings: ["R"] });
|
||||
const [, factsYear] = screen.getAllByText("2010");
|
||||
fireEvent.click(factsYear!);
|
||||
expect(onFilter).toHaveBeenLastCalledWith({ yearMin: 2010, yearMax: 2010 });
|
||||
});
|
||||
|
||||
it("crew members open the person page on click", () => {
|
||||
const onOpenPerson = vi.fn();
|
||||
wrap(<PlexInfo detail={detail} variant="page" onOpenPerson={onOpenPerson} />);
|
||||
|
||||
Reference in New Issue
Block a user