mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 09:08:48 +01:00
Disable workspace trust during tests
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user