Title the new-diagram command New Diagram Archify… (0.4.1)

The Explorer folder menu shows a command's title without its category,
so it read just "New Diagram…". The title now names Archify itself and
the category is dropped, so the Command Palette shows the same text.
Integration test asserts the title.
This commit is contained in:
2026-10-04 21:49:54 +03:00
parent 6f6ffae96f
commit 8d8fc6f65e
6 changed files with 20 additions and 12 deletions
+6 -1
View File
@@ -97,7 +97,12 @@ export async function run(): Promise<void> {
assert.ok(diagnostics[0].range.start.line >= 2, `reported on line ${diagnostics[0].range.start.line + 1}`);
});
await check('New Diagram creates a .archify file from a template and opens the diagram', async () => {
await check('New Diagram Archify creates a .archify file from a template and opens the diagram', async () => {
// Menus show the bare title, so it must name Archify by itself.
const commands = vscode.extensions.getExtension(EXTENSION_ID)?.packageJSON.contributes.commands as { command: string; title: string; category?: string }[];
const newDiagram = commands.find((item) => item.command === 'archify.newDiagram');
assert.equal(newDiagram?.title, 'New Diagram Archify…');
assert.equal(newDiagram?.category, undefined);
const folder = workspaceFile('.');
// Stub the template pick and the name prompt; check the name validation on the way.
const window = vscode.window as unknown as Record<string, unknown>;