fix(downloads): keep active priority menu stable
Treat the selected priority as a disabled no-op so clicking it no longer closes the context menu. Reorder packages consistently across high, normal, and low priority groups while preserving stable order within each group. Add regression coverage for all priority transitions and the active menu state.
This commit is contained in:
@@ -1171,6 +1171,12 @@ describe("downloads view", () => {
|
||||
});
|
||||
|
||||
describe("downloads App integration", () => {
|
||||
it("keeps the priority menu open when the selected priority is already active", () => {
|
||||
const source = readFileSync(new URL("../src/renderer/App.tsx", import.meta.url), "utf8").replaceAll("\r\n", "\n");
|
||||
|
||||
expect(source).toMatch(/disabled=\{allMatch\}[\s\S]{0,260}window\.rd\.setPackagePriority/);
|
||||
});
|
||||
|
||||
it("updates the clipboard checkbox optimistically before IPC reconciliation", () => {
|
||||
const source = readFileSync(new URL("../src/renderer/App.tsx", import.meta.url), "utf8").replaceAll("\r\n", "\n");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user