Disable workspace trust during tests

This commit is contained in:
Ladislau Szomoru
2021-06-03 10:21:19 +02:00
parent 732769073a
commit b0509196f6
5 changed files with 3 additions and 21 deletions
-15
View File
@@ -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> {
+1
View File
@@ -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