fix: review round 1 — row press after a rename, related reset, dead items on removal, honest Prev/Next

- A press that begins while a field in the row is edited only ends the editing (rowOpen latches it
  at pointerdown); the card layout's row press is now tested.
- A related video reset in the player forgets the session's stored position.
- Removing the playing video passes over known-dead items and steps the way it went.
- Prev/Next off only because of dead items stay focusable and say why (HU/EN).
- The docked bar's scroller leaves room for focus rings.
- A focus-opened About card is not closed by its own scroll into view.
- EN "Clear watch progress" for the video reset, distinct from a page's "Reset view".
- The signed-out title read goes to the page yt-dlp read; the retitle writes are conditional.
- Tests: the cap of three errors, the bar's own Fullscreen, the group glyph, the backfill's reads.
This commit is contained in:
2026-11-01 05:36:59 +01:00
parent 245c0a2019
commit c910cf2f20
25 changed files with 411 additions and 63 deletions
@@ -53,6 +53,8 @@ async function mount() {
return screen.findByTestId("plex-show");
}
// The group's glyph, not the trigger's own chevron: the glyph sits in its aria-hidden wrapper.
const glyph = (el: HTMLElement) => el.querySelector('[aria-hidden="true"] > svg');
const sortTrigger = () =>
screen
.getAllByRole("button")
@@ -63,7 +65,7 @@ describe("PlexBrowse toolbar", () => {
const pill = await mount();
// The key of a value ("plex.filter.showOpt.all") holds the group's key: test the visible text.
expect(pill.textContent).toBe("plex.filter.showOpt.all");
expect(pill.querySelector("svg")).not.toBeNull();
expect(glyph(pill)).not.toBeNull();
expect(pill.getAttribute("title")).toBe("plex.filter.show");
expect(pill.getAttribute("aria-label")).toMatch(/^plex\.filter\.show: /);
});
@@ -72,6 +74,7 @@ describe("PlexBrowse toolbar", () => {
const pill = await mount();
const sort = sortTrigger();
expect(sort.textContent).not.toContain("plex.filter.sort");
expect(glyph(sort)).not.toBeNull();
expect(sort.getAttribute("title")).toBe("plex.filter.sort");
expect(pill.parentElement!.contains(sort)).toBe(true);
});