blob: 4f06ece2603417334c6cc5dc03550390e0ab976f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
package com.vaadin.tests.components.combobox;
import static org.junit.Assert.assertTrue;
import org.junit.Test;
import org.openqa.selenium.WebElement;
import com.vaadin.testbench.By;
import com.vaadin.testbench.elements.ComboBoxElement;
import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* @author Vaadin Ltd
*/
public class ComboBoxSuggestionPopupWidthTest extends MultiBrowserTest {
@Test
public void suggestionPopupWidthTest() throws Exception {
openTestURL();
waitForElementVisible(By.className("width-as-percentage"));
WebElement selectTextbox = $(ComboBoxElement.class).first()
.findElement(By.vaadin("#textbox"));
selectTextbox.click();
ComboBoxElement cb = $(ComboBoxElement.class).first();
cb.openPopup();
WebElement popup = cb.getSuggestionPopup();
int width = popup.getSize().getWidth();
assertTrue(width == 200);
}
};
|