You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

GridWithoutRendererTest.java 1.1KB

123456789101112131415161718192021222324252627282930313233343536
  1. package com.vaadin.v7.tests.components.grid;
  2. import static org.junit.Assert.assertFalse;
  3. import static org.junit.Assert.assertTrue;
  4. import java.util.List;
  5. import org.junit.Test;
  6. import org.openqa.selenium.By;
  7. import org.openqa.selenium.WebElement;
  8. import com.vaadin.testbench.elements.ButtonElement;
  9. import com.vaadin.testbench.parallel.TestCategory;
  10. import com.vaadin.tests.tb3.SingleBrowserTest;
  11. @TestCategory("grid")
  12. public class GridWithoutRendererTest extends SingleBrowserTest {
  13. @Test
  14. public void ensureNoError() {
  15. openTestURL();
  16. waitForElementPresent(By.className("v-grid"));
  17. List<WebElement> errorIndicator = findElements(
  18. By.className("v-errorindicator"));
  19. assertTrue("There should not be an error indicator",
  20. errorIndicator.isEmpty());
  21. // add an error to ensure that the check is correct
  22. $(ButtonElement.class).first().click();
  23. errorIndicator = findElements(By.className("v-errorindicator"));
  24. assertFalse("There should be an error indicator",
  25. errorIndicator.isEmpty());
  26. }
  27. }