fix(downloads): a suspended user's queued jobs wait, and a clip too big for the space left says so
A suspension now blocks the user's downloads as quota.resolve already advised: the worker leaves their queued jobs unclaimed until it is lifted (the confirm says so). A cut clip larger than the remaining storage is refused with its own message (not "storage is full"), and a clip's quota refusal reads as a clip's in both languages. The cancel poll compares to JobStatus.RUNNING.
This commit is contained in:
@@ -84,6 +84,22 @@ describe("failTitleKey", () => {
|
||||
}
|
||||
});
|
||||
|
||||
it("a clip refused for storage says so of a clip, and not that the quota is used up", async () => {
|
||||
// Refused before it is cut (nothing left) or after (the cut is bigger than what is left): one
|
||||
// sentence true of both, worded for a clip and naming the clip-side way out.
|
||||
for (const job_kind of ["clip", "edit"] as const) {
|
||||
const clip = { error_code: "quota_exceeded", error_detail: null, job_kind } as const;
|
||||
for (const lng of ["en", "hu"]) {
|
||||
await i18n.changeLanguage(lng);
|
||||
for (const part of ["short", "body"] as const) {
|
||||
const own = i18n.t(failCopyKeys(clip, part));
|
||||
expect(own).not.toMatch(/^downloads\./);
|
||||
expect(own).not.toBe(i18n.t(`downloads.errors.fail.cat.quota_exceeded.${part}`));
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
it("a clip that fails for no known reason says so of a clip, in both languages", async () => {
|
||||
// Not "Couldn't download / Something went wrong with this download" — nothing was downloaded.
|
||||
const clip = { error_code: "unknown", error_detail: null, job_kind: "edit" } as const;
|
||||
|
||||
Reference in New Issue
Block a user