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.

ComboboxScrollableWindowTest.java 1.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. package com.vaadin.tests.components.window;
  2. import static com.vaadin.tests.components.window.ComboboxScrollableWindow.COMBOBOX_ID;
  3. import static com.vaadin.tests.components.window.ComboboxScrollableWindow.WINDOW_ID;
  4. import java.util.List;
  5. import org.junit.Test;
  6. import org.openqa.selenium.WebElement;
  7. import org.openqa.selenium.remote.DesiredCapabilities;
  8. import com.vaadin.testbench.By;
  9. import com.vaadin.testbench.commands.TestBenchElementCommands;
  10. import com.vaadin.testbench.elements.ComboBoxElement;
  11. import com.vaadin.testbench.elements.WindowElement;
  12. import com.vaadin.tests.tb3.MultiBrowserTest;
  13. /**
  14. * Tests that a ComboBox at the bottom of a Window remains visible when clicked.
  15. *
  16. * @author Vaadin Ltd
  17. */
  18. public class ComboboxScrollableWindowTest extends MultiBrowserTest {
  19. @Override
  20. public List<DesiredCapabilities> getBrowsersToTest() {
  21. // Fix to #10652 broke this for PhantomJS
  22. return getBrowsersExcludingPhantomJS();
  23. }
  24. @Test
  25. public void testWindowScrollbars() throws Exception {
  26. openTestURL();
  27. WindowElement window = $(WindowElement.class).id(WINDOW_ID);
  28. WebElement scrollableElement = window
  29. .findElement(By.className("v-scrollable"));
  30. TestBenchElementCommands scrollable = testBenchElement(
  31. scrollableElement);
  32. scrollable.scroll(1000);
  33. ComboBoxElement comboBox = $(ComboBoxElement.class).id(COMBOBOX_ID);
  34. comboBox.openPopup();
  35. waitForElementPresent(By.className("v-filterselect-suggestpopup"));
  36. compareScreen("combobox-open");
  37. }
  38. }