diff options
author | Artur Signell <artur@vaadin.com> | 2013-03-24 16:38:45 +0200 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2013-03-28 07:27:01 +0000 |
commit | a2a8666118de8b8f746e631a3aab4c58d2d4a6af (patch) | |
tree | 57ea2053e10543840906dd1506bfb1c0bec751f6 /uitest | |
parent | 5e77672975c6d272072baeec77005c847535fd97 (diff) | |
download | vaadin-framework-a2a8666118de8b8f746e631a3aab4c58d2d4a6af.tar.gz vaadin-framework-a2a8666118de8b8f746e631a3aab4c58d2d4a6af.zip |
Added Page.reload (#10250)
Change-Id: I8ec7edbc370388d8b36a474a8845e846395f26ed
Diffstat (limited to 'uitest')
-rw-r--r-- | uitest/src/com/vaadin/tests/components/page/PageReload.html | 46 | ||||
-rw-r--r-- | uitest/src/com/vaadin/tests/components/page/PageReload.java | 34 |
2 files changed, 80 insertions, 0 deletions
diff --git a/uitest/src/com/vaadin/tests/components/page/PageReload.html b/uitest/src/com/vaadin/tests/components/page/PageReload.html new file mode 100644 index 0000000000..20d61a48f1 --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/page/PageReload.html @@ -0,0 +1,46 @@ +<?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="" /> +<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.page.PageReload?restartApplication</td> + <td></td> +</tr> +<tr> + <td>assertText</td> + <td>vaadin=runcomvaadintestscomponentspagePageReload::PID_SLog_row_0</td> + <td>1. UI id: 0</td> +</tr> +<tr> + <td>open</td> + <td>/run/com.vaadin.tests.components.page.PageReload</td> + <td></td> +</tr> +<tr> + <td>assertText</td> + <td>vaadin=runcomvaadintestscomponentspagePageReload::PID_SLog_row_0</td> + <td>1. UI id: 1</td> +</tr> +<tr> + <td>clickAndWait</td> + <td>vaadin=runcomvaadintestscomponentspagePageReload::/VVerticalLayout[0]/Slot[2]/VVerticalLayout[0]/Slot[0]/VButton[0]/domChild[0]/domChild[0]</td> + <td></td> +</tr> +<tr> + <td>assertText</td> + <td>vaadin=runcomvaadintestscomponentspagePageReload::PID_SLog_row_0</td> + <td>1. UI id: 2</td> +</tr> +</tbody></table> +</body> +</html> diff --git a/uitest/src/com/vaadin/tests/components/page/PageReload.java b/uitest/src/com/vaadin/tests/components/page/PageReload.java new file mode 100644 index 0000000000..c1799b29e3 --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/page/PageReload.java @@ -0,0 +1,34 @@ +package com.vaadin.tests.components.page; + +import com.vaadin.server.VaadinRequest; +import com.vaadin.tests.components.AbstractTestUIWithLog; +import com.vaadin.ui.Button; +import com.vaadin.ui.Button.ClickEvent; +import com.vaadin.ui.Button.ClickListener; + +public class PageReload extends AbstractTestUIWithLog { + + @Override + protected void setup(VaadinRequest request) { + Button b = new Button("Press to reload"); + b.addClickListener(new ClickListener() { + @Override + public void buttonClick(ClickEvent event) { + getPage().reload(); + } + }); + addComponent(b); + log("UI id: " + getUIId()); + } + + @Override + protected String getTestDescription() { + return "Tests Page.reload(). Click button to refresh the page."; + } + + @Override + protected Integer getTicketNumber() { + return 10250; + } + +} |