diff options
author | Teemu Suo-Anttila <teemusa@vaadin.com> | 2015-03-05 13:28:51 +0200 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2015-04-16 10:16:36 +0000 |
commit | 522c3dd8f3b64e772f7e41205308fc24a56426f4 (patch) | |
tree | 54b2f1fff6e253674c377120718a7c4ef6b1198d /uitest/src/com/vaadin/tests/fieldgroup/CommitHandlerFailuresTest.java | |
parent | ab8a0268652b81b20be8d5dbf0deeb7029e9edec (diff) | |
download | vaadin-framework-522c3dd8f3b64e772f7e41205308fc24a56426f4.tar.gz vaadin-framework-522c3dd8f3b64e772f7e41205308fc24a56426f4.zip |
Convert some TB2 tests to TB4
- components/ui/CurrentUiRetainedTest
- components/ui/InitiallyEmptyFragmentTest
- components/ui/PollListeningTest
- components/ui/RpcInvocationHandlerToStringTest
- components/ui/UIAccessExceptionHandlingTest
- components/ui/UIInitBrowserDetailsTest
- components/ui/UIInitExceptionTest
- components/ui/UIPollingTest
- components/ui/UITabIndexTest
- components/ui/UIsInMultipleTabsTest
- components/window/CloseSubWindowTest
- components/window/ExtraWindowShownTest
- components/window/RepaintWindowContentsTest
- components/window/WindowShouldRemoveActionHandlerTest
- components/window/WindowWithInvalidCloseListenerTest
- containers/sqlcontainer/TableQueryWithNonUniqueFirstPrimaryKeyTest
- converter/ConverterThatEnforcesAFormatTest
- dd/DnDOnSubtreeTest
- fieldgroup/BasicPersonFormTest
- fieldgroup/CommitHandlerFailuresTest
- fieldgroup/CommitWithValidationOrConversionErrorTest
- fieldgroup/DateFormTest
- fieldgroup/FieldGroupDiscardTest
- fields/TabIndexesTest
renamed:
- components/ui/PollListenerTest -> PollListening
Change-Id: Iac3c153709f6edca28d9f75a85246f1a70176963
Diffstat (limited to 'uitest/src/com/vaadin/tests/fieldgroup/CommitHandlerFailuresTest.java')
-rw-r--r-- | uitest/src/com/vaadin/tests/fieldgroup/CommitHandlerFailuresTest.java | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/uitest/src/com/vaadin/tests/fieldgroup/CommitHandlerFailuresTest.java b/uitest/src/com/vaadin/tests/fieldgroup/CommitHandlerFailuresTest.java new file mode 100644 index 0000000000..545c9c2e71 --- /dev/null +++ b/uitest/src/com/vaadin/tests/fieldgroup/CommitHandlerFailuresTest.java @@ -0,0 +1,60 @@ +package com.vaadin.tests.fieldgroup; + +import org.junit.Test; +import org.openqa.selenium.Keys; + +public class CommitHandlerFailuresTest extends BasicPersonFormTest { + + @Override + public void setup() throws Exception { + super.setup(); + openTestURL(); + } + + @Test + public void testDefaults() { + assertDefaults(); + assertBeanValuesUnchanged(); + } + + @Test + public void testUpdatingWithoutCommit() { + updateFields(); + assertBeanValuesUnchanged(); + } + + @Test + public void testPreCommitFails() { + updateFields(); + + getPreCommitFailsCheckBox().click(); + assertCommitFails(); + + assertBeanValuesUnchanged(); + } + + @Test + public void testPostCommitFails() { + updateFields(); + + getPostCommitFailsCheckBox().click(); + assertCommitFails(); + + assertBeanValuesUnchanged(); + } + + @Test + public void testDiscard() { + updateFields(); + assertDiscardResetsFields(); + assertBeanValuesUnchanged(); + } + + private void updateFields() { + getLastNameArea().sendKeys("Doeve", Keys.ENTER); + getFirstNameField().sendKeys("Mike", Keys.ENTER); + getEmailField().sendKeys("me@me.com", Keys.ENTER); + getAgeField().sendKeys("12", Keys.ENTER); + getGenderTable().getCell(2, 0).click(); + } +} |