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.

LayoutDuringStateUpdateTest.java 827B

12345678910111213141516171819202122232425262728
  1. package com.vaadin.tests.layoutmanager;
  2. import static org.junit.Assert.assertEquals;
  3. import org.junit.Test;
  4. import org.openqa.selenium.By;
  5. import org.openqa.selenium.WebElement;
  6. import com.vaadin.testbench.elements.ButtonElement;
  7. import com.vaadin.tests.tb3.SingleBrowserTest;
  8. public class LayoutDuringStateUpdateTest extends SingleBrowserTest {
  9. @Test
  10. public void layoutDuringStateUpdate() {
  11. openTestURL();
  12. waitUntilLoadingIndicatorNotVisible();
  13. // add the custom component
  14. $(ButtonElement.class).first().click();
  15. waitUntilLoadingIndicatorNotVisible();
  16. // ensure the layouting failed to be triggered during the state update
  17. WebElement label = findElement(By.className("gwt-Label"));
  18. assertEquals("Layout phase count: 1", label.getText());
  19. }
  20. }