diff --git a/scripts/test-release.bat b/scripts/test-documentation.bat similarity index 66% rename from scripts/test-release.bat rename to scripts/test-documentation.bat index cb9c3b205c6a2..c6990f8f3f011 100644 --- a/scripts/test-release.bat +++ b/scripts/test-documentation.bat @@ -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 diff --git a/scripts/test-release.sh b/scripts/test-documentation.sh similarity index 79% rename from scripts/test-release.sh rename to scripts/test-documentation.sh index f7a0800dc91e3..54a0672945a13 100755 --- a/scripts/test-release.sh +++ b/scripts/test-documentation.sh @@ -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 "$@" diff --git a/src/vs/workbench/common/theme.ts b/src/vs/workbench/common/theme.ts index 8e5e6dab3dbaa..86e791135afd8 100644 --- a/src/vs/workbench/common/theme.ts +++ b/src/vs/workbench/common/theme.ts @@ -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 --- > diff --git a/src/vs/workbench/test/electron-browser/colorRegistry.releaseTest.ts b/src/vs/workbench/test/electron-browser/colorRegistry.releaseTest.ts index 20ce23818c564..3ba7c797579f5 100644 --- a/src/vs/workbench/test/electron-browser/colorRegistry.releaseTest.ts +++ b/src/vs/workbench/test/electron-browser/colorRegistry.releaseTest.ts @@ -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');