diff options
author | andre.schmid <andre.schmid@est.tech> | 2021-03-15 17:52:43 +0000 |
---|---|---|
committer | Christophe Closset <christophe.closset@intl.att.com> | 2021-03-18 11:26:11 +0000 |
commit | 183b3b13a2fc879256140f0865346f537b64e899 (patch) | |
tree | 7f0ae8aeb65591afd0d07a6618181ab9dcb60e75 /integration-tests/src/test/java | |
parent | 49de015b6b49f64516557254e1e3713448ca4e6c (diff) |
Remove wait for welcome screen in UI tests
Remove unnecessary wait for the welcome screen after the login.
The welcome screen doesn't exist anymore.
Change-Id: Iddd57016fbb2a890029cd24b18a5fadc3c5ddb3d
Issue-ID: SDC-3522
Signed-off-by: andre.schmid <andre.schmid@est.tech>
Diffstat (limited to 'integration-tests/src/test/java')
-rw-r--r-- | integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/execute/setup/SetupCDTest.java | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/execute/setup/SetupCDTest.java b/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/execute/setup/SetupCDTest.java index c3afc0bd13..638f0b4aae 100644 --- a/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/execute/setup/SetupCDTest.java +++ b/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/execute/setup/SetupCDTest.java @@ -334,27 +334,22 @@ public abstract class SetupCDTest extends DriverFactory { getWindowTest().setUser(credentials); } - private void goToHomePage(UserRoleEnum role) throws Exception { - final int gettingButtonTimeOut = 10; + private void goToHomePage(final UserRoleEnum role) { + if (UserRoleEnum.ADMIN.equals(role)) { + return; + } try { getWindowTest().setRefreshAttempts(getWindowTest().getRefreshAttempts() == 0 ? NUM_OF_ATTEMPTS_TO_REFTRESH : getWindowTest().getRefreshAttempts()); - if (!role.equals(UserRoleEnum.ADMIN)) { - - WebElement closeButton = GeneralUIUtils.getClickableButtonBy(By.className("sdc-welcome-close"), gettingButtonTimeOut); - if (closeButton != null) { - closeButton.click(); - } - - if (!GeneralUIUtils.isElementVisibleByTestId(DataTestIdEnum.MainMenuButtons.HOME_BUTTON.getValue())) { - restartBrowser(role); - } + if (!GeneralUIUtils.isElementVisibleByTestId(DataTestIdEnum.MainMenuButtons.HOME_BUTTON.getValue())) { + restartBrowser(role); } - } catch (Exception e) { + } catch (final Exception e) { + LOGGER.debug("An error has occurred while loading the home page", e); restartBrowser(role); } } - private void restartBrowser(UserRoleEnum role) throws Exception { + private void restartBrowser(UserRoleEnum role) { getWindowTest().setRefreshAttempts(getWindowTest().getRefreshAttempts() - 1); if (getWindowTest().getRefreshAttempts() <= 0) { System.out.println("ERR : Something is wrong with browser!"); |