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.

UIsInMultipleTabsTest.java 674B

1234567891011121314151617181920212223242526
  1. package com.vaadin.tests.components.ui;
  2. import static org.junit.Assert.assertEquals;
  3. import org.junit.Test;
  4. import com.vaadin.testbench.elements.LabelElement;
  5. import com.vaadin.tests.tb3.MultiBrowserTest;
  6. public class UIsInMultipleTabsTest extends MultiBrowserTest {
  7. @Test
  8. public void testPageReloadChangesUI() throws Exception {
  9. openTestURL();
  10. assertUI(1);
  11. openTestURL();
  12. assertUI(2);
  13. openTestURL("restartApplication");
  14. assertUI(1);
  15. }
  16. private void assertUI(int i) {
  17. assertEquals("Unexpected UI found,", "This is UI number " + i,
  18. $(LabelElement.class).first().getText());
  19. }
  20. }