diff options
author | Artur Signell <artur@vaadin.com> | 2014-08-06 19:00:26 +0300 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2014-08-11 19:21:41 +0000 |
commit | 37b8142db5ceabe60cb0449fbc1164d153db7488 (patch) | |
tree | 9cbe61c988ffb58eac154f5243e5626eb97d4487 /uitest/src/com/vaadin/tests | |
parent | 1e7b64901e014f6d3336045616df9dba1df97c25 (diff) | |
download | vaadin-framework-37b8142db5ceabe60cb0449fbc1164d153db7488.tar.gz vaadin-framework-37b8142db5ceabe60cb0449fbc1164d153db7488.zip |
Converted serialization test to be run in validation builds
Change-Id: Ia6f809349a8ee81bd2d150176c69c6d6ae10491f
Diffstat (limited to 'uitest/src/com/vaadin/tests')
-rw-r--r-- | uitest/src/com/vaadin/tests/components/ui/UISerialization.html | 41 | ||||
-rw-r--r-- | uitest/src/com/vaadin/tests/components/ui/UISerializationTest.java | 26 |
2 files changed, 26 insertions, 41 deletions
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 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head profile="http://selenium-ide.openqa.org/profiles/test-case"> -<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> -<link rel="selenium.base" href="http://localhost:8888/" /> -<title>New Test</title> -</head> -<body> -<table cellpadding="1" cellspacing="1" border="1"> -<thead> -<tr><td rowspan="1" colspan="3">New Test</td></tr> -</thead><tbody> -<tr> - <td>open</td> - <td>/run/com.vaadin.tests.components.ui.UISerialization?restartApplication</td> - <td></td> -</tr> -<tr> - <td>click</td> - <td>vaadin=runcomvaadintestscomponentsuiUISerialization::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VButton[0]/domChild[0]/domChild[0]</td> - <td></td> -</tr> -<tr> - <td>assertText</td> - <td>vaadin=runcomvaadintestscomponentsuiUISerialization::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VLabel[0]</td> - <td>3. Diff states match, size: *</td> -</tr> -<tr> - <td>assertText</td> - <td>vaadin=runcomvaadintestscomponentsuiUISerialization::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VLabel[0]</td> - <td>2. Deserialized UI in *ms</td> -</tr> -<tr> - <td>assertText</td> - <td>vaadin=runcomvaadintestscomponentsuiUISerialization::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VVerticalLayout[0]/VOrderedLayout$Slot[2]/VLabel[0]</td> - <td>1. Serialized UI in *ms into * bytes</td> -</tr> -</tbody></table> -</body> -</html> 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"))); + } +} |