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.

AbstractServletIntegrationTest.java 932B

123456789101112131415161718192021222324252627282930
  1. package com.vaadin.tests.integration;
  2. import org.junit.Assert;
  3. import org.junit.Test;
  4. import com.vaadin.testbench.elements.GridElement;
  5. import com.vaadin.testbench.elements.LabelElement;
  6. public abstract class AbstractServletIntegrationTest
  7. extends AbstractIntegrationTest {
  8. @Test
  9. public void runTest() throws Exception {
  10. // Test initial state
  11. GridElement grid = $(GridElement.class).first();
  12. Assert.assertFalse("Row should not be initially selected",
  13. grid.getRow(0).isSelected());
  14. compareScreen("initial");
  15. // Test selection and side effects
  16. grid.getCell(0, 1).click();
  17. Assert.assertTrue("Row should be selected on click",
  18. grid.getRow(0).isSelected());
  19. Assert.assertEquals("Text label should contain 'FI'", "FI",
  20. $(LabelElement.class).first().getText());
  21. compareScreen("finland");
  22. }
  23. }