Skip to content

Commit

Permalink
Selenium: increased timeout for checking that a workspace status is R…
Browse files Browse the repository at this point in the history
…UNNING (#8096)
  • Loading branch information
Sergey Skorik committed Dec 29, 2017
1 parent 4754891 commit 4527154
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,11 @@ public void checkStateOfWorkspace(StateWorkspace stateWorkspace) {
.until(textToBePresentInElement(workspaceState, stateWorkspace.getStatus()));
}

public void checkStateOfWorkspace(StateWorkspace stateWorkspace, int timeout) {
new WebDriverWait(seleniumWebDriver, timeout)
.until(textToBePresentInElement(workspaceState, stateWorkspace.getStatus()));
}

/** click on 'RUN' button in 'Workspace Information' */
public void clickOnRunWorkspace() {
new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
package org.eclipse.che.selenium.dashboard;

import static org.eclipse.che.commons.lang.NameGenerator.generate;
import static org.eclipse.che.selenium.pageobject.dashboard.workspaces.WorkspaceDetails.StateWorkspace.STARTING;
import static org.eclipse.che.selenium.core.constant.TestTimeoutsConstants.EXPECTED_MESS_IN_CONSOLE_SEC;
import static org.eclipse.che.selenium.pageobject.dashboard.workspaces.WorkspaceDetails.StateWorkspace.RUNNING;
import static org.eclipse.che.selenium.pageobject.dashboard.workspaces.WorkspaceDetails.StateWorkspace.STOPPING;
import static org.eclipse.che.selenium.pageobject.dashboard.workspaces.WorkspaceDetails.TabNames.OVERVIEW;
import static org.testng.Assert.assertFalse;
Expand Down Expand Up @@ -102,7 +103,7 @@ private void renameWorkspace(String name) {
private void saveAndWaitWorkspaceRestarted() {
workspaceDetails.clickOnSaveChangesBtn();
workspaceDetails.checkStateOfWorkspace(STOPPING);
workspaceDetails.checkStateOfWorkspace(STARTING);
workspaceDetails.checkStateOfWorkspace(RUNNING, EXPECTED_MESS_IN_CONSOLE_SEC);
dashboard.waitNotificationMessage("Workspace updated");
dashboard.waitNotificationIsClosed();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
*/
package org.eclipse.che.selenium.workspaces;

import static org.eclipse.che.selenium.core.constant.TestTimeoutsConstants.EXPECTED_MESS_IN_CONSOLE_SEC;
import static org.eclipse.che.selenium.pageobject.dashboard.workspaces.WorkspaceDetails.StateWorkspace.RUNNING;
import static org.eclipse.che.selenium.pageobject.dashboard.workspaces.WorkspaceDetails.StateWorkspace.STOPPING;
import static org.testng.Assert.fail;
Expand Down Expand Up @@ -97,7 +98,7 @@ public void checkProjectAfterRenameWs() throws Exception {
workspaceOverview.enterNameWorkspace(WORKSPACE_NEW_NAME);
workspaceDetails.clickOnSaveChangesBtn();
workspaceDetails.checkStateOfWorkspace(STOPPING);
workspaceDetails.checkStateOfWorkspace(RUNNING);
workspaceDetails.checkStateOfWorkspace(RUNNING, EXPECTED_MESS_IN_CONSOLE_SEC);
workspaceOverview.checkNameWorkspace(WORKSPACE_NEW_NAME);

// open the IDE, check state of the project
Expand Down

0 comments on commit 4527154

Please sign in to comment.