Skip to content

Commit 2169634

Browse files
committed
Fix waiting for modal dialog
1 parent 9b9ce1a commit 2169634

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

tests/e2e/src/main/npm/e2e/workflows/analysis.wf.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export class AnalysisWorkflow {
1919
startAnalysisFromProjectPage(): Promise<any> {
2020
return this.contextMenuPage.openAnalysisConfig()
2121
.then(() => this.analysisConfigPage.saveAndRun())
22+
.then(() => browser.waitForAngular())
2223
.then(() => {
2324
/**
2425
* TODO: Here is some issue with timeout. isPresent() behaves very non-deterministically.
@@ -33,10 +34,17 @@ export class AnalysisWorkflow {
3334
console.error('Dialog present?');
3435

3536
return this.confirmDialogPage.isPresent().then(isPresent => {
37+
console.error("Dialog present:", isPresent);
38+
3639
if (isPresent) {
3740
console.error('Modal dialog is showed, need to click confirm button');
3841

39-
return this.confirmDialogPage.clickConfirm();
42+
return browser.isElementPresent(this.confirmDialogPage.confirmButton).then(isPresent => {
43+
if (isPresent) {
44+
console.error('Clicking on confirm button');
45+
return this.confirmDialogPage.clickConfirm();
46+
}
47+
});
4048
}
4149
}, error => {
4250
console.error('error: ', error);

0 commit comments

Comments
 (0)