fix(downloads): an upload's cancel, progress, failure and notice speak of an upload
- Cancelling an upload asks "Delete upload?" and says the uploaded file is
removed from the server with it.
- The phone-safe conversion's real ffmpeg % shows as a bar ("Converting for
phones"), not an indeterminate pulse.
- A failed upload is titled "The upload isn't ready", with its own reasons
(convert_failed, retryable; upload_missing) instead of download copy.
- The inbox says "Upload ready to share" for a converted upload.
This commit is contained in:
@@ -292,3 +292,27 @@ describe("DownloadRow · no picture", () => {
|
||||
expect(container.querySelector("svg.lucide-film")).not.toBeNull();
|
||||
});
|
||||
});
|
||||
|
||||
// The phone-safe conversion reports ffmpeg's real progress, so it gets the % bar a download has;
|
||||
// a yt-dlp post-step reports none and keeps the pulse.
|
||||
describe("DownloadRow · a running conversion", () => {
|
||||
const running = (phase: string): DownloadJob => ({
|
||||
...baseJob,
|
||||
status: "running",
|
||||
progress: 40,
|
||||
phase,
|
||||
});
|
||||
|
||||
it("shows its phase and its %", () => {
|
||||
const { container } = render(<DownloadRow job={running("converting")} />);
|
||||
expect(screen.getByText("downloads.phase.converting")).toBeTruthy();
|
||||
expect(screen.getByText("40%")).toBeTruthy();
|
||||
expect(container.querySelector(".animate-pulse")).toBeNull();
|
||||
});
|
||||
|
||||
it("a post-step with no % keeps the pulse", () => {
|
||||
const { container } = render(<DownloadRow job={running("merging")} />);
|
||||
expect(screen.queryByText("40%")).toBeNull();
|
||||
expect(container.querySelector(".animate-pulse")).not.toBeNull();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user