#111845 fix localization tests

This commit is contained in:
Sandeep Somavarapu 2020-11-30 20:25:44 +01:00
parent 155691d0be
commit 47ce2a8d6d
3 changed files with 8 additions and 4 deletions

View file

@ -34,9 +34,13 @@ export class Extensions extends Viewlet {
await this.code.waitForTypeInEditor(SEARCH_BOX, `@id:${id}`);
}
async installExtension(id: string): Promise<void> {
async installExtension(id: string, waitUntilEnabled: boolean): Promise<void> {
await this.searchForExtension(id);
await this.code.waitAndClick(`div.extensions-viewlet[id="workbench.view.extensions"] .monaco-list-row[data-extension-id="${id}"] .extension-list-item .monaco-action-bar .action-item:not(.disabled) .extension-action.install`);
await this.code.waitForElement(`.extension-editor .monaco-action-bar .action-item:not(.disabled) .extension-action[title="Disable this extension"]`);
await this.code.waitForElement(`.extension-editor .monaco-action-bar .action-item:not(.disabled) .extension-action.uninstall`);
if (waitUntilEnabled) {
await this.code.waitForElement(`.extension-editor .monaco-action-bar .action-item:not(.disabled) .extension-action[title="Disable this extension"]`);
}
}
}

View file

@ -17,7 +17,7 @@ export function setup() {
await app.workbench.extensions.openExtensionsViewlet();
await app.workbench.extensions.installExtension('michelkaporin.vscode-smoketest-check');
await app.workbench.extensions.installExtension('michelkaporin.vscode-smoketest-check', true);
await app.workbench.extensions.waitForExtensionsViewlet();

View file

@ -15,7 +15,7 @@ export function setup() {
}
await app.workbench.extensions.openExtensionsViewlet();
await app.workbench.extensions.installExtension('ms-ceintl.vscode-language-pack-de');
await app.workbench.extensions.installExtension('ms-ceintl.vscode-language-pack-de', false);
await app.restart({ extraArgs: ['--locale=DE'] });
});