From 3940d851365ce4d18c599893aed7dfa4b5e0f46f Mon Sep 17 00:00:00 2001 From: Leif Åstrand Date: Mon, 23 Sep 2013 16:06:17 +0300 Subject: Use explicit button for reading asynchronously created messages (#10338) Change-Id: Icde7e1f612ed60867b3d3d58aedbe36d16ad61a5 --- .../com/vaadin/tests/application/DetachOldUIOnReload.html | 15 +++++++++++++++ .../com/vaadin/tests/application/DetachOldUIOnReload.java | 13 +++++++++---- 2 files changed, 24 insertions(+), 4 deletions(-) (limited to 'uitest') diff --git a/uitest/src/com/vaadin/tests/application/DetachOldUIOnReload.html b/uitest/src/com/vaadin/tests/application/DetachOldUIOnReload.html index 038283324d..33fc46f060 100644 --- a/uitest/src/com/vaadin/tests/application/DetachOldUIOnReload.html +++ b/uitest/src/com/vaadin/tests/application/DetachOldUIOnReload.html @@ -26,6 +26,11 @@ /run/com.vaadin.tests.application.DetachOldUIOnReload + + click + vaadin=runcomvaadintestsapplicationDetachOldUIOnReload::/VVerticalLayout[0]/Slot[2]/VVerticalLayout[0]/Slot[2]/VButton[0]/domChild[0]/domChild[0] + + assertText vaadin=runcomvaadintestsapplicationDetachOldUIOnReload::PID_SLog_row_0 @@ -41,6 +46,11 @@ vaadin=runcomvaadintestsapplicationDetachOldUIOnReload::/VVerticalLayout[0]/Slot[2]/VVerticalLayout[0]/Slot[1]/VButton[0]/domChild[0]/domChild[0] + + click + vaadin=runcomvaadintestsapplicationDetachOldUIOnReload::/VVerticalLayout[0]/Slot[2]/VVerticalLayout[0]/Slot[2]/VButton[0]/domChild[0]/domChild[0] + + assertText vaadin=runcomvaadintestsapplicationDetachOldUIOnReload::PID_SLog_row_0 @@ -61,6 +71,11 @@ /run/com.vaadin.tests.application.DetachOldUIOnReload + + click + vaadin=runcomvaadintestsapplicationDetachOldUIOnReload::/VVerticalLayout[0]/Slot[2]/VVerticalLayout[0]/Slot[2]/VButton[0]/domChild[0]/domChild[0] + + assertText vaadin=runcomvaadintestsapplicationDetachOldUIOnReload::PID_SLog_row_0 diff --git a/uitest/src/com/vaadin/tests/application/DetachOldUIOnReload.java b/uitest/src/com/vaadin/tests/application/DetachOldUIOnReload.java index 7104146203..154c84b4f5 100644 --- a/uitest/src/com/vaadin/tests/application/DetachOldUIOnReload.java +++ b/uitest/src/com/vaadin/tests/application/DetachOldUIOnReload.java @@ -31,10 +31,6 @@ public class DetachOldUIOnReload extends AbstractTestUIWithLog { @Override protected void setup(VaadinRequest request) { - for (String message : getSessionMessages(false)) { - log(message); - } - addComponent(new Label("This is UI " + getUIId())); addComponent(new Button("Reload page", new Button.ClickListener() { @Override @@ -42,6 +38,15 @@ public class DetachOldUIOnReload extends AbstractTestUIWithLog { getPage().reload(); } })); + addComponent(new Button("Read log messages from session", + new Button.ClickListener() { + @Override + public void buttonClick(ClickEvent event) { + for (String message : getSessionMessages(false)) { + log(message); + } + } + })); } private List getSessionMessages(boolean storeIfNeeded) { -- cgit v1.2.3