Selenium: cover workspace creation from Java stack by selenium test #10214
Selenium: cover workspace creation from Java stack by selenium test #10214SkorikSergey merged 10 commits intomasterfrom
Conversation
| waitExpectedTextIntoConsole(expectedMessageInTerminal, PREPARING_WS_TIMEOUT_SEC); | ||
| } | ||
|
|
||
| // Open web page by url and check visibility of web element on opened page |
There was a problem hiding this comment.
Description of method is incomplete: it clicks on preview url.
| } | ||
|
|
||
| // Open web page by url and check visibility of web element on opened page | ||
| public void startCommandAndCheckApp(String currentWindow, String webElementXpath) { |
There was a problem hiding this comment.
Looks like we can obtain currentWindow id inside the method.
| seleniumWebDriverHelper.switchToIdeFrameAndWaitAvailability(); | ||
| } | ||
|
|
||
| // Start command from project context menu and check expected message in Terminal |
| } | ||
|
|
||
| // Start command from project context menu and check expected message in Terminal | ||
| public void startCommandAndCheckResult( |
There was a problem hiding this comment.
startCommandAndCheckResult > executeCommandFromProjectExplorer
| } | ||
|
|
||
| // Open web page by url and check visibility of web element on opened page | ||
| public void startCommandAndCheckApp(String currentWindow, String webElementXpath) { |
There was a problem hiding this comment.
startCommandAndCheckApp > checkWebElementVisibilityAtPreviewPage
| } | ||
|
|
||
| // Open web page by url and check visibility of web element on opened page | ||
| public void startCommandAndCheckApp(String currentWindow, String webElementXpath) { |
There was a problem hiding this comment.
String webElementXpath > WebElement webElement looks more usable
| .click(); | ||
| } | ||
|
|
||
| public void startCommandFromProcessesArea( |
There was a problem hiding this comment.
startCommandFromProcessesArea > executeCommandInsideProcessesArea
| seleniumWebDriverHelper.waitAndClick(By.xpath(Locators.MAXIMIZE_BUTTON_XPATH)); | ||
| } | ||
|
|
||
| // Wait for project has PROJECT_FOLDER status |
There was a problem hiding this comment.
Wait for project has PROJECT_FOLDER status > Wait project is completely initialized
| import java.util.ArrayList; | ||
| import org.eclipse.che.selenium.pageobject.dashboard.workspaces.Workspaces; | ||
|
|
||
| /** @author Skoryk Serhii */ |
There was a problem hiding this comment.
Need to have some words about responsibility of class in JavaDocs
| newWorkspace.clickOnCreateButtonAndOpenInIDE(); | ||
| } | ||
|
|
||
| private void createWorkspace(NewWorkspace.Stack stack, String workspaceName) { |
There was a problem hiding this comment.
createWorkspace > prepareToClickOnCreateButton
| private static final String CONSOLE_JAVA_SIMPLE = "console-java-simple"; | ||
| private static final String WEB_JAVA_SPRING = "web-java-spring"; | ||
|
|
||
| private ArrayList<String> projects = new ArrayList<>(); |
There was a problem hiding this comment.
it could be simplified as follow:
private List<String> projects = ImmutableList.of(CONSOLE_JAVA_SIMPLE, WEB_JAVA_SPRING);
| WEB_JAVA_SPRING, RUN, "web-java-spring:run tomcat", "Server startup in"); | ||
| consoles.startCommandAndCheckApp(currentWindow, "//span[text()='Enter your name: ']"); | ||
|
|
||
| // start 'stop apache' command and check that apache not running |
There was a problem hiding this comment.
start > execute
apache > Tomcat
|
|
||
| // start 'stop apache' command and check that apache not running | ||
| projectExplorer.invokeCommandWithContextMenu( | ||
| RUN, WEB_JAVA_SPRING, "web-java-spring:stop tomcat"); |
There was a problem hiding this comment.
let's make constant with "web-java-spring:stop tomcat" command: STOP_TOMCAT_COMMAND_ITEM_NAME
…rskpaceFromJavaStack
|
ci-test |
|
ci-test build report: |
…rskpaceFromJavaStack
…kTest selenium tests to CheSuite.xml test suite
What does this PR do?
This PR creates CreateWorkspaceFromJavaStackTest selenium test that cover workspace creation from the Java stack.
What issues does this PR fix or reference?
#10050
Release Notes
Docs PR