Fix #118443
This commit is contained in:
parent
6b76fcb671
commit
9d3a1d9f59
|
@ -24,10 +24,6 @@ export class Extensions extends Viewlet {
|
||||||
await this.code.waitForActiveElement(SEARCH_BOX);
|
await this.code.waitForActiveElement(SEARCH_BOX);
|
||||||
}
|
}
|
||||||
|
|
||||||
async waitForExtensionsViewlet(): Promise<any> {
|
|
||||||
await this.code.waitForElement(SEARCH_BOX);
|
|
||||||
}
|
|
||||||
|
|
||||||
async searchForExtension(id: string): Promise<any> {
|
async searchForExtension(id: string): Promise<any> {
|
||||||
await this.code.waitAndClick(SEARCH_BOX);
|
await this.code.waitAndClick(SEARCH_BOX);
|
||||||
await this.code.waitForActiveElement(SEARCH_BOX);
|
await this.code.waitForActiveElement(SEARCH_BOX);
|
||||||
|
@ -40,6 +36,10 @@ export class Extensions extends Viewlet {
|
||||||
await this.code.waitAndClick(`div.extensions-viewlet[id="workbench.view.extensions"] .monaco-list-row[data-extension-id="${id}"]`);
|
await this.code.waitAndClick(`div.extensions-viewlet[id="workbench.view.extensions"] .monaco-list-row[data-extension-id="${id}"]`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async closeExtension(title: string): Promise<any> {
|
||||||
|
await this.code.waitAndClick(`.tabs-container div.tab[title="Extension: ${title}"] div.tab-actions a.action-label.codicon.codicon-close`);
|
||||||
|
}
|
||||||
|
|
||||||
async installExtension(id: string, waitUntilEnabled: boolean): Promise<void> {
|
async installExtension(id: string, waitUntilEnabled: boolean): Promise<void> {
|
||||||
await this.searchForExtension(id);
|
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.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`);
|
||||||
|
|
|
@ -10,32 +10,19 @@ export function setup() {
|
||||||
it(`install and activate vscode-smoketest-check extension`, async function () {
|
it(`install and activate vscode-smoketest-check extension`, async function () {
|
||||||
const app = this.app as Application;
|
const app = this.app as Application;
|
||||||
|
|
||||||
if (app.quality === Quality.Dev || app.web /* https://github.com/microsoft/vscode/issues/118443 */) {
|
if (app.quality === Quality.Dev) {
|
||||||
this.skip();
|
this.skip();
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!app.web) {
|
|
||||||
await app.workbench.settingsEditor.addUserSetting('webview.experimental.useIframes', 'true');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
await app.workbench.extensions.openExtensionsViewlet();
|
await app.workbench.extensions.openExtensionsViewlet();
|
||||||
|
|
||||||
await app.workbench.extensions.installExtension('michelkaporin.vscode-smoketest-check', true);
|
await app.workbench.extensions.installExtension('michelkaporin.vscode-smoketest-check', true);
|
||||||
|
|
||||||
await app.workbench.extensions.waitForExtensionsViewlet();
|
// Close extension editor because keybindings dispatch is not working when web views are opened and focused
|
||||||
|
// https://github.com/microsoft/vscode/issues/110276
|
||||||
|
await app.workbench.extensions.closeExtension('vscode-smoketest-check');
|
||||||
|
|
||||||
await app.workbench.quickaccess.runCommand('Smoke Test Check');
|
await app.workbench.quickaccess.runCommand('Smoke Test Check');
|
||||||
await app.workbench.statusbar.waitForStatusbarText('smoke test', 'VS Code Smoke Test Check');
|
|
||||||
});
|
|
||||||
|
|
||||||
after(async function () {
|
|
||||||
const app = this.app as Application;
|
|
||||||
if (app.web) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
await app.workbench.settingsEditor.clearUserSettings();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue