diff --git a/ui/tests/editor/tabs.test.ts b/ui/tests/editor/tabs.test.ts index 54ed32b..2262c27 100644 --- a/ui/tests/editor/tabs.test.ts +++ b/ui/tests/editor/tabs.test.ts @@ -409,6 +409,7 @@ describe("pinning and closing", () => { COMMAND_IDS.closeUnmodified, COMMAND_IDS.reopenClosed, "pin", + "history.show", COMMAND_IDS.splitRight, COMMAND_IDS.splitDown, COMMAND_IDS.moveToOtherGroup, @@ -421,12 +422,9 @@ describe("pinning and closing", () => { }); describe("tab context menu and local history", () => { - it("shows Show Local History only while history.show exists and runs it with the path", async () => { + it("shows Show Local History (C10 A2 registers history.show) and runs it with the path", async () => { const area = await mountArea(); await openAll("a.php"); - await area.get("[data-test=editor-tab]").trigger("contextmenu", { clientX: 5, clientY: 5 }); - expect(area.find("[data-item='history.show']").exists()).toBe(false); - await area.get("[data-test=tab-menu]").trigger("keydown", { key: "Escape" }); const shown: unknown[] = []; useCommandsStore(pinia).provide("history.show", { run: (params) => void shown.push(params) }); await area.get("[data-test=editor-tab]").trigger("contextmenu", { clientX: 5, clientY: 5 }); diff --git a/ui/tests/history/LocalHistory.test.ts b/ui/tests/history/LocalHistory.test.ts index ea5d8d3..0154665 100644 --- a/ui/tests/history/LocalHistory.test.ts +++ b/ui/tests/history/LocalHistory.test.ts @@ -186,10 +186,8 @@ describe("Local History dialog", () => { }); it("refuses bad params and runs without a file", async () => { - await mountAll(); const history = useLocalHistoryStore(pinia); await expect(history.showCommand({ path: 3 })).rejects.toThrow("Show Local History takes"); - useEditorStore(pinia).activeId = null; await expect(history.showCommand({})).rejects.toThrow("Open or select a file"); }); });