fix(downloads): GIF review round 2 — cap as sent, shown length, retry, Join reason
The panels judge a GIF's length in whole milliseconds between the ends as sent, the server's own rule, and a refused length reads rounded up. A shared picture says it failed only once its retry failed too. Join's reason shows on a key's focus; the editor's failure toasts name GIFs. The edit route's cap is test-held, and DESIGN.md records the GIF UI.
This commit is contained in:
@@ -197,6 +197,12 @@ describe("WatchPage media element", () => {
|
||||
});
|
||||
const page = render(<WatchPage />);
|
||||
fireEvent.error(await page.findByRole("img", { name: "Gone" }));
|
||||
// The first miss may be a hiccup: nothing is said while the retry waits…
|
||||
expect(page.queryByRole("status")).toBeNull();
|
||||
// …and when the retry fails too, the page says so.
|
||||
const retry = await page.findByRole("img", { name: "Gone" }, { timeout: 3000 });
|
||||
expect(retry.getAttribute("src")).toBe("/gone.gif?r=1");
|
||||
fireEvent.error(retry);
|
||||
expect((await page.findByRole("status")).textContent).toBe("Couldn't load the picture.");
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user