blob: 7d8beb2106b8c0469b55b73fe93a595b05367b72 (
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
|
package com.vaadin.tests.fieldgroup;
import org.junit.Test;
import org.openqa.selenium.Keys;
public class FieldGroupDiscardTest extends BasicPersonFormTest {
@Test
public void testFieldGroupDiscard() throws Exception {
openTestURL();
assertDefaults();
/* make some changes */
getFirstNameField().sendKeys("John123", Keys.ENTER);
getLastNameArea().sendKeys("Doe123", Keys.ENTER);
getEmailField().sendKeys("john@doe.com123", Keys.ENTER);
getAgeField().sendKeys("64123", Keys.ENTER);
getGenderTable().getCell(2, 0);
getDeceasedField().click();
getDeceasedField().click();
getDeceasedField().sendKeys("YAY!", Keys.ENTER);
assertBeanValuesUnchanged();
assertDiscardResetsFields();
assertBeanValuesUnchanged();
/* we should still be at the state we started from */
assertDefaults();
}
}
|