package org.camunda.bpm.cockpit;


import org.camunda.bpm.AbstractWebappUiIntegrationTest;
import org.junit.Test;
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;

import java.net.URI;
import java.net.URISyntaxException;


public class DashboardIT extends AbstractWebappUiIntegrationTest {

  public DashboardIT() {
    super("/camunda/app/cockpit");
  }

  @Test
  public void testLogin() throws URISyntaxException {
    driver.get(appUrl+"/#/login");

    WebDriverWait wait = new WebDriverWait(driver, 10);

    WebElement user = wait.until(ExpectedConditions.presenceOfElementLocated(By.cssSelector("input[type=\"text\"]")));
    user.sendKeys("demo");

    WebElement password= wait.until(ExpectedConditions.presenceOfElementLocated(By.cssSelector("input[type=\"password\"]")));
    password.sendKeys("demo");

    WebElement submit = wait.until(ExpectedConditions.presenceOfElementLocated(By.cssSelector("button[type=\"submit\"]")));
    submit.submit();

    wait.until(ExpectedConditions.textToBePresentInElementLocated(By.cssSelector("[ng-repeat=\"propName in procDefStatsKeys\"]:first-child > .value"), "1"));
    wait.until(ExpectedConditions.textToBePresentInElementLocated(By.cssSelector("[ng-repeat=\"propName in procDefStatsKeys\"]:first-child > a"), "process definition"));

    wait.until(currentURIIs(new URI(appUrl + "/default/#/dashboard")));
  }

}

@@ -1173,64 +1173,25 @@
 or(%22
-%5Bng-repeat=%5C%22propName in procDefStatsKeys%5C%22%5D:first-child
+.prop-definitions
  %3E .
@@ -1292,64 +1292,25 @@
 or(%22
-%5Bng-repeat=%5C%22propName in procDefStatsKeys%5C%22%5D:first-child
+.prop-definitions
  %3E a
@@ -1314,17 +1314,17 @@
 %3E a%22), %22
-p
+P
 rocess d

change selectors to reflect changes in HTML