Skip to content

Commit

Permalink
changed timeouts for checking statuses of workspace (#8215)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergey Skorik authored Jan 9, 2018
1 parent 7aaff22 commit ba6a991
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -818,16 +818,8 @@ public void invokeCommandWithContextMenu(

public void invokeCommandWithContextMenu(
String commandsGoal, String pathToItem, String commandName, String machineName) {
selectItem(pathToItem);
openContextMenuByPathSelectedItem(pathToItem);
clickOnItemInContextMenu(COMMANDS);
clickOnItemInContextMenu(commandsGoal);
invokeCommandWithContextMenu(commandsGoal, pathToItem, commandName);

redrawUiElementsWait
.until(
visibilityOfElementLocated(
By.xpath(String.format("//tr[@id[contains(.,'%s')]]", commandName))))
.click();
loader.waitOnClosed();
actionsFactory
.createAction(seleniumWebDriver)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

import static java.lang.String.format;
import static org.eclipse.che.selenium.core.constant.TestTimeoutsConstants.EXPECTED_MESS_IN_CONSOLE_SEC;
import static org.eclipse.che.selenium.core.constant.TestTimeoutsConstants.LOADER_TIMEOUT_SEC;
import static org.eclipse.che.selenium.core.constant.TestTimeoutsConstants.LOAD_PAGE_TIMEOUT_SEC;
import static org.eclipse.che.selenium.core.constant.TestTimeoutsConstants.REDRAW_UI_ELEMENTS_TIMEOUT_SEC;
import static org.openqa.selenium.support.ui.ExpectedConditions.elementToBeClickable;
Expand Down Expand Up @@ -124,7 +123,7 @@ public WorkspaceDetails(SeleniumWebDriver seleniumWebDriver, Loader loader, Dash
* @param stateWorkspace expected state of workspace
*/
public void checkStateOfWorkspace(StateWorkspace stateWorkspace) {
new WebDriverWait(seleniumWebDriver, LOADER_TIMEOUT_SEC)
new WebDriverWait(seleniumWebDriver, EXPECTED_MESS_IN_CONSOLE_SEC)
.until(textToBePresentInElement(workspaceState, stateWorkspace.getStatus()));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
package org.eclipse.che.selenium.dashboard;

import static org.eclipse.che.commons.lang.NameGenerator.generate;
import static org.eclipse.che.selenium.core.constant.TestTimeoutsConstants.EXPECTED_MESS_IN_CONSOLE_SEC;
import static org.eclipse.che.selenium.core.constant.TestTimeoutsConstants.UPDATING_PROJECT_TIMEOUT_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;
Expand Down Expand Up @@ -103,8 +103,6 @@ private void renameWorkspace(String name) {
private void saveAndWaitWorkspaceRestarted() {
workspaceDetails.clickOnSaveChangesBtn();
workspaceDetails.checkStateOfWorkspace(STOPPING);
workspaceDetails.checkStateOfWorkspace(RUNNING, EXPECTED_MESS_IN_CONSOLE_SEC);
dashboard.waitNotificationMessage("Workspace updated");
dashboard.waitNotificationIsClosed();
workspaceDetails.checkStateOfWorkspace(RUNNING, UPDATING_PROJECT_TIMEOUT_SEC);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +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.core.constant.TestTimeoutsConstants.UPDATING_PROJECT_TIMEOUT_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 @@ -98,7 +98,7 @@ public void checkProjectAfterRenameWs() throws Exception {
workspaceOverview.enterNameWorkspace(WORKSPACE_NEW_NAME);
workspaceDetails.clickOnSaveChangesBtn();
workspaceDetails.checkStateOfWorkspace(STOPPING);
workspaceDetails.checkStateOfWorkspace(RUNNING, EXPECTED_MESS_IN_CONSOLE_SEC);
workspaceDetails.checkStateOfWorkspace(RUNNING, UPDATING_PROJECT_TIMEOUT_SEC);
workspaceOverview.checkNameWorkspace(WORKSPACE_NEW_NAME);

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

0 comments on commit ba6a991

Please sign in to comment.