tests - disable getting started in integration tests and smoke tests (#125808)

* tests - disable getting started in integration tests and smoke tests

* --skip-getting-started => --skip-welcome

Co-authored-by: Jackson Kearl <jakearl@microsoft.com>
This commit is contained in:
Benjamin Pasero 2021-06-09 20:36:42 +02:00 committed by GitHub
parent c6f3512edd
commit 33f84b36fd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 18 additions and 4 deletions

View file

@ -46,7 +46,7 @@ if %errorlevel% neq 0 exit /b %errorlevel%
:: Tests in the extension host
set ALL_PLATFORMS_API_TESTS_EXTRA_ARGS=--disable-telemetry --crash-reporter-directory=%VSCODECRASHDIR% --no-sandbox --no-cached-data --disable-updates --disable-keytar --disable-extensions --disable-workspace-trust --user-data-dir=%VSCODEUSERDATADIR%
set ALL_PLATFORMS_API_TESTS_EXTRA_ARGS=--disable-telemetry --skip-welcome --crash-reporter-directory=%VSCODECRASHDIR% --no-cached-data --disable-updates --disable-keytar --disable-extensions --disable-workspace-trust --user-data-dir=%VSCODEUSERDATADIR%
call "%INTEGRATION_TEST_ELECTRON_PATH%" %~dp0\..\extensions\vscode-api-tests\testWorkspace --enable-proposed-api=vscode.vscode-api-tests --extensionDevelopmentPath=%~dp0\..\extensions\vscode-api-tests --extensionTestsPath=%~dp0\..\extensions\vscode-api-tests\out\singlefolder-tests %ALL_PLATFORMS_API_TESTS_EXTRA_ARGS%
if %errorlevel% neq 0 exit /b %errorlevel%

View file

@ -62,7 +62,7 @@ after_suite
# Tests in the extension host
ALL_PLATFORMS_API_TESTS_EXTRA_ARGS="--disable-telemetry --crash-reporter-directory=$VSCODECRASHDIR --no-cached-data --disable-updates --disable-keytar --disable-extensions --disable-workspace-trust --user-data-dir=$VSCODEUSERDATADIR"
ALL_PLATFORMS_API_TESTS_EXTRA_ARGS="--disable-telemetry --skip-welcome --crash-reporter-directory=$VSCODECRASHDIR --no-cached-data --disable-updates --disable-keytar --disable-extensions --disable-workspace-trust --user-data-dir=$VSCODEUSERDATADIR"
"$INTEGRATION_TEST_ELECTRON_PATH" $LINUX_EXTRA_ARGS $ROOT/extensions/vscode-api-tests/testWorkspace --enable-proposed-api=vscode.vscode-api-tests --extensionDevelopmentPath=$ROOT/extensions/vscode-api-tests --extensionTestsPath=$ROOT/extensions/vscode-api-tests/out/singlefolder-tests $ALL_PLATFORMS_API_TESTS_EXTRA_ARGS
after_suite

View file

@ -60,6 +60,7 @@ export interface NativeParsedArgs {
'enable-proposed-api'?: string[]; // undefined or array of 1 or more
'open-url'?: boolean;
'skip-release-notes'?: boolean;
'skip-welcome'?: boolean;
'disable-telemetry'?: boolean;
'export-default-configuration'?: string;
'install-source'?: string;

View file

@ -94,6 +94,7 @@ export const OPTIONS: OptionDescriptions<Required<NativeParsedArgs>> = {
'driver': { type: 'string' },
'logExtensionHostCommunication': { type: 'boolean' },
'skip-release-notes': { type: 'boolean' },
'skip-welcome': { type: 'boolean' },
'disable-telemetry': { type: 'boolean' },
'disable-updates': { type: 'boolean' },
'disable-keytar': { type: 'boolean' },

View file

@ -49,6 +49,7 @@ import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet';
import { GettingStartedInput, gettingStartedInputTypeId } from 'vs/workbench/contrib/welcome/gettingStarted/browser/gettingStartedInput';
import { welcomeButtonBackground, welcomeButtonHoverBackground, welcomePageBackground } from 'vs/workbench/contrib/welcome/page/browser/welcomePageColors';
import { EditorInput } from 'vs/workbench/common/editor/editorInput';
import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService';
const configurationKey = 'workbench.startupEditor';
@ -68,6 +69,7 @@ export class WelcomePageContribution implements IWorkbenchContribution {
@ILifecycleService private readonly lifecycleService: ILifecycleService,
@IWorkbenchLayoutService private readonly layoutService: IWorkbenchLayoutService,
@ICommandService private readonly commandService: ICommandService,
@IWorkbenchEnvironmentService private readonly environmentService: IWorkbenchEnvironmentService
) {
// Run immediately to minimize time spent waiting for exp service.
@ -84,7 +86,7 @@ export class WelcomePageContribution implements IWorkbenchContribution {
}
private async run() {
const enabled = isWelcomePageEnabled(this.configurationService, this.contextService);
const enabled = isWelcomePageEnabled(this.configurationService, this.contextService, this.environmentService);
if (enabled && this.lifecycleService.startupKind !== StartupKind.ReloadedWindow) {
const hasBackups = await this.workingCopyBackupService.hasBackups();
if (hasBackups) { return; }
@ -152,7 +154,11 @@ export class WelcomePageContribution implements IWorkbenchContribution {
}
}
function isWelcomePageEnabled(configurationService: IConfigurationService, contextService: IWorkspaceContextService) {
function isWelcomePageEnabled(configurationService: IConfigurationService, contextService: IWorkspaceContextService, environmentService: IWorkbenchEnvironmentService) {
if (environmentService.skipWelcome) {
return false;
}
const startupEditor = configurationService.inspect<string>(configurationKey);
if (!startupEditor.userValue && !startupEditor.workspaceValue) {
const welcomeEnabled = configurationService.inspect(oldConfigurationKey);

View file

@ -245,6 +245,7 @@ export class BrowserWorkbenchEnvironmentService implements IWorkbenchEnvironment
get logExtensionHostCommunication(): boolean { return this.payload?.get('logExtensionHostCommunication') === 'true'; }
get skipReleaseNotes(): boolean { return false; }
get skipWelcome(): boolean { return false; }
@memoize
get disableWorkspaceTrust(): boolean { return true; }

View file

@ -38,6 +38,7 @@ export interface IWorkbenchEnvironmentService extends IEnvironmentService {
readonly webviewExternalEndpoint: string;
readonly skipReleaseNotes: boolean;
readonly skipWelcome: boolean;
readonly debugRenderer: boolean;

View file

@ -71,6 +71,9 @@ export class NativeWorkbenchEnvironmentService extends AbstractNativeEnvironment
@memoize
get skipReleaseNotes(): boolean { return !!this.args['skip-release-notes']; }
@memoize
get skipWelcome(): boolean { return !!this.args['skip-welcome']; }
@memoize
get logExtensionHostCommunication(): boolean { return !!this.args.logExtensionHostCommunication; }

View file

@ -135,6 +135,7 @@ export async function spawn(options: SpawnOptions): Promise<Code> {
const args = [
options.workspacePath,
'--skip-release-notes',
'--skip-welcome',
'--disable-telemetry',
'--no-cached-data',
'--disable-updates',