Skip to content

Commit

Permalink
rename test-release to test-documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
aeschli committed Sep 2, 2019
1 parent ea4bd25 commit 163d8c5
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 18 deletions.
2 changes: 2 additions & 0 deletions scripts/test-release.bat → scripts/test-documentation.bat
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
@echo off
setlocal

echo Runs tests against the current documentation in https://github.com/microsoft/vscode-docs/tree/vnext

pushd %~dp0\..

:: Endgame tests in AMD
Expand Down
2 changes: 2 additions & 0 deletions scripts/test-release.sh → scripts/test-documentation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ fi

cd $ROOT

echo "Runs tests against the current documentation in https://github.com/microsoft/vscode-docs/tree/vnext"

# Tests in AMD
./scripts/test.sh --runGlob **/*.releaseTest.js "$@"

Expand Down
8 changes: 4 additions & 4 deletions src/vs/workbench/common/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -383,13 +383,13 @@ export const EXTENSION_BADGE_REMOTE_BACKGROUND = registerColor('extensionBadge.r
dark: ACTIVITY_BAR_BADGE_BACKGROUND,
light: ACTIVITY_BAR_BADGE_BACKGROUND,
hc: ACTIVITY_BAR_BADGE_BACKGROUND
}, nls.localize('extensionBadge.remoteBackground', "Background color for the remote badge in the extensions view"));
}, nls.localize('extensionBadge.remoteBackground', "Background color for the remote badge in the extensions view."));

export const EXTENSION_BADGE_REMOTE_FOREGROUND = registerColor('extensionBadge.remoteForeground', {
dark: ACTIVITY_BAR_BADGE_FOREGROUND,
light: ACTIVITY_BAR_BADGE_FOREGROUND,
hc: ACTIVITY_BAR_BADGE_FOREGROUND
}, nls.localize('extensionBadge.remoteForeground', "Foreground color for the remote badge in the extensions view"));
}, nls.localize('extensionBadge.remoteForeground', "Foreground color for the remote badge in the extensions view."));


// < --- Side Bar --- >
Expand Down Expand Up @@ -449,13 +449,13 @@ export const QUICK_INPUT_BACKGROUND = registerColor('quickInput.background', {
dark: SIDE_BAR_BACKGROUND,
light: SIDE_BAR_BACKGROUND,
hc: SIDE_BAR_BACKGROUND
}, nls.localize('quickInputBackground', "Quick Input background color. The Quick Input widget is the container for views like the color theme picker"));
}, nls.localize('quickInputBackground', "Quick Input background color. The Quick Input widget is the container for views like the color theme picker."));

export const QUICK_INPUT_FOREGROUND = registerColor('quickInput.foreground', {
dark: SIDE_BAR_FOREGROUND,
light: SIDE_BAR_FOREGROUND,
hc: SIDE_BAR_FOREGROUND
}, nls.localize('quickInputForeground', "Quick Input foreground color. The Quick Input widget is the container for views like the color theme picker"));
}, nls.localize('quickInputForeground', "Quick Input foreground color. The Quick Input widget is the container for views like the color theme picker."));

// < --- Title Bar --- >

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,7 @@

import { Registry } from 'vs/platform/registry/common/platform';
import { IColorRegistry, Extensions, ColorContribution } from 'vs/platform/theme/common/colorRegistry';
import { editorMarkerNavigationError } from 'vs/editor/contrib/gotoError/gotoErrorWidget';
import { overviewRulerModifiedForeground } from 'vs/workbench/contrib/scm/browser/dirtydiffDecorator';
import { STATUS_BAR_DEBUGGING_BACKGROUND } from 'vs/workbench/contrib/debug/browser/statusbarColorProvider';
import { debugExceptionWidgetBackground } from 'vs/workbench/contrib/debug/browser/exceptionWidget';
import { debugToolBarBackground } from 'vs/workbench/contrib/debug/browser/debugToolBar';
import { buttonBackground } from 'vs/workbench/contrib/welcome/page/browser/welcomePage';
import { embeddedEditorBackground } from 'vs/workbench/contrib/welcome/walkThrough/browser/walkThroughPart';

import { asText } from 'vs/platform/request/common/request';
import * as pfs from 'vs/base/node/pfs';
import * as path from 'vs/base/common/path';
Expand All @@ -20,6 +14,7 @@ import { getPathFromAmdModule } from 'vs/base/common/amd';
import { CancellationToken } from 'vs/base/common/cancellation';
import { RequestService } from 'vs/platform/request/node/requestService';
import { TestConfigurationService } from 'vs/platform/configuration/test/common/testConfigurationService';
import 'vs/workbench/workbench.desktop.main';
import { NullLogService } from 'vs/platform/log/common/log';


Expand All @@ -34,25 +29,25 @@ interface DescriptionDiff {
specDescription: string;
}

// add artificial dependencies to some files that are not loaded yet
export const forceColorLoad = [editorMarkerNavigationError, overviewRulerModifiedForeground, STATUS_BAR_DEBUGGING_BACKGROUND,
debugExceptionWidgetBackground, debugToolBarBackground, buttonBackground, embeddedEditorBackground];

export const experimental: string[] = []; // 'settings.modifiedItemForeground', 'editorUnnecessary.foreground' ];

suite('Color Registry', function () {

test('all colors documented', async function () {
test('all colors documented in theme-color.md', async function () {
const reqContext = await new RequestService(new TestConfigurationService(), new NullLogService()).request({ url: 'https://raw.githubusercontent.com/microsoft/vscode-docs/vnext/api/references/theme-color.md' }, CancellationToken.None);
const content = (await asText(reqContext))!;

const expression = /\-\s*\`([\w\.]+)\`: (.*)/g;

let m: RegExpExecArray | null;
let colorsInDoc: { [id: string]: ColorInfo } = Object.create(null);
let nColorsInDoc = 0;
while (m = expression.exec(content)) {
colorsInDoc[m[1]] = { description: m[2], offset: m.index, length: m.length };
nColorsInDoc++;
}
assert.ok(nColorsInDoc > 0, 'theme-color.md contains to color descriptions');

let missing = Object.create(null);
let descriptionDiffs: { [id: string]: DescriptionDiff } = Object.create(null);

Expand Down Expand Up @@ -88,8 +83,8 @@ suite('Color Registry', function () {
}
}

let undocumentedKeys = Object.keys(missing).map(k => `${k}: ${missing[k]}`);
assert.deepEqual(undocumentedKeys, [], 'Undocumented colors ids in ' + content);
let undocumentedKeys = Object.keys(missing).map(k => `\`${k}\`: ${missing[k]}`);
assert.deepEqual(undocumentedKeys, [], 'Undocumented colors ids');

let superfluousKeys = Object.keys(colorsInDoc);
assert.deepEqual(superfluousKeys, [], 'Colors ids in doc that do not exist');
Expand Down

0 comments on commit 163d8c5

Please sign in to comment.