fix(ui,i18n): E30 review round 2 — honest bio failure, a full show summary, one HU name per thing
- Person page: a bio ask that fails says so with a retry instead of reading as 'no biography'. - Show page: the summary is a ClampedText (5 lines + More), like the person and collection pages; one More/Less pair (plex.textMore/textLess) for all three. - Channels: a re-slotted row is placed in the language the server orders by (the stored preference, else English), not the UI's guess. - A skipped run's body is only the reason (its title already says skipped). - HU: Behúzási kvótatartalék; Eseménynapló ürítve / az eseménynaplót; indok; közvetlenül játszható / közvetlen közvetítés in the Plex hints. - Tests: ClampedText re-measures on a resize, the show summary clamp, serverOrderLang.
This commit is contained in:
@@ -132,3 +132,28 @@ describe("the restart button on a show and a season", () => {
|
||||
expect(onPlay).toHaveBeenCalledWith("e11", ALL, true);
|
||||
});
|
||||
});
|
||||
|
||||
describe("the show page's summary (E30 review)", () => {
|
||||
it("is clamped with a More, so a long one can still be read in full", async () => {
|
||||
const tall = vi.spyOn(HTMLElement.prototype, "scrollHeight", "get").mockReturnValue(400);
|
||||
const box = vi.spyOn(HTMLElement.prototype, "clientHeight", "get").mockReturnValue(60);
|
||||
Object.assign(detail.show, { summary: "A long summary.\n\nThat goes on." });
|
||||
try {
|
||||
wrap(
|
||||
<PlexShowView
|
||||
showId="show"
|
||||
onBack={() => {}}
|
||||
onPlay={() => {}}
|
||||
onOpenSeason={() => {}}
|
||||
onOpenShow={() => {}}
|
||||
/>,
|
||||
);
|
||||
fireEvent.click(await screen.findByText("plex.textMore"));
|
||||
expect(screen.getByText("plex.textLess").getAttribute("aria-expanded")).toBe("true");
|
||||
} finally {
|
||||
tall.mockRestore();
|
||||
box.mockRestore();
|
||||
Object.assign(detail.show, { summary: undefined });
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user