blob: 6794319ccb18ce0951f6c46909d173ae2e4fb6c2 (
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
|
package com.vaadin.tests.elements.combobox;
import static org.junit.Assert.assertEquals;
import java.util.ArrayList;
import java.util.List;
import org.junit.Test;
import com.vaadin.testbench.elements.ComboBoxElement;
import com.vaadin.tests.tb3.MultiBrowserTest;
public class ComboBoxGetSuggestionsTest extends MultiBrowserTest {
@Test
public void testSuggestions() {
openTestURL();
ComboBoxElement cb = $(ComboBoxElement.class).get(0);
List<String> suggestions = cb.getPopupSuggestions();
List<String> expectedSuggestions = new ArrayList<String>();
for (int i = 1; i < 11; i++) {
expectedSuggestions.add("item" + i);
}
assertEquals(expectedSuggestions, suggestions);
}
}
|