From 37b8142db5ceabe60cb0449fbc1164d153db7488 Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Wed, 6 Aug 2014 19:00:26 +0300 Subject: [PATCH] Converted serialization test to be run in validation builds Change-Id: Ia6f809349a8ee81bd2d150176c69c6d6ae10491f --- .../tests/components/ui/UISerialization.html | 41 ------------------- .../components/ui/UISerializationTest.java | 26 ++++++++++++ 2 files changed, 26 insertions(+), 41 deletions(-) delete mode 100644 uitest/src/com/vaadin/tests/components/ui/UISerialization.html create mode 100644 uitest/src/com/vaadin/tests/components/ui/UISerializationTest.java 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"))); + } +} -- 2.39.5