From: Artur Signell Date: Wed, 6 Aug 2014 16:00:26 +0000 (+0300) Subject: Converted serialization test to be run in validation builds X-Git-Tag: 7.3.0.rc1~11^2~15 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=37b8142db5ceabe60cb0449fbc1164d153db7488;p=vaadin-framework.git Converted serialization test to be run in validation builds Change-Id: Ia6f809349a8ee81bd2d150176c69c6d6ae10491f --- diff --git a/uitest/src/com/vaadin/tests/components/ui/UISerialization.html b/uitest/src/com/vaadin/tests/components/ui/UISerialization.html deleted file mode 100644 index 2379882a2c..0000000000 --- a/uitest/src/com/vaadin/tests/components/ui/UISerialization.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - -New Test - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
New Test
open/run/com.vaadin.tests.components.ui.UISerialization?restartApplication
clickvaadin=runcomvaadintestscomponentsuiUISerialization::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VButton[0]/domChild[0]/domChild[0]
assertTextvaadin=runcomvaadintestscomponentsuiUISerialization::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VLabel[0]3. Diff states match, size: *
assertTextvaadin=runcomvaadintestscomponentsuiUISerialization::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VLabel[0]2. Deserialized UI in *ms
assertTextvaadin=runcomvaadintestscomponentsuiUISerialization::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VVerticalLayout[0]/VOrderedLayout$Slot[2]/VLabel[0]1. Serialized UI in *ms into * bytes
- - diff --git a/uitest/src/com/vaadin/tests/components/ui/UISerializationTest.java b/uitest/src/com/vaadin/tests/components/ui/UISerializationTest.java new file mode 100644 index 0000000000..cbe4dbdf29 --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/ui/UISerializationTest.java @@ -0,0 +1,26 @@ +package com.vaadin.tests.components.ui; + +import static org.hamcrest.Matchers.allOf; +import static org.hamcrest.Matchers.containsString; +import static org.hamcrest.Matchers.endsWith; +import static org.hamcrest.Matchers.startsWith; +import static org.junit.Assert.assertThat; + +import org.junit.Test; + +import com.vaadin.testbench.elements.ButtonElement; +import com.vaadin.tests.tb3.SingleBrowserTest; + +public class UISerializationTest extends SingleBrowserTest { + @Test + public void tb2test() throws Exception { + openTestURL(); + $(ButtonElement.class).first().click(); + assertThat(getLogRow(0), startsWith("3. Diff states match, size: ")); + assertThat(getLogRow(1), startsWith("2. Deserialized UI in ")); + assertThat( + getLogRow(2), + allOf(startsWith("1. Serialized UI in"), + containsString(" into "), endsWith(" bytes"))); + } +}