A2: tests follow history.show being registered next to A1's tab menu
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
07ec4f8f1c
commit
4c3d5cc460
2 changed files with 2 additions and 6 deletions
|
|
@ -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 });
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue