Skip to content

Commit 452c0a6

Browse files
committed
fixup: Bump vscode-extension-tester from 8.11.0 to 8.18.0 #5386
Disable the scan via '@secretlint/node' Signed-off-by: Victor Rubezhny <vrubezhny@redhat.com>
1 parent 4185782 commit 452c0a6

File tree

2 files changed

+105
-2
lines changed

2 files changed

+105
-2
lines changed

.github/workflows/continuous-integration-workflow.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,15 @@ jobs:
8282
env:
8383
NODE_OPTIONS: --max_old_space_size=16384
8484
if: runner.os == 'Linux'
85-
run: xvfb-run --server-args="-screen 0 1920x1080x24" npm run public-ui-test
85+
run: |
86+
# Patch vscode:prepublish to reinstall secretlint AFTER prune
87+
node -e "
88+
const fs = require('fs');
89+
const pkg = JSON.parse(fs.readFileSync('package.json'));
90+
pkg.scripts['vscode:prepublish'] += ' && npm install @secretlint/node';
91+
fs.writeFileSync('package.json', JSON.stringify(pkg, null, 2));
92+
"
93+
xvfb-run --server-args="-screen 0 1920x1080x24" npm run public-ui-test
8694
8795
- name: Build and run integration tests
8896
if: (success() || failure()) && runner.os == 'Linux'

test/ui/suite/componentCommands.ts

Lines changed: 96 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,26 +29,121 @@ export function testComponentCommands(path: string) {
2929

3030
const componentName = 'nodejs-starter';
3131

32+
// before(async function context() {
33+
// this.timeout(30_000);
34+
// console.log(`Closing all editors...`)
35+
// await new EditorView().closeAllEditors();
36+
// console.log(`Opening the OpenShift view...`)
37+
// view = await (await new ActivityBar().getViewControl(VIEWS.openshift)).openView();
38+
// console.log(`Collapsing all the trees...`)
39+
// for (const item of [
40+
// VIEWS.appExplorer,
41+
// VIEWS.compRegistries,
42+
// VIEWS.serverlessFunctions,
43+
// VIEWS.debugSessions,
44+
// ]) {
45+
// console.log(`Collapsing $`)
46+
// // await (await view.getContent().getSection(item)).collapse();
47+
// const section = await view.getContent().getSection(item);
48+
49+
// // Scroll the section into view before collapsing/expanding
50+
// const element = (section as any).element; // access the protected WebElement
51+
// await section.getDriver().executeScript('arguments[0].scrollIntoView(true);', element);
52+
53+
// await section.collapse();
54+
// }
55+
56+
// //expect component is running
57+
// section = await view.getContent().getSection(VIEWS.components);
58+
// try {
59+
// await itemExists(`${componentName} (dev running)`, section);
60+
// } catch {
61+
// this.skip();
62+
// }
63+
// });
64+
65+
/* eslint-disable no-console */
66+
3267
before(async function context() {
3368
this.timeout(30_000);
69+
70+
console.log('[BEFORE] Closing all editors...');
3471
await new EditorView().closeAllEditors();
72+
console.log('[BEFORE] All editors closed.');
73+
74+
console.log('[BEFORE] Opening the OpenShift view...');
3575
view = await (await new ActivityBar().getViewControl(VIEWS.openshift)).openView();
76+
console.log('[BEFORE] OpenShift view opened.');
77+
78+
console.log('[BEFORE] Waiting for OpenShift view content to load...');
79+
80+
let firstSection;
81+
82+
for (let i = 0; i < 10; i++) {
83+
console.log('[BEFORE] Checking view readiness (attempt ${i + 1})');
84+
85+
const freshContent = view.getContent(); // 👈 re-fetch every time
86+
firstSection = await freshContent.getSection(VIEWS.appExplorer);
87+
88+
if (firstSection && (firstSection as any).element) {
89+
console.log('[BEFORE] View content is ready.');
90+
break;
91+
}
92+
93+
await new Promise(res => setTimeout(res, 1000));
94+
}
95+
96+
if (!firstSection || !(firstSection as any).element) {
97+
throw new Error('[BEFORE] OpenShift view content did not load properly.');
98+
}
99+
100+
console.log('[BEFORE] Collapsing all other sections...');
36101
for (const item of [
37102
VIEWS.appExplorer,
38103
VIEWS.compRegistries,
39104
VIEWS.serverlessFunctions,
40105
VIEWS.debugSessions,
41106
]) {
42-
await (await view.getContent().getSection(item)).collapse();
107+
// await (await view.getContent().getSection(item)).collapse();
108+
109+
console.log(`[BEFORE] Collapsing section: ${item}`);
110+
const section = await view.getContent().getSection(item);
111+
if (!section) {
112+
console.warn(`[BEFORE] Section "${item}" not found! Skipping collapse.`);
113+
continue;
114+
}
115+
116+
// Scroll the section into view before collapsing
117+
const element = (section as any).element; // access protected WebElement
118+
if (!element) {
119+
console.warn(`[BEFORE] WebElement for section "${item}" is undefined! Skipping scroll.`);
120+
} else {
121+
const location = await element.getRect();
122+
console.log(`[BEFORE] Section element location: x=${location.x}, y=${location.y}`);
123+
await section.getDriver().executeScript('arguments[0].scrollIntoView(true);', element);
124+
console.log(`[BEFORE] Section ${item} scrolled into view.`);
125+
}
126+
127+
128+
// Collapse
129+
const expandedBefore = section ? await section.isExpanded() : false;
130+
if (section) await section.collapse();
131+
const expandedAfter = section ? await section.isExpanded() : false;
132+
console.log(`[BEFORE] Section ${item} collapse attempted. Expanded before: ${expandedBefore}, Expanded after: ${expandedAfter}`);
43133
}
44134

45135
//expect component is running
136+
console.log(`[BEFORE] Checking that component "${componentName}" is running...`);
46137
section = await view.getContent().getSection(VIEWS.components);
47138
try {
48139
await itemExists(`${componentName} (dev running)`, section);
140+
console.log(`[BEFORE] Component "${componentName}" is running.`);
49141
} catch {
142+
console.warn(`[BEFORE] Component "${componentName}" not found or not running. Skipping tests.`);
50143
this.skip();
51144
}
145+
146+
console.log('[BEFORE] Setup completed.');
52147
});
53148

54149
after(async function () {

0 commit comments

Comments
 (0)