Fix smoke test (#204836)

fix smoke test
This commit is contained in:
Benjamin Christopher Simmonds 2024-02-09 16:47:22 +01:00 committed by GitHub
parent 5c3082d584
commit 5b8fe0ed3e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 2 deletions

View file

@ -41,7 +41,12 @@ export class Extensions extends Viewlet {
}
async closeExtension(title: string): Promise<any> {
await this.code.waitAndClick(`.tabs-container div.tab[aria-label="Extension: ${title}"] div.tab-actions a.action-label.codicon.codicon-close`);
try {
await this.code.waitAndClick(`.tabs-container div.tab[aria-label="Extension: ${title}, preview"] div.tab-actions a.action-label.codicon.codicon-close`);
} catch (e) {
this.code.logger.log(`Extension '${title}' not opened as preview. Trying without 'preview'.`);
await this.code.waitAndClick(`.tabs-container div.tab[aria-label="Extension: ${title}"] div.tab-actions a.action-label.codicon.codicon-close`);
}
}
async installExtension(id: string, waitUntilEnabled: boolean): Promise<void> {

View file

@ -12,7 +12,7 @@ export function setup(logger: Logger) {
// Shared before/after handling
installAllHandlers(logger);
it.skip('install and enable vscode-smoketest-check extension', async function () {
it('install and enable vscode-smoketest-check extension', async function () {
const app = this.app as Application;
await app.workbench.extensions.installExtension('ms-vscode.vscode-smoketest-check', true);