mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
Fix missing icon and add test (#8307)
* Fix missing icon and add test * Remove debug statement
This commit is contained in:
27
src/sql/base/test/node/ui/codicon.test.ts
Normal file
27
src/sql/base/test/node/ui/codicon.test.ts
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
/*---------------------------------------------------------------------------------------------
|
||||||
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
import * as assert from 'assert';
|
||||||
|
import { readFile } from 'vs/base/node/pfs';
|
||||||
|
import { join } from 'vs/base/common/path';
|
||||||
|
import { URI } from 'vs/base/common/uri';
|
||||||
|
|
||||||
|
const icons: string[] = [
|
||||||
|
'codicon-chevron-down',
|
||||||
|
'codicon-chevron-up',
|
||||||
|
'codicon-clear-all',
|
||||||
|
'codicon-debug-pause',
|
||||||
|
'codicon-play'
|
||||||
|
];
|
||||||
|
|
||||||
|
suite('codicon css', () => {
|
||||||
|
test('codicon.css contains expected icons', async () => {
|
||||||
|
const codiconFile = await readFile(join(URI.parse(__dirname).fsPath, '..', '..', '..', '..', '..', 'vs', 'base', 'browser', 'ui', 'codiconLabel', 'codicon', 'codicon.css'));
|
||||||
|
icons.forEach(icon => {
|
||||||
|
assert.ok(codiconFile.includes(icon), `codicon.css did not contain expected icon ${icon}`);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
@@ -127,7 +127,7 @@ export class ToggleQueryHistoryCaptureAction extends Action {
|
|||||||
|
|
||||||
private setClassAndLabel(enabled: boolean) {
|
private setClassAndLabel(enabled: boolean) {
|
||||||
if (enabled) {
|
if (enabled) {
|
||||||
this.class = 'toggle-query-history-capture-action codicon-pause';
|
this.class = 'toggle-query-history-capture-action codicon-debug-pause';
|
||||||
this.label = localize('queryHistory.disableCapture', "Pause Query History Capture");
|
this.label = localize('queryHistory.disableCapture', "Pause Query History Capture");
|
||||||
} else {
|
} else {
|
||||||
this.class = 'toggle-query-history-capture-action codicon-play';
|
this.class = 'toggle-query-history-capture-action codicon-play';
|
||||||
|
|||||||
Reference in New Issue
Block a user