mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 04:49:35 +00:00
Use --disable-workspace-trust for the test runs
This commit is contained in:
commit
b003560579
|
@ -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-cached-data --disable-updates --disable-keytar --disable-extensions --user-data-dir=%VSCODEUSERDATADIR%
|
||||
set 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%
|
||||
|
||||
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%
|
||||
|
|
|
@ -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 --user-data-dir=$VSCODEUSERDATADIR"
|
||||
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"
|
||||
|
||||
"$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
|
||||
|
|
|
@ -71,7 +71,6 @@ export class Application {
|
|||
async start(expectWalkthroughPart = true): Promise<any> {
|
||||
await this._start();
|
||||
await this.code.waitForElement('.explorer-folders-view');
|
||||
await this.dismissTrustDialog();
|
||||
|
||||
// https://github.com/microsoft/vscode/issues/118748
|
||||
// if (expectWalkthroughPart) {
|
||||
|
@ -84,20 +83,6 @@ export class Application {
|
|||
await new Promise(c => setTimeout(c, 1000));
|
||||
await this._start(options.workspaceOrFolder, options.extraArgs);
|
||||
await this.code.waitForElement('.explorer-folders-view');
|
||||
await this.dismissTrustDialog();
|
||||
}
|
||||
|
||||
private async dismissTrustDialog(): Promise<void> {
|
||||
if (this.options.web) {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
// Dismiss workspace trust dialog, if found
|
||||
await this.code.waitAndClick(`.monaco-workbench .dialog-buttons-row a:nth-child(1)`, 10, 10, 50);
|
||||
} catch {
|
||||
// there musn't be any trust dialog, maybe workspace is trusted?
|
||||
}
|
||||
}
|
||||
|
||||
private async _start(workspaceOrFolder = this.workspacePathOrFolder, extraArgs: string[] = []): Promise<any> {
|
||||
|
|
|
@ -140,6 +140,7 @@ export async function spawn(options: SpawnOptions): Promise<Code> {
|
|||
'--disable-updates',
|
||||
'--disable-keytar',
|
||||
'--disable-crash-reporter',
|
||||
'--disable-workspace-trust',
|
||||
`--extensions-dir=${options.extensionsPath}`,
|
||||
`--user-data-dir=${options.userDataDir}`,
|
||||
'--driver', handle
|
||||
|
|
|
@ -207,8 +207,9 @@ async function setupRepository(): Promise<void> {
|
|||
cp.spawnSync('git', ['clean', '-xdf'], { cwd: workspacePath });
|
||||
}
|
||||
|
||||
console.log('*** Running yarn...');
|
||||
cp.execSync('yarn', { cwd: workspacePath, stdio: 'inherit' });
|
||||
// None of the test run the project
|
||||
// console.log('*** Running yarn...');
|
||||
// cp.execSync('yarn', { cwd: workspacePath, stdio: 'inherit' });
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue