提交 c77ec582 编写于 作者: S Sandeep Somavarapu

- Remove undefined in the aria label

- Search extension by id
上级 071a5cf1
......@@ -168,7 +168,7 @@ export class TooltipWidget extends ExtensionWidget {
this.parent.removeAttribute('aria-label');
this.parent.title = this.getTooltip();
if (this.extension) {
this.parent.setAttribute('aria-label', localize('extension-arialabel', "{0}. {1} Press enter for extension details.", this.extension.displayName));
this.parent.setAttribute('aria-label', localize('extension-arialabel', "{0}. Press enter for extension details.", this.extension.displayName));
}
}
......
......@@ -15,10 +15,9 @@ export function setup() {
return;
}
const extensionName = 'vscode-smoketest-check';
await app.workbench.extensions.openExtensionsViewlet();
await app.workbench.extensions.installExtension(extensionName);
await app.workbench.extensions.installExtension('michelkaporin.vscode-smoketest-check', 'vscode-smoketest-check');
await app.workbench.extensions.waitForExtensionsViewlet();
await app.workbench.quickopen.runCommand('Smoke Test Check');
......
......@@ -28,14 +28,14 @@ export class Extensions extends Viewlet {
await this.code.waitForElement(SEARCH_BOX);
}
async searchForExtension(name: string): Promise<any> {
async searchForExtension(id: string): Promise<any> {
await this.code.waitAndClick(SEARCH_BOX);
await this.code.waitForActiveElement(SEARCH_BOX);
await this.code.waitForTypeInEditor(SEARCH_BOX, `name:"${name}"`);
await this.code.waitForTypeInEditor(SEARCH_BOX, `@id:${id}`);
}
async installExtension(name: string): Promise<void> {
await this.searchForExtension(name);
async installExtension(id: string, name: string): Promise<void> {
await this.searchForExtension(id);
const ariaLabel = `${name}. Press enter for extension details.`;
await this.code.waitAndClick(`div.extensions-viewlet[id="workbench.view.extensions"] .monaco-list-row[aria-label="${ariaLabel}"] .extension li[class='action-item'] .extension-action.install`);
await this.code.waitForElement(`.extension-editor .monaco-action-bar .action-item:not(.disabled) .extension-action.uninstall`);
......
......@@ -14,9 +14,8 @@ export function setup() {
return;
}
const extensionName = 'German Language Pack for Visual Studio Code';
await app.workbench.extensions.openExtensionsViewlet();
await app.workbench.extensions.installExtension(extensionName);
await app.workbench.extensions.installExtension('ms-ceintl.vscode-language-pack-de', 'German Language Pack for Visual Studio Code');
await app.restart({ extraArgs: ['--locale=DE'] });
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册