Disable codeql test commands from the command palette

These commands are not applicable from the global context. They require
an argument to be passed in. So, they should be hidden in the command
palette.
This commit is contained in:
Andrew Eisenberg 2020-11-03 13:31:46 -08:00
Родитель 9ddfd58a2b
Коммит b2b1021207
2 изменённых файлов: 11 добавлений и 5 удалений

Просмотреть файл

@ -355,11 +355,11 @@
},
{
"command": "codeQLTests.showOutputDifferences",
"title": "CodeQL: Show Test Output Differences"
"title": "Show Test Output Differences"
},
{
"command": "codeQLTests.acceptOutput",
"title": "CodeQL: Accept Test Output"
"title": "Accept Test Output"
},
{
"command": "codeQLAstViewer.gotoCode",
@ -628,6 +628,14 @@
{
"command": "codeQLAstViewer.clear",
"when": "false"
},
{
"command": "codeQLTests.acceptOutput",
"when": "false"
},
{
"command": "codeQLTests.showOutputDifferences",
"when": "false"
}
],
"editor/context": [

Просмотреть файл

@ -32,7 +32,6 @@ describe('commands declared in package.json', function() {
if (
command.match(/^codeQL\./)
|| command.match(/^codeQLQueryResults\./)
|| command.match(/^codeQLTests\./)
) {
paletteCmds.add(command);
expect(title).not.to.be.undefined;
@ -42,6 +41,7 @@ describe('commands declared in package.json', function() {
command.match(/^codeQLDatabases\./)
|| command.match(/^codeQLQueryHistory\./)
|| command.match(/^codeQLAstViewer\./)
|| command.match(/^codeQLTests\./)
) {
scopedCmds.add(command);
expect(title).not.to.be.undefined;
@ -69,8 +69,6 @@ describe('commands declared in package.json', function() {
disabledInPalette.add(commandDecl.command);
});
it('should have commands appropriately prefixed', function() {
paletteCmds.forEach(command => {
expect(commandTitles[command], `command ${command} should be prefixed with 'CodeQL: ', since it is accessible from the command palette`).to.match(/^CodeQL: /);