blob: 241f7c6ffcb446a2616e5697c8bf5fe64ca15fe4 (
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
|
package com.vaadin.tests.elements.optiongroup;
import static org.junit.Assert.assertEquals;
import org.junit.Before;
import org.junit.Test;
import com.vaadin.testbench.elements.OptionGroupElement;
import com.vaadin.tests.tb3.MultiBrowserTest;
public class OptionGroupSetValueTest extends MultiBrowserTest {
private static final String NEW_VALUE = "item2";
private OptionGroupElement group;
@Before
public void init() {
openTestURL();
group = $(OptionGroupElement.class).first();
}
@Test
public void testSetValue() {
group.setValue(NEW_VALUE);
assertEquals(NEW_VALUE, group.getValue());
}
@Test
public void testSelectByText() {
group.selectByText(NEW_VALUE);
assertEquals(NEW_VALUE, group.getValue());
}
}
|