Skip to content

Commit 6c9d729

Browse files
committed
Add trace
Signed-off-by: Aurélien Pupier <[email protected]>
1 parent 4e9948a commit 6c9d729

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

src/ui-test/tests/debugger.test.ts

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ import {
4747
isVersionNewer,
4848
DEBUG_ITEM_OPERATOR
4949
} from '../utils';
50+
import waitUntil from 'async-wait-until';
5051

5152
describe('Camel Debugger tests', function () {
5253
this.timeout(300000);
@@ -65,19 +66,34 @@ describe('Camel Debugger tests', function () {
6566
driver = VSBrowser.instance.driver;
6667

6768
await VSBrowser.instance.openResources(path.resolve('src', 'ui-test', 'resources'));
69+
console.log('src/ui-test/resources opened');
6870

69-
await (await new ActivityBar().getViewControl('Explorer'))?.openView();
71+
// workaround: using waitUntil as sometimes the ActivityBar is not ready and then the View is redrawn causing staleElement error
72+
await waitUntil(async() => {
73+
try {
74+
return await (await new ActivityBar().getViewControl('Explorer'))?.openView() !== undefined;
75+
} catch {
76+
return false;
77+
}
78+
}, 10000, 1000);
79+
80+
console.log('Explorer view opened');
7081

7182
const section = await new SideBarView().getContent().getSection('resources');
7283
await section.openItem(CAMEL_ROUTE_YAML_WITH_SPACE);
7384

85+
console.log('Clicked to open the Camel route');
86+
7487
const editorView = new EditorView();
7588
await driver.wait(async function () {
7689
return (await editorView.getOpenEditorTitles()).find(title => title === CAMEL_ROUTE_YAML_WITH_SPACE);
7790
}, 5000);
91+
console.log('Camel route editor opened');
7892

7993
await executeCommand(CAMEL_RUN_DEBUG_ACTION_QUICKPICKS_LABEL);
94+
console.log('Run and debug command launched');
8095
await (await new ActivityBar().getViewControl('Run'))?.openView();
96+
console.log('run view opened');
8197
await waitUntilTerminalHasText(driver, TEST_ARRAY_RUN_DEBUG, 4000, 120000);
8298
textEditor = new TextEditor();
8399
});

0 commit comments

Comments
 (0)