diff --git a/selenium/che-selenium-test/src/main/java/org/eclipse/che/selenium/pageobject/Events.java b/selenium/che-selenium-test/src/main/java/org/eclipse/che/selenium/pageobject/Events.java index 0c05a1310ff..57066801e68 100644 --- a/selenium/che-selenium-test/src/main/java/org/eclipse/che/selenium/pageobject/Events.java +++ b/selenium/che-selenium-test/src/main/java/org/eclipse/che/selenium/pageobject/Events.java @@ -144,4 +144,9 @@ public void clearAllMessages() { } waitEmptyEventsPanel(); } + + public void clickOnEventPanelAndWaitMessage(String message) { + clickEventLogBtn(); + waitExpectedMessage(message); + } } diff --git a/selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/factory/CheckFactoryWithPerUserCreatePolicyTest.java b/selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/factory/CheckFactoryWithPerUserCreatePolicyTest.java index 83ae132072a..07c6fc93207 100644 --- a/selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/factory/CheckFactoryWithPerUserCreatePolicyTest.java +++ b/selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/factory/CheckFactoryWithPerUserCreatePolicyTest.java @@ -65,10 +65,16 @@ public void checkFactoryAcceptingWithPerUserPolicy() throws Exception { seleniumWebDriverHelper.switchToIdeFrameAndWaitAvailability(); projectExplorer.waitProjectExplorer(); - notificationsPopupPanel.waitExpectedMessageOnProgressPanelAndClosed("Project Spring imported"); - String workspaceUrl = seleniumWebDriver.getCurrentUrl(); + try { + notificationsPopupPanel.waitExpectedMessageOnProgressPanelAndClosed( + "Project Spring imported"); + } catch (TimeoutException ex) { + // remove try-catch block after issue has been resolved + fail("Known issue https://github.com/eclipse/che/issues/10728"); + } + String workspaceUrl = seleniumWebDriver.getCurrentUrl(); // accept factory testFactory.open(seleniumWebDriver); diff --git a/selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/testrunner/JavaTestPluginTestNgTest.java b/selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/testrunner/JavaTestPluginTestNgTest.java index de2eeddd509..b06d19c027f 100644 --- a/selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/testrunner/JavaTestPluginTestNgTest.java +++ b/selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/testrunner/JavaTestPluginTestNgTest.java @@ -118,7 +118,13 @@ public void shouldExecuteTestClassSuccessfully() { menu.runCommand(RUN_MENU, TEST, TEST_NG_TEST_DROP_DAWN_ITEM); // then - notifications.waitExpectedMessageOnProgressPanelAndClosed("Test runner executed successfully."); + try { + notifications.waitExpectedMessageOnProgressPanelAndClosed( + "Test runner executed successfully."); + } catch (TimeoutException ex) { + // remove try-catch block after issue has been resolved + fail("Known issue https://github.com/eclipse/che/issues/10728"); + } pluginConsole.waitMethodMarkedAsPassed("shouldSuccessOfAppOne"); pluginConsole.waitMethodMarkedAsFailed("shouldFailOfAppOne"); assertTrue(pluginConsole.getAllNamesOfMethodsMarkedDefinedStatus(PASSED).size() == 1); @@ -138,17 +144,27 @@ public void shouldExecuteTestMethodsSuccessfully() { editor.waitActive(); editor.goToCursorPositionVisible(26, 17); menu.runCommand(RUN_MENU, TEST, TEST_NG_TEST_DROP_DAWN_ITEM); - notifications.waitExpectedMessageOnProgressPanelAndClosed("Test runner executed successfully."); + + try { + notifications.waitExpectedMessageOnProgressPanelAndClosed( + "Test runner executed successfully."); + } catch (TimeoutException ex) { + // remove try-catch block after issue has been resolved + fail("Known issue https://github.com/eclipse/che/issues/10728"); + } + pluginConsole.waitMethodMarkedAsPassed("shouldSuccessOfAppAnother"); assertTrue(pluginConsole.getAllNamesOfMethodsMarkedDefinedStatus(PASSED).size() == 1); editor.goToCursorPositionVisible(31, 17); menu.runCommand(RUN_MENU, TEST, TEST_NG_TEST_DROP_DAWN_ITEM); + try { pluginConsole.waitMethodMarkedAsFailed("shouldFailOfAppAnother"); } catch (TimeoutException ex) { // remove try-catch block after issue has been resolved fail("Known issue https://github.com/eclipse/che/issues/7338", ex); } + assertTrue(pluginConsole.getAllNamesOfMethodsMarkedDefinedStatus(FAILED).size() == 1); String testErrorMessage = pluginConsole.getTestErrorMessage(); assertTrue( @@ -167,13 +183,22 @@ public void shouldExecuteAlltests() { editor.waitActive(); editor.goToCursorPositionVisible(26, 17); menu.runCommand(RUN_MENU, TEST, TEST_NG_TEST_DROP_DAWN_ITEM); - notifications.waitExpectedMessageOnProgressPanelAndClosed("Test runner executed successfully."); + + try { + notifications.waitExpectedMessageOnProgressPanelAndClosed( + "Test runner executed successfully."); + } catch (TimeoutException ex) { + // remove try-catch block after issue has been resolved + fail("Known issue https://github.com/eclipse/che/issues/10728"); + } + try { pluginConsole.waitMethodMarkedAsPassed("shouldSuccessOfAppAnother"); } catch (TimeoutException ex) { // remove try-catch block after issue has been resolved fail("Known issue https://github.com/eclipse/che/issues/7338", ex); } + assertTrue(pluginConsole.getAllNamesOfMethodsMarkedDefinedStatus(PASSED).size() == 1); editor.goToCursorPositionVisible(31, 17); menu.runCommand(RUN_MENU, TEST, TEST_NG_TEST_DROP_DAWN_ITEM);