mirror of
https://github.com/Microsoft/vscode
synced 2024-08-26 20:39:37 +00:00
Fix #104230
This commit is contained in:
parent
0b79a0e708
commit
2277c8e2a3
|
@ -138,6 +138,7 @@ export class Renderer implements IPagedRenderer<IExtension, ITemplateData> {
|
||||||
addClass(data.element, 'loading');
|
addClass(data.element, 'loading');
|
||||||
|
|
||||||
data.root.removeAttribute('aria-label');
|
data.root.removeAttribute('aria-label');
|
||||||
|
data.root.removeAttribute('data-extension-id');
|
||||||
data.extensionDisposables = dispose(data.extensionDisposables);
|
data.extensionDisposables = dispose(data.extensionDisposables);
|
||||||
data.icon.src = '';
|
data.icon.src = '';
|
||||||
data.name.textContent = '';
|
data.name.textContent = '';
|
||||||
|
@ -150,6 +151,7 @@ export class Renderer implements IPagedRenderer<IExtension, ITemplateData> {
|
||||||
|
|
||||||
renderElement(extension: IExtension, index: number, data: ITemplateData): void {
|
renderElement(extension: IExtension, index: number, data: ITemplateData): void {
|
||||||
removeClass(data.element, 'loading');
|
removeClass(data.element, 'loading');
|
||||||
|
data.root.setAttribute('data-extension-id', extension.identifier.id);
|
||||||
|
|
||||||
if (extension.state !== ExtensionState.Uninstalled && !extension.server) {
|
if (extension.state !== ExtensionState.Uninstalled && !extension.server) {
|
||||||
// Get the extension if it is installed and has no server information
|
// Get the extension if it is installed and has no server information
|
||||||
|
|
|
@ -34,10 +34,9 @@ export class Extensions extends Viewlet {
|
||||||
await this.code.waitForTypeInEditor(SEARCH_BOX, `@id:${id}`);
|
await this.code.waitForTypeInEditor(SEARCH_BOX, `@id:${id}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
async installExtension(id: string, name: string, version: string, publisherDisplayName: string): Promise<void> {
|
async installExtension(id: string): Promise<void> {
|
||||||
await this.searchForExtension(id);
|
await this.searchForExtension(id);
|
||||||
const ariaLabel = `${name}, ${version}, ${publisherDisplayName}, press enter for extension details.`;
|
await this.code.waitAndClick(`div.extensions-viewlet[id="workbench.view.extensions"] .monaco-list-row[data-extension-id="${id}"] .extension-list-item li[class='action-item'] .extension-action.install`);
|
||||||
await this.code.waitAndClick(`div.extensions-viewlet[id="workbench.view.extensions"] .monaco-list-row[aria-label="${ariaLabel}"] .extension-list-item li[class='action-item'] .extension-action.install`);
|
|
||||||
await this.code.waitForElement(`.extension-editor .monaco-action-bar .action-item:not(.disabled) .extension-action.uninstall`);
|
await this.code.waitForElement(`.extension-editor .monaco-action-bar .action-item:not(.disabled) .extension-action.uninstall`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,7 @@ export function setup() {
|
||||||
|
|
||||||
await app.workbench.extensions.openExtensionsViewlet();
|
await app.workbench.extensions.openExtensionsViewlet();
|
||||||
|
|
||||||
await app.workbench.extensions.installExtension('michelkaporin.vscode-smoketest-check', 'vscode-smoketest-check', '0.0.1', 'Michel Kaporin');
|
await app.workbench.extensions.installExtension('michelkaporin.vscode-smoketest-check');
|
||||||
|
|
||||||
await app.workbench.extensions.waitForExtensionsViewlet();
|
await app.workbench.extensions.waitForExtensionsViewlet();
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ export function setup() {
|
||||||
}
|
}
|
||||||
|
|
||||||
await app.workbench.extensions.openExtensionsViewlet();
|
await app.workbench.extensions.openExtensionsViewlet();
|
||||||
await app.workbench.extensions.installExtension('ms-ceintl.vscode-language-pack-de', 'German Language Pack for Visual Studio Code', '1.48.2', 'Microsoft');
|
await app.workbench.extensions.installExtension('ms-ceintl.vscode-language-pack-de');
|
||||||
|
|
||||||
await app.restart({ extraArgs: ['--locale=DE'] });
|
await app.restart({ extraArgs: ['--locale=DE'] });
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue