Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Selenium: change timeout for waiting that a workspace is started #8096

Merged
merged 1 commit into from
Dec 29, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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