-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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: add selenium test to check the workspace details of workspace with single machine #7946
Conversation
…eTest and WorkspaceDetailsSingleMachineTest
…spaceDetailsSeleniumTestChe6
…spaceDetailsSeleniumTestChe6
…ace started before checking that 'machine' machine exists
@@ -177,6 +179,20 @@ public void waitReferenceIsNotPresent(String referenceId) { | |||
redrawDriverWait.until(invisibilityOfElementLocated(By.id(referenceId))); | |||
} | |||
|
|||
public Boolean checkThatServerExists(String serverName) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really need Boolean
here? May primitive type boolean
be enough?
loadPageDriverWait.until( | ||
visibilityOfAllElementsLocatedBy( | ||
By.xpath("//div[contains(@id, 'runtime-info-reference-')]"))); | ||
for (WebElement we : webElements) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Empty line above the for
can improve readability of code.
installers.put("TypeScript language server", false); | ||
installers.put("Yaml language server", false); | ||
|
||
private void createMap() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can replace the method by one command:
private static final Map<String, String> EXPECTED_VARIABLES = ImmutableMap.of("MYSQL_DATABASE", "petclinic",
"MYSQL_PASSWORD", "password",
"MYSQL_ROOT_PASSWORD", "password",
"MYSQL_USER", "petclinic");
@BeforeClass | ||
public void setUp() throws Exception { | ||
workspaceName = testWorkspace.getName(); | ||
createMap(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this method could by replaced by the command:
private static final Map<String, Boolean> EXPECTED_INSTALLERS = ImmutableMap.<String, Boolean>builder()
.put("C# language server", false)
.put("Exec", false)
.put("File sync", false)
.put("Git credentials", false)
.put("JSON language server", false)
.put("PHP language server", false)
.put("Python language server", false)
.put("Simple Test language server", false)
.put("SSH", false)
.put("Terminal", true)
.put("TypeScript language server", false)
.put("Yaml language server", false)
.build();
ci-build |
Build success. https://ci.codenvycorp.com/job/che-pullrequests-build/4401/ |
What does this PR do?
This PR create a selenium test for testing the workspace details of a workspace with single machine.
The existed WorkspaceDetailsTest selenium test splitted to WorkspaceDetailsSingleMachineTest and WorkspaceDetailsComposeTest tests.
In WorkspaceDetailsComposeTest will be tested the Machines and the Env Variables tabs in workspace created from the Java-MySql stack.
In WorkspaceDetailsSingleMachineTest will be tested the Overview, the Projects, the Installers and the Servers tabs.
What issues does this PR fix or reference?
#7919