Skip to content

Commit

Permalink
add try/catch for waiting breakpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
musienko-maxim committed Aug 20, 2019
1 parent 760a549 commit 7f1dd77
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
1 change: 0 additions & 1 deletion e2e/pageobjects/ide/Editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,6 @@ export class Editor {

async waitStoppedDebugBreakpoint(tabTitle: string, lineNumber: number, timeout: number = TestConstants.TS_SELENIUM_DEFAULT_TIMEOUT) {
const stoppedDebugBreakpointLocator: By = By.xpath(await this.getStoppedDebugBreakpointXpathLocator(tabTitle, lineNumber));

await this.driverHelper.waitVisibility(stoppedDebugBreakpointLocator, timeout);
}

Expand Down
10 changes: 8 additions & 2 deletions e2e/tests/e2e_happy_path/HappyPath.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,9 +256,15 @@ suite('Validation of debug functionality', async () => {
await debugView.clickOnDebugConfigurationDropDown();
await debugView.clickOnDebugConfigurationItem('Debug (Launch) - Current File');
await debugView.clickOnRunDebugButton();

await previewWidget.refreshPage();
await editor.waitStoppedDebugBreakpoint(javaFileName, 32);
try
{
await editor.waitStoppedDebugBreakpoint(javaFileName, 32);
}
catch(err){
await previewWidget.refreshPage();
await editor.waitStoppedDebugBreakpoint(javaFileName, 32);
}
});
});

Expand Down

0 comments on commit 7f1dd77

Please sign in to comment.