@@ -760,13 +724,6 @@ export function ContextMenu() { })}
, ); - const choices = watchedState.loading - ? [] - : summary?.status === "watched" - ? [false] - : summary?.status === "unwatched" - ? [true] - : [true, false]; choices.forEach((on, index) => items.push(
+
+
+
`);
- for (const id of ["dialog", "editor", "player", "reader", "custom", "frame"])
+ for (const id of ["dialog", "editor", "player", "reader", "custom", "frame", "image", "backdrop"])
assert.equal(isPageContextBackground(dom.window.document.getElementById(id)), false, id);
assert.equal(isPageContextBackground(null), false);
dom.window.close();
diff --git a/tests/context-quick-actions.test.ts b/tests/context-quick-actions.test.ts
index 12a7286e3..4670988ff 100644
--- a/tests/context-quick-actions.test.ts
+++ b/tests/context-quick-actions.test.ts
@@ -1,120 +1,75 @@
-// @ts-expect-error Node test types are outside browser config.
import assert from "node:assert/strict";
-// @ts-expect-error Node test types are outside browser config.
import test from "node:test";
import {
contextNavigationFooter,
partitionContextActions,
} from "../src/lib/context-quick-actions.ts";
-test("unsupported image copy is omitted from the strip without inventing paste", () => {
- const result = partitionContextActions(
- [],
- [{ id: "image:copy", label: "Copy Image", disabled: true }],
- [],
- );
- assert.deepEqual(result.quick, []);
-});
+const back = { id: "page:back", label: "Back", disabled: true };
+const settings = { id: "page:go:settings", label: "Settings", run: () => {} };
+const nav = [
+ back,
+ { id: "page:go-to", label: "Go to", children: [settings, { id: "page:go:home", label: "Home" }] },
+ { id: "page:my-profile", label: "Open my profile" },
+ { id: "page:refresh", label: "Refresh" },
+];
+const background = {
+ kind: "actions",
+ id: "page:home",
+ label: "Page actions",
+ scope: "page-background",
+ actions: () => nav,
+};
+const partition = partitionContextActions as (
+ ...args: any[]
+) => ReturnType