Skip to content

Commit 7721294

Browse files
committed
Update extensionUITest.ts
1 parent abd7d81 commit 7721294

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

test/ui-test/extensionUITest.ts

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export function extensionUIAssetsTest(): void {
2222
let yamlItem: ExtensionsViewItem;
2323

2424
before(async function () {
25-
this.timeout(40000);
25+
this.timeout(30000);
2626
driver = VSBrowser.instance.driver;
2727
view = await new ActivityBar().getViewControl('Extensions');
2828
sideBar = await view.openView();
@@ -37,16 +37,19 @@ export function extensionUIAssetsTest(): void {
3737
async () => {
3838
try {
3939
const content = sideBar.getContent();
40-
try {
41-
const sec = (await content.getSection('Installed')) as ExtensionsViewSection;
42-
return sec;
43-
} catch {
44-
// ignore and fall back below
45-
}
46-
47-
// pick the first available section
4840
const sections = await content.getSections();
49-
return (sections?.[0] as ExtensionsViewSection) ?? null;
41+
for (const sectionName of ['Installed', 'INSTALLED', 'installed']) {
42+
try {
43+
const sec = await content.getSection(sectionName);
44+
if (sec) return sec as ExtensionsViewSection;
45+
} catch {
46+
// try next name
47+
}
48+
}
49+
if (sections.length > 0) {
50+
return sections[0] as ExtensionsViewSection;
51+
}
52+
return null;
5053
} catch {
5154
return null;
5255
}

0 commit comments

Comments
 (0)