Behaviour SwRS-MDOKFSTUDIO-LIFE-001
The extension activates only on its own entry points
When VS Code loads the extension manifest, the extension SHALL declare VS Code 1.95 as its lowest supported version and as its only activation events the two Studio commands, the Studio Open With editor, the Studio preview panel serializer and the Markdown language, and start only its registrations and the restore of the editor association at activation, leaving the preview engine, the watchers and the diagnostics to the first Studio preview, and contribute no command whose identifier starts with markdown. and no language and no grammar, so that the built-in Markdown support is neither activated nor replaced, and declare that it supports the VS Code Agents window, so that VS Code enables it there without a user setting.
Part of StRS-MDOKFSTUDIO-LIFE-001, outside the paths drawn on its map.
Scenarios 5
The situations the tests check; open one to read it.
nominalA Studio command runs
boundaryA Markdown file alone
boundaryManifest contract
| Input | Outcome |
|---|---|
| engines field of the manifest | engines.vscode is ^1.95.0 |
| a VS Code older than 1.95, a reader tries to install the extension | VS Code refuses the install because the engine range is not met (deduced from VS Code behaviour, not run) |
| contributes section serialized | no markdown. identifier among the contributed commands (unit test "contributes only opt-in Markdown OKF-Schema Studio commands") |
| built-in Markdown extension, its commands read | the Studio command id is not among them (integration test test/integration/stockCoexistence.test.ts) |
| contributes section read | no languages key and no grammars key (unit test "contributes only opt-in Markdown OKF-Schema Studio commands") |
| the Studio installed beside the built-in Markdown extension | the built-in Markdown language and grammar are untouched, because the Studio contributes none |
nominalStudio in the Agents window
boundaryWhat VS Code reads
| Input | Outcome |
|---|---|
| capabilities.agentsWindow.supported in package.json | true |
| A manifest without the declaration, or with another value | The check fails (VS Code then disables the installed extension in the Agents window unless the user lists it in the extensions.supportAgentsWindow setting) |
| The extension loaded from a development path | Not a test of the declaration: VS Code enables a development extension in the Agents window either way |