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: add selenium test to check the workspace details of workspace with single machine #7946

Merged
merged 9 commits into from
Dec 19, 2017

Conversation

SkorikSergey
Copy link
Contributor

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.
selection_093

In WorkspaceDetailsSingleMachineTest will be tested the Overview, the Projects, the Installers and the Servers tabs.
selection_094

What issues does this PR fix or reference?

#7919

@SkorikSergey SkorikSergey added kind/task Internal things, technical debt, and to-do tasks to be performed. status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community. target/che6 labels Dec 19, 2017
@@ -177,6 +179,20 @@ public void waitReferenceIsNotPresent(String referenceId) {
redrawDriverWait.until(invisibilityOfElementLocated(By.id(referenceId)));
}

public Boolean checkThatServerExists(String serverName) {
Copy link
Contributor

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) {
Copy link
Contributor

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() {
Copy link
Contributor

@dmytro-ndp dmytro-ndp Dec 19, 2017

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();
Copy link
Contributor

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();

@SkorikSergey
Copy link
Contributor Author

ci-build

@SkorikSergey SkorikSergey merged commit 33feb47 into che6 Dec 19, 2017
@SkorikSergey SkorikSergey deleted the reworkWorkspaceDetailsSeleniumTestChe6 branch December 19, 2017 15:41
@codenvy-ci
Copy link

@benoitf benoitf added this to the 6.0.0-M4 milestone Dec 19, 2017
@benoitf benoitf removed the status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community. label Dec 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/task Internal things, technical debt, and to-do tasks to be performed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants