rename test-release to test-documentation

This commit is contained in:
Martin Aeschlimann 2019-09-02 17:57:22 +02:00
parent ea4bd25cc5
commit 163d8c5aad
4 changed files with 17 additions and 18 deletions

View file

@ -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

View file

@ -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 "$@"

View file

@ -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 --- >
@ -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 --- >

View file

@ -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';
@ -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';
@ -34,15 +29,11 @@ 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))!;
@ -50,9 +41,13 @@ suite('Color Registry', function () {
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);
@ -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');