diff options
author | Teemu Suo-Anttila <teemusa@vaadin.com> | 2015-03-05 13:28:51 +0200 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2015-04-16 10:16:36 +0000 |
commit | 522c3dd8f3b64e772f7e41205308fc24a56426f4 (patch) | |
tree | 54b2f1fff6e253674c377120718a7c4ef6b1198d /uitest | |
parent | ab8a0268652b81b20be8d5dbf0deeb7029e9edec (diff) | |
download | vaadin-framework-522c3dd8f3b64e772f7e41205308fc24a56426f4.tar.gz vaadin-framework-522c3dd8f3b64e772f7e41205308fc24a56426f4.zip |
Convert some TB2 tests to TB4
- components/ui/CurrentUiRetainedTest
- components/ui/InitiallyEmptyFragmentTest
- components/ui/PollListeningTest
- components/ui/RpcInvocationHandlerToStringTest
- components/ui/UIAccessExceptionHandlingTest
- components/ui/UIInitBrowserDetailsTest
- components/ui/UIInitExceptionTest
- components/ui/UIPollingTest
- components/ui/UITabIndexTest
- components/ui/UIsInMultipleTabsTest
- components/window/CloseSubWindowTest
- components/window/ExtraWindowShownTest
- components/window/RepaintWindowContentsTest
- components/window/WindowShouldRemoveActionHandlerTest
- components/window/WindowWithInvalidCloseListenerTest
- containers/sqlcontainer/TableQueryWithNonUniqueFirstPrimaryKeyTest
- converter/ConverterThatEnforcesAFormatTest
- dd/DnDOnSubtreeTest
- fieldgroup/BasicPersonFormTest
- fieldgroup/CommitHandlerFailuresTest
- fieldgroup/CommitWithValidationOrConversionErrorTest
- fieldgroup/DateFormTest
- fieldgroup/FieldGroupDiscardTest
- fields/TabIndexesTest
renamed:
- components/ui/PollListenerTest -> PollListening
Change-Id: Iac3c153709f6edca28d9f75a85246f1a70176963
Diffstat (limited to 'uitest')
63 files changed, 1463 insertions, 2218 deletions
diff --git a/uitest/src/com/vaadin/tests/components/ui/CurrentUiRetainedTest.java b/uitest/src/com/vaadin/tests/components/ui/CurrentUiRetainedTest.java new file mode 100644 index 0000000000..d4e1ecb5ce --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/ui/CurrentUiRetainedTest.java @@ -0,0 +1,24 @@ +package com.vaadin.tests.components.ui; + +import org.junit.Assert; +import org.junit.Test; + +import com.vaadin.testbench.elements.ButtonElement; +import com.vaadin.tests.tb3.MultiBrowserTest; + +public class CurrentUiRetainedTest extends MultiBrowserTest { + @Test + public void testCurrentUiRetained() throws Exception { + openTestURL(); + $(ButtonElement.class).first().click(); + assertLogText(3, "1. Correct UI.getCurrent before GC: true"); + assertLogText(2, "2. Correct UI.getCurrent after GC: true"); + assertLogText(1, "3. GC probe available before GC: true"); + assertLogText(0, "4. GC probe available after GC: false"); + } + + private void assertLogText(int index, String expected) { + Assert.assertEquals("Unexpected log contents,", expected, + getLogRow(index)); + } +} diff --git a/uitest/src/com/vaadin/tests/components/ui/InitialFragmentEvent.java b/uitest/src/com/vaadin/tests/components/ui/InitialFragmentEvent.java index ce8ca8e083..d8d197c881 100644 --- a/uitest/src/com/vaadin/tests/components/ui/InitialFragmentEvent.java +++ b/uitest/src/com/vaadin/tests/components/ui/InitialFragmentEvent.java @@ -3,15 +3,13 @@ package com.vaadin.tests.components.ui; import com.vaadin.server.Page.UriFragmentChangedEvent; import com.vaadin.server.Page.UriFragmentChangedListener; import com.vaadin.server.VaadinRequest; -import com.vaadin.tests.components.AbstractTestUI; -import com.vaadin.tests.util.Log; +import com.vaadin.tests.components.AbstractTestUIWithLog; import com.vaadin.ui.Button; import com.vaadin.ui.Button.ClickEvent; -public class InitialFragmentEvent extends AbstractTestUI { +public class InitialFragmentEvent extends AbstractTestUIWithLog { private String lastKnownFragment = "\"no event received\""; - private Log log = new Log(5); @Override protected void setup(VaadinRequest request) { @@ -22,28 +20,25 @@ public class InitialFragmentEvent extends AbstractTestUI { public void uriFragmentChanged( UriFragmentChangedEvent source) { String newFragment = source.getUriFragment(); - log.log("Fragment changed from " + lastKnownFragment + log("Fragment changed from " + lastKnownFragment + " to " + newFragment); lastKnownFragment = newFragment; } }); - addComponent(log); - addComponent(new Button("Set fragment to 'foo'", - new Button.ClickListener() { - - @Override - public void buttonClick(ClickEvent event) { - setFragment("foo"); - } - })); - addComponent(new Button("Set fragment to 'bar'", - new Button.ClickListener() { - - @Override - public void buttonClick(ClickEvent event) { - setFragment("bar"); - } - })); + addButton("Set fragment to 'foo'", new Button.ClickListener() { + + @Override + public void buttonClick(ClickEvent event) { + setFragment("foo"); + } + }); + addButton("Set fragment to 'bar'", new Button.ClickListener() { + + @Override + public void buttonClick(ClickEvent event) { + setFragment("bar"); + } + }); } protected void setFragment(String fragment) { @@ -52,14 +47,12 @@ public class InitialFragmentEvent extends AbstractTestUI { @Override protected Integer getTicketNumber() { - // TODO Auto-generated method stub - return null; + return 9558; } @Override protected String getTestDescription() { - // TODO Auto-generated method stub - return null; + return "URI fragment handling should fire for initial fragment change"; } } diff --git a/uitest/src/com/vaadin/tests/components/ui/InitiallyEmptyFragmentTest.java b/uitest/src/com/vaadin/tests/components/ui/InitiallyEmptyFragmentTest.java new file mode 100644 index 0000000000..fc948ab3db --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/ui/InitiallyEmptyFragmentTest.java @@ -0,0 +1,30 @@ +package com.vaadin.tests.components.ui; + +import org.junit.Assert; +import org.junit.Test; + +import com.vaadin.tests.tb3.MultiBrowserTest; + +public class InitiallyEmptyFragmentTest extends MultiBrowserTest { + + @Override + protected Class<?> getUIClass() { + return InitialFragmentEvent.class; + } + + @Test + public void testNoFragmentChangeEventWhenInitiallyEmpty() throws Exception { + openTestURL(); + /* + * There is no fragment change event when the fragment is initially + * empty + */ + assertLogText(" "); + executeScript("window.location.hash='bar'"); + assertLogText("1. Fragment changed from \"no event received\" to bar"); + } + + private void assertLogText(String expected) { + Assert.assertEquals("Unexpected log contents,", expected, getLogRow(0)); + } +} diff --git a/uitest/src/com/vaadin/tests/components/ui/PollListenerTest.java b/uitest/src/com/vaadin/tests/components/ui/PollListening.java index c5861147a5..1ec4f4d9f7 100644 --- a/uitest/src/com/vaadin/tests/components/ui/PollListenerTest.java +++ b/uitest/src/com/vaadin/tests/components/ui/PollListening.java @@ -22,7 +22,7 @@ import com.vaadin.server.VaadinRequest; import com.vaadin.tests.components.AbstractTestUI; import com.vaadin.ui.Label; -public class PollListenerTest extends AbstractTestUI { +public class PollListening extends AbstractTestUI { @Override protected void setup(VaadinRequest request) { diff --git a/uitest/src/com/vaadin/tests/components/ui/PollListeningTest.java b/uitest/src/com/vaadin/tests/components/ui/PollListeningTest.java new file mode 100644 index 0000000000..5770570ed1 --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/ui/PollListeningTest.java @@ -0,0 +1,32 @@ +package com.vaadin.tests.components.ui; + +import org.junit.Test; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.support.ui.ExpectedCondition; + +import com.vaadin.tests.tb3.MultiBrowserTest; + +public class PollListeningTest extends MultiBrowserTest { + + @Test + public void testReceivePollEvent() { + openTestURL(); + waitUntilPollEventReceived(); + } + + private void waitUntilPollEventReceived() { + waitUntil(new ExpectedCondition<Boolean>() { + private String expected = "PollEvent received"; + + @Override + public Boolean apply(WebDriver arg0) { + return driver.getPageSource().contains(expected); + } + + @Override + public String toString() { + return String.format("page to contain text '%s'", expected); + } + }); + } +} diff --git a/uitest/src/com/vaadin/tests/components/ui/RpcInvocationHandlerToString.java b/uitest/src/com/vaadin/tests/components/ui/RpcInvocationHandlerToString.java index 40ec51cf1f..1dbcc0ab2b 100644 --- a/uitest/src/com/vaadin/tests/components/ui/RpcInvocationHandlerToString.java +++ b/uitest/src/com/vaadin/tests/components/ui/RpcInvocationHandlerToString.java @@ -17,48 +17,42 @@ package com.vaadin.tests.components.ui; import com.vaadin.server.VaadinRequest; import com.vaadin.shared.ui.ui.PageClientRpc; -import com.vaadin.tests.components.AbstractTestUI; -import com.vaadin.tests.util.Log; +import com.vaadin.tests.components.AbstractTestUIWithLog; import com.vaadin.ui.Button; import com.vaadin.ui.Button.ClickEvent; -public class RpcInvocationHandlerToString extends AbstractTestUI { +public class RpcInvocationHandlerToString extends AbstractTestUIWithLog { - private Log log = new Log(5); PageClientRpc dummyProxy = getRpcProxy(PageClientRpc.class); @Override protected void setup(VaadinRequest request) { - addComponent(log); - Button b = new Button("Exec toString() for an invocation proxy", + addButton("Exec toString() for an invocation proxy", new Button.ClickListener() { @Override public void buttonClick(ClickEvent event) { - log.log("An invoation proxy: " + dummyProxy.toString()); + log("An invoation proxy: " + dummyProxy.toString()); } }); - addComponent(b); - b = new Button("Exec hashCode() for an invocation proxy", + addButton("Exec hashCode() for an invocation proxy", new Button.ClickListener() { @Override public void buttonClick(ClickEvent event) { - log.log("Invocation proxy.hashCode(): " + log("Invocation proxy.hashCode(): " + dummyProxy.hashCode()); } }); - addComponent(b); - b = new Button("Exec equals(false) for an invocation proxy", + addButton("Exec equals(false) for an invocation proxy", new Button.ClickListener() { @Override public void buttonClick(ClickEvent event) { - log.log("Invocation proxy.equals(false): " + log("Invocation proxy.equals(false): " + dummyProxy.equals(false)); } }); - addComponent(b); } @Override diff --git a/uitest/src/com/vaadin/tests/components/ui/RpcInvocationHandlerToStringTest.java b/uitest/src/com/vaadin/tests/components/ui/RpcInvocationHandlerToStringTest.java new file mode 100644 index 0000000000..10a297d47b --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/ui/RpcInvocationHandlerToStringTest.java @@ -0,0 +1,27 @@ +package com.vaadin.tests.components.ui; + +import org.junit.Assert; +import org.junit.Test; + +import com.vaadin.testbench.elements.ButtonElement; +import com.vaadin.testbench.elements.NotificationElement; +import com.vaadin.tests.tb3.MultiBrowserTest; + +public class RpcInvocationHandlerToStringTest extends MultiBrowserTest { + @Test + public void testMethodsOnInvocationProxy() throws Exception { + openTestURL(); + execMethodForProxy("toString()"); + execMethodForProxy("hashCode()"); + execMethodForProxy("equals(false)"); + } + + private void execMethodForProxy(String method) { + $(ButtonElement.class) + .caption("Exec " + method + " for an invocation proxy").first() + .click(); + Assert.assertFalse(method + + " for invocation proxy caused a notification", + $(NotificationElement.class).exists()); + } +} diff --git a/uitest/src/com/vaadin/tests/components/ui/UIAccessExceptionHandling.java b/uitest/src/com/vaadin/tests/components/ui/UIAccessExceptionHandling.java index 7fb5f9cd9d..bd18d93328 100644 --- a/uitest/src/com/vaadin/tests/components/ui/UIAccessExceptionHandling.java +++ b/uitest/src/com/vaadin/tests/components/ui/UIAccessExceptionHandling.java @@ -128,7 +128,7 @@ public class UIAccessExceptionHandling extends AbstractTestUIWithLog implements } catch (InterruptedException e) { e.printStackTrace(); } catch (ExecutionException e) { - log("Exception catched on get: " + e.getClass().getName()); + log("Exception caught on get: " + e.getClass().getName()); } finally { future = null; } @@ -136,6 +136,15 @@ public class UIAccessExceptionHandling extends AbstractTestUIWithLog implements } @Override + public void error(com.vaadin.server.ErrorEvent event) { + log("Exception caught on execution with " + + event.getClass().getSimpleName() + " : " + + event.getThrowable().getClass().getName()); + + DefaultErrorHandler.doDefault(event); + } + + @Override protected String getTestDescription() { return "Test for handling exceptions in UI.access and Session.access"; } @@ -145,13 +154,4 @@ public class UIAccessExceptionHandling extends AbstractTestUIWithLog implements return Integer.valueOf(12703); } - @Override - public void error(com.vaadin.server.ErrorEvent event) { - log("Exception catched on execution with " - + event.getClass().getSimpleName() + " : " - + event.getThrowable().getClass().getName()); - - DefaultErrorHandler.doDefault(event); - } - } diff --git a/uitest/src/com/vaadin/tests/components/ui/UIAccessExceptionHandlingTest.java b/uitest/src/com/vaadin/tests/components/ui/UIAccessExceptionHandlingTest.java new file mode 100644 index 0000000000..b49de55a56 --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/ui/UIAccessExceptionHandlingTest.java @@ -0,0 +1,39 @@ +package com.vaadin.tests.components.ui; + +import org.junit.Assert; +import org.junit.Test; + +import com.vaadin.testbench.elements.ButtonElement; +import com.vaadin.tests.tb3.MultiBrowserTest; + +public class UIAccessExceptionHandlingTest extends MultiBrowserTest { + + @Test + public void testExceptionHandlingOnUIAccess() throws Exception { + openTestURL(); + $(ButtonElement.class).first().click(); + assertLogTexts( + "1. Exception caught on get: java.util.concurrent.ExecutionException", + "0. Exception caught on execution with ConnectorErrorEvent : java.util.concurrent.ExecutionException"); + + $(ButtonElement.class).get(1).click(); + assertLogTexts( + "1. Exception caught on get: java.util.concurrent.ExecutionException", + "0. Exception caught on execution with ErrorEvent : java.util.concurrent.ExecutionException"); + + $(ButtonElement.class).get(2).click(); + assertLogTexts( + "1. Exception caught on get: java.util.concurrent.ExecutionException", + "0. Exception caught on execution with ConnectorErrorEvent : java.util.concurrent.ExecutionException"); + } + + private void assertLogTexts(String first, String second) { + assertLogText(0, first); + assertLogText(1, second); + } + + private void assertLogText(int index, String expected) { + Assert.assertEquals("Unexpected log contents,", expected, + getLogRow(index)); + } +} diff --git a/uitest/src/com/vaadin/tests/components/ui/UIInitBrowserDetails.java b/uitest/src/com/vaadin/tests/components/ui/UIInitBrowserDetails.java index df537145cf..130d432940 100644 --- a/uitest/src/com/vaadin/tests/components/ui/UIInitBrowserDetails.java +++ b/uitest/src/com/vaadin/tests/components/ui/UIInitBrowserDetails.java @@ -39,6 +39,14 @@ public class UIInitBrowserDetails extends AbstractTestUI { addDetail("current date", "v-curdate", wb.getCurrentDate()); } + private void addDetail(String name, String param, Object value) { + Label requestLabel = new Label(r.getParameter(param)); + requestLabel.setId(param); + Label browserLabel = new Label("" + value); + browserLabel.setId(name); + l.addComponents(new Label(name), requestLabel, browserLabel); + } + @Override public String getTestDescription() { return "Browser details should be available in UI init"; @@ -48,9 +56,4 @@ public class UIInitBrowserDetails extends AbstractTestUI { protected Integer getTicketNumber() { return Integer.valueOf(9037); } - - private void addDetail(String name, String param, Object value) { - l.addComponents(new Label(name), new Label(r.getParameter(param)), - new Label("" + value)); - } } diff --git a/uitest/src/com/vaadin/tests/components/ui/UIInitBrowserDetailsTest.java b/uitest/src/com/vaadin/tests/components/ui/UIInitBrowserDetailsTest.java new file mode 100644 index 0000000000..1e69662935 --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/ui/UIInitBrowserDetailsTest.java @@ -0,0 +1,58 @@ +package com.vaadin.tests.components.ui; + +import org.junit.Assert; +import org.junit.Test; + +import com.vaadin.testbench.elements.LabelElement; +import com.vaadin.tests.tb3.MultiBrowserTest; + +public class UIInitBrowserDetailsTest extends MultiBrowserTest { + + @Test + public void testBrowserDetails() throws Exception { + openTestURL(); + /* location */ + compareRequestAndBrowserValue("v-loc", "location", "null"); + /* browser window width */ + compareRequestAndBrowserValue("v-cw", "browser window width", "-1"); + /* browser window height */ + compareRequestAndBrowserValue("v-ch", "browser window height", "-1"); + /* screen width */ + compareRequestAndBrowserValue("v-sw", "screen width", "-1"); + /* screen height */ + compareRequestAndBrowserValue("v-sh", "screen height", "-1"); + /* timezone offset */ + assertTextNotNull("timezone offset"); + /* raw timezone offset */ + assertTextNotNull("raw timezone offset"); + /* dst saving */ + assertTextNotNull("dst saving"); + /* dst in effect */ + assertTextNotNull("dst in effect"); + /* current date */ + assertTextNotNull("v-curdate"); + assertTextNotNull("current date"); + } + + private void compareRequestAndBrowserValue(String paramName, + String browserName, String errorValue) { + assertTextNotEquals(browserName, errorValue); + Assert.assertEquals(String.format( + "Browser and request values differ in '%s',", browserName), + getLabelText(paramName), getLabelText(browserName)); + } + + private String getLabelText(String id) { + return $(LabelElement.class).id(id).getText(); + } + + private void assertTextNotNull(String id) { + assertTextNotEquals(id, "null"); + } + + private void assertTextNotEquals(String id, String notExpected) { + String actual = getLabelText(id); + Assert.assertNotEquals(String.format("Unexpected value for '%s'", id), + notExpected, actual); + } +} diff --git a/uitest/src/com/vaadin/tests/components/ui/UIInitExceptionTest.java b/uitest/src/com/vaadin/tests/components/ui/UIInitExceptionTest.java new file mode 100644 index 0000000000..d002642a74 --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/ui/UIInitExceptionTest.java @@ -0,0 +1,15 @@ +package com.vaadin.tests.components.ui; + +import org.junit.Assert; +import org.junit.Test; + +import com.vaadin.tests.tb3.MultiBrowserTest; + +public class UIInitExceptionTest extends MultiBrowserTest { + @Test + public void testExceptionOnUIInit() throws Exception { + openTestURL(); + Assert.assertTrue("Page does not contain the given text", driver + .getPageSource().contains("Catch me if you can")); + } +} diff --git a/uitest/src/com/vaadin/tests/components/ui/UIPollingTest.java b/uitest/src/com/vaadin/tests/components/ui/UIPollingTest.java new file mode 100644 index 0000000000..c4a41d135a --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/ui/UIPollingTest.java @@ -0,0 +1,39 @@ +package com.vaadin.tests.components.ui; + +import java.util.List; + +import org.junit.Assert; +import org.junit.Test; +import org.openqa.selenium.remote.DesiredCapabilities; + +import com.vaadin.testbench.elements.TextFieldElement; +import com.vaadin.tests.tb3.MultiBrowserTest; + +public class UIPollingTest extends MultiBrowserTest { + + @Override + public List<DesiredCapabilities> getBrowsersToTest() { + // Manually testing IE8 stops polling with -1, but with automated test + // it seems to be highly unpredictable. + return super.getBrowsersExcludingIE8(); + } + + @Test + public void testPolling() throws Exception { + openTestURL(); + getTextField().setValue("500"); + sleep(2000); + /* Ensure polling has taken place */ + Assert.assertTrue("Page does not contain the given text", driver + .getPageSource().contains("2. 1000ms has passed")); + getTextField().setValue("-1"); + sleep(2000); + /* Ensure polling has stopped */ + Assert.assertFalse("Page contains the given text", driver + .getPageSource().contains("20. 10000ms has passed")); + } + + public TextFieldElement getTextField() { + return $(TextFieldElement.class).first(); + } +} diff --git a/uitest/src/com/vaadin/tests/components/ui/UITabIndex.java b/uitest/src/com/vaadin/tests/components/ui/UITabIndex.java index 083eaf3f7d..c3bb036966 100644 --- a/uitest/src/com/vaadin/tests/components/ui/UITabIndex.java +++ b/uitest/src/com/vaadin/tests/components/ui/UITabIndex.java @@ -2,7 +2,6 @@ package com.vaadin.tests.components.ui; import com.vaadin.server.VaadinRequest; import com.vaadin.tests.components.AbstractTestUI; -import com.vaadin.ui.Button; import com.vaadin.ui.Button.ClickEvent; import com.vaadin.ui.Button.ClickListener; @@ -10,32 +9,24 @@ public class UITabIndex extends AbstractTestUI { @Override protected void setup(VaadinRequest request) { - Button b; - - b = new Button("Set tabIndex to -1"); - b.addClickListener(new ClickListener() { + addButton("Set tabIndex to -1", new ClickListener() { @Override public void buttonClick(ClickEvent event) { setTabIndex(-1); } }); - addComponent(b); - b = new Button("Set tabIndex to 0"); - b.addClickListener(new ClickListener() { + addButton("Set tabIndex to 0", new ClickListener() { @Override public void buttonClick(ClickEvent event) { setTabIndex(0); } }); - addComponent(b); - b = new Button("Set tabIndex to 1"); - b.addClickListener(new ClickListener() { + addButton("Set tabIndex to 1", new ClickListener() { @Override public void buttonClick(ClickEvent event) { setTabIndex(1); } }); - addComponent(b); } @Override diff --git a/uitest/src/com/vaadin/tests/components/ui/UITabIndexTest.java b/uitest/src/com/vaadin/tests/components/ui/UITabIndexTest.java new file mode 100644 index 0000000000..390907ee8a --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/ui/UITabIndexTest.java @@ -0,0 +1,28 @@ +package com.vaadin.tests.components.ui; + +import org.junit.Assert; +import org.junit.Test; + +import com.vaadin.testbench.elements.ButtonElement; +import com.vaadin.testbench.elements.UIElement; +import com.vaadin.tests.tb3.MultiBrowserTest; + +public class UITabIndexTest extends MultiBrowserTest { + + @Test + public void testTabIndexOnUIRoot() throws Exception { + openTestURL(); + assertTabIndex("1"); + $(ButtonElement.class).first().click(); + assertTabIndex("-1"); + $(ButtonElement.class).get(1).click(); + assertTabIndex("0"); + $(ButtonElement.class).get(2).click(); + assertTabIndex("1"); + } + + private void assertTabIndex(String expected) { + Assert.assertEquals("Unexpected tab index,", expected, + $(UIElement.class).first().getAttribute("tabIndex")); + } +} diff --git a/uitest/src/com/vaadin/tests/components/ui/UIsInMultipleTabsTest.java b/uitest/src/com/vaadin/tests/components/ui/UIsInMultipleTabsTest.java new file mode 100644 index 0000000000..e703deb634 --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/ui/UIsInMultipleTabsTest.java @@ -0,0 +1,25 @@ +package com.vaadin.tests.components.ui; + +import org.junit.Assert; +import org.junit.Test; + +import com.vaadin.testbench.elements.LabelElement; +import com.vaadin.tests.tb3.MultiBrowserTest; + +public class UIsInMultipleTabsTest extends MultiBrowserTest { + + @Test + public void testPageReloadChangesUI() throws Exception { + openTestURL(); + assertUI(1); + openTestURL(); + assertUI(2); + openTestURL("restartApplication"); + assertUI(1); + } + + private void assertUI(int i) { + Assert.assertEquals("Unexpected UI found,", "This is UI number " + i, + $(LabelElement.class).first().getText()); + } +} diff --git a/uitest/src/com/vaadin/tests/components/window/CloseSubWindow.java b/uitest/src/com/vaadin/tests/components/window/CloseSubWindow.java index 6aad3e9170..83eebc4531 100644 --- a/uitest/src/com/vaadin/tests/components/window/CloseSubWindow.java +++ b/uitest/src/com/vaadin/tests/components/window/CloseSubWindow.java @@ -1,7 +1,7 @@ package com.vaadin.tests.components.window; -import com.vaadin.tests.components.TestBase; -import com.vaadin.tests.util.Log; +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; @@ -10,23 +10,20 @@ import com.vaadin.ui.Window; import com.vaadin.ui.Window.CloseEvent; import com.vaadin.ui.Window.CloseListener; -public class CloseSubWindow extends TestBase { - - private Log log = new Log(5); +public class CloseSubWindow extends AbstractTestUIWithLog { @Override - protected void setup() { + protected void setup(VaadinRequest request) { Button openWindowButton = new Button("Open sub-window"); openWindowButton.setId("opensub"); - openWindowButton.addListener(new ClickListener() { + openWindowButton.addClickListener(new ClickListener() { @Override public void buttonClick(ClickEvent event) { Window sub = createClosableSubWindow("Sub-window"); - getMainWindow().addWindow(sub); + getUI().addWindow(sub); } }); - addComponent(log); addComponent(openWindowButton); } @@ -39,7 +36,7 @@ public class CloseSubWindow extends TestBase { window.setClosable(true); Button closeButton = new Button("Close"); - closeButton.addListener(new ClickListener() { + closeButton.addClickListener(new ClickListener() { @Override public void buttonClick(ClickEvent event) { event.getButton().findAncestor(Window.class).close(); @@ -47,19 +44,19 @@ public class CloseSubWindow extends TestBase { }); layout.addComponent(closeButton); - Button removeButton = new Button("Remove from parent"); - removeButton.addListener(new ClickListener() { + Button removeButton = new Button("Remove from UI"); + removeButton.addClickListener(new ClickListener() { @Override public void buttonClick(ClickEvent event) { - window.close(); + getUI().removeWindow(window); } }); - layout.addComponent(closeButton); + layout.addComponent(removeButton); - window.addListener(new CloseListener() { + window.addCloseListener(new CloseListener() { @Override public void windowClose(CloseEvent e) { - log.log("Window '" + title + "' closed"); + log("Window '" + title + "' closed"); } }); @@ -67,7 +64,7 @@ public class CloseSubWindow extends TestBase { } @Override - protected String getDescription() { + protected String getTestDescription() { return "Close sub-windows both from code and with the close button in the window title bar, and check for close events. Contains an ugly workaround for the Opera bug (Opera does not send close events)"; } diff --git a/uitest/src/com/vaadin/tests/components/window/CloseSubWindowTest.java b/uitest/src/com/vaadin/tests/components/window/CloseSubWindowTest.java new file mode 100644 index 0000000000..48ac923082 --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/window/CloseSubWindowTest.java @@ -0,0 +1,47 @@ +package com.vaadin.tests.components.window; + +import org.junit.Assert; +import org.junit.Test; +import org.openqa.selenium.By; + +import com.vaadin.testbench.elements.ButtonElement; +import com.vaadin.testbench.elements.WindowElement; +import com.vaadin.tests.tb3.MultiBrowserTest; + +public class CloseSubWindowTest extends MultiBrowserTest { + + @Override + public void setup() throws Exception { + super.setup(); + openTestURL(); + openSubWindow(); + } + + @Test + public void testClosingFromClickHandler() throws Exception { + $(WindowElement.class).$(ButtonElement.class).first().click(); + assertLogText(); + } + + @Test + public void testClosingFromTitleBar() throws Exception { + $(WindowElement.class).first() + .findElement(By.className("v-window-closebox")).click(); + assertLogText(); + } + + @Test + public void testClosingByRemovingFromUI() throws Exception { + $(WindowElement.class).$(ButtonElement.class).get(1).click(); + assertLogText(); + } + + private void openSubWindow() { + $(ButtonElement.class).id("opensub").click(); + } + + private void assertLogText() { + Assert.assertEquals("Unexpected log contents,", + "1. Window 'Sub-window' closed", getLogRow(0)); + } +} diff --git a/uitest/src/com/vaadin/tests/components/window/ExtraWindowShown.java b/uitest/src/com/vaadin/tests/components/window/ExtraWindowShown.java index 35a4b8c761..92fbcffd01 100644 --- a/uitest/src/com/vaadin/tests/components/window/ExtraWindowShown.java +++ b/uitest/src/com/vaadin/tests/components/window/ExtraWindowShown.java @@ -1,17 +1,18 @@ package com.vaadin.tests.components.window; import com.vaadin.server.ThemeResource; -import com.vaadin.tests.components.TestBase; +import com.vaadin.server.VaadinRequest; +import com.vaadin.tests.components.AbstractTestUI; import com.vaadin.ui.Alignment; import com.vaadin.ui.Button; import com.vaadin.ui.Button.ClickEvent; import com.vaadin.ui.VerticalLayout; import com.vaadin.ui.Window; -public class ExtraWindowShown extends TestBase { +public class ExtraWindowShown extends AbstractTestUI { @Override - protected void setup() { + protected void setup(VaadinRequest request) { Button b = new Button("Open window", new Button.ClickListener() { @Override @@ -37,21 +38,20 @@ public class ExtraWindowShown extends TestBase { } }); - getLayout().setHeight("100%"); + getLayout().getParent().setSizeFull(); + getLayout().setSizeFull(); getLayout().addComponent(b); getLayout().setComponentAlignment(b, Alignment.MIDDLE_CENTER); } @Override - protected String getDescription() { - // TODO Auto-generated method stub - return null; + protected String getTestDescription() { + return "Sub window shouldn't reappear after closing."; } @Override protected Integer getTicketNumber() { - // TODO Auto-generated method stub - return null; + return 5987; } } diff --git a/uitest/src/com/vaadin/tests/components/window/ExtraWindowShownTest.java b/uitest/src/com/vaadin/tests/components/window/ExtraWindowShownTest.java new file mode 100644 index 0000000000..abbc7ddac0 --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/window/ExtraWindowShownTest.java @@ -0,0 +1,37 @@ +package com.vaadin.tests.components.window; + +import org.junit.Assert; +import org.junit.Test; + +import com.vaadin.testbench.elements.ButtonElement; +import com.vaadin.testbench.elements.WindowElement; +import com.vaadin.tests.tb3.MultiBrowserTest; + +public class ExtraWindowShownTest extends MultiBrowserTest { + + @Test + public void testNoExtraWindowAfterClosing() throws Exception { + openTestURL(); + + openWindow(); + closeWindow(); + assertNoWindow(); + + openWindow(); + closeWindow(); + assertNoWindow(); + } + + private void openWindow() { + $(ButtonElement.class).first().click(); + } + + private void closeWindow() { + $(WindowElement.class).$(ButtonElement.class).first().click(); + } + + private void assertNoWindow() { + Assert.assertFalse("Window found when there should be none.", + $(WindowElement.class).exists()); + } +} diff --git a/uitest/src/com/vaadin/tests/components/window/RepaintWindowContents.java b/uitest/src/com/vaadin/tests/components/window/RepaintWindowContents.java index 99aa15b47d..18fe8f2fac 100644 --- a/uitest/src/com/vaadin/tests/components/window/RepaintWindowContents.java +++ b/uitest/src/com/vaadin/tests/components/window/RepaintWindowContents.java @@ -28,7 +28,7 @@ public class RepaintWindowContents extends AbstractTestUI { window.setContent(layout1); - button1.addListener(new ClickListener() { + button1.addClickListener(new ClickListener() { @Override public void buttonClick(ClickEvent event) { @@ -36,7 +36,7 @@ public class RepaintWindowContents extends AbstractTestUI { } }); - button2.addListener(new ClickListener() { + button2.addClickListener(new ClickListener() { @Override public void buttonClick(ClickEvent event) { diff --git a/uitest/src/com/vaadin/tests/components/window/RepaintWindowContentsTest.java b/uitest/src/com/vaadin/tests/components/window/RepaintWindowContentsTest.java new file mode 100644 index 0000000000..d097aa183c --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/window/RepaintWindowContentsTest.java @@ -0,0 +1,36 @@ +package com.vaadin.tests.components.window; + +import org.junit.Assert; +import org.junit.Test; + +import com.vaadin.testbench.elements.ButtonElement; +import com.vaadin.testbench.elements.WindowElement; +import com.vaadin.tests.tb3.MultiBrowserTest; + +public class RepaintWindowContentsTest extends MultiBrowserTest { + + @Test + public void testRepaintWindowContents() throws Exception { + openTestURL(); + assertWindowContents("Button 1"); + toggleWindowContents(); + assertWindowContents("Button 2"); + toggleWindowContents(); + assertWindowContents("Button 1"); + toggleWindowContents(); + assertWindowContents("Button 2"); + } + + private void toggleWindowContents() { + getWindowButton().click(); + } + + private void assertWindowContents(String expected) { + Assert.assertEquals("Unexpected window contents,", expected, + getWindowButton().getText()); + } + + private ButtonElement getWindowButton() { + return $(WindowElement.class).$(ButtonElement.class).first(); + } +} diff --git a/uitest/src/com/vaadin/tests/components/window/WindowShouldRemoveActionHandler.java b/uitest/src/com/vaadin/tests/components/window/WindowShouldRemoveActionHandler.java index fa01706c56..ba991eebec 100644 --- a/uitest/src/com/vaadin/tests/components/window/WindowShouldRemoveActionHandler.java +++ b/uitest/src/com/vaadin/tests/components/window/WindowShouldRemoveActionHandler.java @@ -7,15 +7,19 @@ import com.vaadin.event.Action; import com.vaadin.event.Action.Handler; import com.vaadin.event.ShortcutAction; import com.vaadin.event.ShortcutAction.ModifierKey; -import com.vaadin.tests.components.TestBase; +import com.vaadin.server.VaadinRequest; +import com.vaadin.shared.ui.MarginInfo; +import com.vaadin.tests.components.AbstractTestUI; import com.vaadin.ui.Button; import com.vaadin.ui.Button.ClickEvent; +import com.vaadin.ui.Label; +import com.vaadin.ui.Notification; import com.vaadin.ui.TextField; -public class WindowShouldRemoveActionHandler extends TestBase { +public class WindowShouldRemoveActionHandler extends AbstractTestUI { @Override - protected String getDescription() { + protected String getTestDescription() { return "Adding action handlers to the window should make them appear on the client side. Removing the action handlers should remove them also from the client side, also if all action handlers are removed."; } @@ -24,54 +28,49 @@ public class WindowShouldRemoveActionHandler extends TestBase { return 2941; } + private Label state; + @Override - protected void setup() { - addComponent(new TextField()); - Button add = new Button("Add an action handler", - new Button.ClickListener() { - - @Override - public void buttonClick(ClickEvent event) { - add(); - } - - }); - Button addAnother = new Button("Add another action handler", - new Button.ClickListener() { - - @Override - public void buttonClick(ClickEvent event) { - addAnother(); - } - - }); - Button remove = new Button("Remove an action handler", - new Button.ClickListener() { - - @Override - public void buttonClick(ClickEvent event) { - remove(); - } - - }); - - addComponent(add); - addComponent(addAnother); - addComponent(remove); + protected void setup(VaadinRequest request) { + getLayout().setMargin(new MarginInfo(true, false, false, false)); + state = new Label("An UI with no action handlers."); + state.setId("state"); + addComponents(state, new TextField()); + + addButton("Add an action handler", new Button.ClickListener() { + + @Override + public void buttonClick(ClickEvent event) { + add(); + } + + }); + addButton("Add another action handler", new Button.ClickListener() { + + @Override + public void buttonClick(ClickEvent event) { + addAnother(); + } + + }); + addButton("Remove an action handler", new Button.ClickListener() { + + @Override + public void buttonClick(ClickEvent event) { + remove(); + } + + }); } public void remove() { - getMainWindow().setCaption( - getMainWindow().getCaption() + " - Removed handler"); - getMainWindow().removeActionHandler( - actionHandlers.remove(actionHandlers.size() - 1)); + state.setValue(state.getValue() + " - Removed handler"); + removeActionHandler(actionHandlers.remove(actionHandlers.size() - 1)); } private List<Handler> actionHandlers = new ArrayList<Handler>(); public void add() { - getMainWindow().setCaption( - getMainWindow().getCaption() + " - Added handler"); Handler actionHandler = new Handler() { @Override @@ -83,8 +82,7 @@ public class WindowShouldRemoveActionHandler extends TestBase { @Override public void handleAction(Action action, Object sender, Object target) { - getMainWindow().showNotification( - "Handling action " + action.getCaption()); + Notification.show("Handling action " + action.getCaption()); } }; @@ -104,8 +102,7 @@ public class WindowShouldRemoveActionHandler extends TestBase { @Override public void handleAction(Action action, Object sender, Object target) { - getMainWindow().showNotification( - "Handling action " + action.getCaption()); + Notification.show("Handling action " + action.getCaption()); } }; @@ -115,9 +112,9 @@ public class WindowShouldRemoveActionHandler extends TestBase { private void addHandler(Handler actionHandler) { actionHandlers.add(actionHandler); - getMainWindow().addActionHandler(actionHandler); - getMainWindow().setCaption( - "A panel with " + actionHandlers.size() + " action handlers"); + addActionHandler(actionHandler); + state.setValue("An UI with " + actionHandlers.size() + + " action handlers"); } } diff --git a/uitest/src/com/vaadin/tests/components/window/WindowShouldRemoveActionHandlerTest.java b/uitest/src/com/vaadin/tests/components/window/WindowShouldRemoveActionHandlerTest.java new file mode 100644 index 0000000000..755a4242ed --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/window/WindowShouldRemoveActionHandlerTest.java @@ -0,0 +1,50 @@ +package com.vaadin.tests.components.window; + +import org.junit.Assert; +import org.junit.Test; + +import com.vaadin.testbench.elements.ButtonElement; +import com.vaadin.testbench.elements.LabelElement; +import com.vaadin.tests.tb3.MultiBrowserTest; + +public class WindowShouldRemoveActionHandlerTest extends MultiBrowserTest { + + @Test + public void testRemovingActionHandlers() { + openTestURL(); + + addActionHandler(); + addAnotherActionHandler(); + + assertState("An UI with 2 action handlers"); + addActionHandler(); + + assertState("An UI with 3 action handlers"); + removeActionHandler(); + removeActionHandler(); + + assertState("An UI with 3 action handlers - Removed handler - Removed handler"); + addActionHandler(); + + assertState("An UI with 2 action handlers"); + } + + private void removeActionHandler() { + $(ButtonElement.class).caption("Remove an action handler").first() + .click(); + } + + private void addAnotherActionHandler() { + $(ButtonElement.class).caption("Add another action handler").first() + .click(); + } + + private void addActionHandler() { + $(ButtonElement.class).caption("Add an action handler").first().click(); + } + + private void assertState(String expected) { + Assert.assertEquals("Unexpected state,", expected, + $(LabelElement.class).id("state").getText()); + } +} diff --git a/uitest/src/com/vaadin/tests/components/window/WindowWithInvalidCloseListenerTest.java b/uitest/src/com/vaadin/tests/components/window/WindowWithInvalidCloseListenerTest.java new file mode 100644 index 0000000000..b77eced9cc --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/window/WindowWithInvalidCloseListenerTest.java @@ -0,0 +1,19 @@ +package com.vaadin.tests.components.window; + +import org.junit.Assert; +import org.junit.Test; +import org.openqa.selenium.By; + +import com.vaadin.testbench.elements.WindowElement; +import com.vaadin.tests.tb3.MultiBrowserTest; + +public class WindowWithInvalidCloseListenerTest extends MultiBrowserTest { + @Test + public void testWindowClosesCorrectly() throws Exception { + openTestURL(); + $(WindowElement.class).first() + .findElement(By.className("v-window-closebox")).click(); + Assert.assertFalse("Window found when there should be none.", + $(WindowElement.class).exists()); + } +} diff --git a/uitest/src/com/vaadin/tests/containers/sqlcontainer/TableQueryWithNonUniqueFirstPrimaryKey.java b/uitest/src/com/vaadin/tests/containers/sqlcontainer/TableQueryWithNonUniqueFirstPrimaryKey.java index da3476610b..2ff74a76ef 100644 --- a/uitest/src/com/vaadin/tests/containers/sqlcontainer/TableQueryWithNonUniqueFirstPrimaryKey.java +++ b/uitest/src/com/vaadin/tests/containers/sqlcontainer/TableQueryWithNonUniqueFirstPrimaryKey.java @@ -12,17 +12,15 @@ import com.vaadin.data.util.sqlcontainer.SQLContainer; import com.vaadin.data.util.sqlcontainer.connection.JDBCConnectionPool; import com.vaadin.data.util.sqlcontainer.connection.SimpleJDBCConnectionPool; import com.vaadin.data.util.sqlcontainer.query.TableQuery; -import com.vaadin.server.LegacyApplication; +import com.vaadin.server.VaadinRequest; import com.vaadin.shared.ui.combobox.FilteringMode; +import com.vaadin.tests.components.AbstractTestUI; import com.vaadin.ui.ComboBox; -import com.vaadin.ui.LegacyWindow; -import com.vaadin.ui.VerticalLayout; -public class TableQueryWithNonUniqueFirstPrimaryKey extends LegacyApplication { +public class TableQueryWithNonUniqueFirstPrimaryKey extends AbstractTestUI { + @Override - public void init() { - LegacyWindow mainWindow = new LegacyWindow("Test Application"); - setMainWindow(mainWindow); + public void setup(VaadinRequest request) { try { JDBCConnectionPool connectionPool = new SimpleJDBCConnectionPool( @@ -41,9 +39,6 @@ public class TableQueryWithNonUniqueFirstPrimaryKey extends LegacyApplication { myContainer.removeAllContainerFilters(); myContainer.addContainerFilter(new Equal("PFX", "C")); - VerticalLayout layout = new VerticalLayout(); - mainWindow.setContent(layout); - final ComboBox myCombo = new ComboBox("MyCaption"); myCombo.setDescription("Description"); myCombo.setContainerDataSource(myContainer); @@ -64,7 +59,7 @@ public class TableQueryWithNonUniqueFirstPrimaryKey extends LegacyApplication { } } }); - layout.addComponent(myCombo); + addComponent(myCombo); } catch (Exception ex) { ex.printStackTrace(); } @@ -122,4 +117,14 @@ public class TableQueryWithNonUniqueFirstPrimaryKey extends LegacyApplication { connectionPool.releaseConnection(conn); } } + + @Override + protected String getTestDescription() { + return "Ensure unique ordering when using TableQuery with multiple primary key columns."; + } + + @Override + protected Integer getTicketNumber() { + return 10878; + } } diff --git a/uitest/src/com/vaadin/tests/containers/sqlcontainer/TableQueryWithNonUniqueFirstPrimaryKeyTest.java b/uitest/src/com/vaadin/tests/containers/sqlcontainer/TableQueryWithNonUniqueFirstPrimaryKeyTest.java new file mode 100644 index 0000000000..172d83e645 --- /dev/null +++ b/uitest/src/com/vaadin/tests/containers/sqlcontainer/TableQueryWithNonUniqueFirstPrimaryKeyTest.java @@ -0,0 +1,45 @@ +package com.vaadin.tests.containers.sqlcontainer; + +import java.util.ArrayList; +import java.util.List; + +import org.junit.Assert; +import org.junit.Test; +import org.openqa.selenium.Keys; +import org.openqa.selenium.WebElement; + +import com.vaadin.testbench.By; +import com.vaadin.testbench.elements.ComboBoxElement; +import com.vaadin.tests.tb3.MultiBrowserTest; + +public class TableQueryWithNonUniqueFirstPrimaryKeyTest extends + MultiBrowserTest { + + private static final String[] DATA = { "TARUSCIO GIOVANNI", + "RUSSO GAETANO AUTORICAMBI", "AMORUSO LUIGI SRL", "CARUSO ROCCO", + "F.LLI RUSSO DI GAETANO RUSSO & C", "RUSSO GIUSEPPE", + "TRUSCELLI ANTONIO", "CARUSO CALOGERO" }; + + @Test + public void testComboBoxSuggestionsListedCorrectly() throws Exception { + openTestURL(); + $(ComboBoxElement.class).first().findElement(By.vaadin("#textbox")) + .sendKeys("rus", Keys.ENTER); + + List<String> result = new ArrayList<String>(); + + // pick list items that are shown in suggestion popup + List<WebElement> elems = findElements(By + .cssSelector("td[role=\"listitem\"]")); + Assert.assertEquals("not enough suggestions shown", DATA.length, + elems.size()); + + for (WebElement elem : elems) { + result.add(elem.getText()); + } + + Assert.assertArrayEquals("popup items not what they should be", DATA, + result.toArray()); + + } +} diff --git a/uitest/src/com/vaadin/tests/converter/ConverterThatEnforcesAFormat.java b/uitest/src/com/vaadin/tests/converter/ConverterThatEnforcesAFormat.java index a37aa521ba..9d0c835c68 100644 --- a/uitest/src/com/vaadin/tests/converter/ConverterThatEnforcesAFormat.java +++ b/uitest/src/com/vaadin/tests/converter/ConverterThatEnforcesAFormat.java @@ -4,24 +4,24 @@ import java.util.Locale; import com.vaadin.data.Property.ValueChangeEvent; import com.vaadin.data.Property.ValueChangeListener; -import com.vaadin.tests.components.TestBase; -import com.vaadin.tests.util.Log; +import com.vaadin.server.VaadinRequest; +import com.vaadin.tests.components.AbstractTestUIWithLog; import com.vaadin.ui.TextField; -public class ConverterThatEnforcesAFormat extends TestBase { - - private Log log = new Log(5); +public class ConverterThatEnforcesAFormat extends AbstractTestUIWithLog { @Override - protected void setup() { + protected void setup(VaadinRequest request) { final TextField tf = new TextField( "This field should always be formatted with 3 digits"); tf.setLocale(Locale.ENGLISH); + // this is needed so that IE tests pass + tf.setNullRepresentation(""); tf.setConverter(new StringToDoubleConverterWithThreeFractionDigits()); tf.addValueChangeListener(new ValueChangeListener() { @Override public void valueChange(ValueChangeEvent event) { - log.log("Value changed to " + log("Value changed to " + event.getProperty().getValue() + "(converted value is " + tf.getConvertedValue() @@ -33,13 +33,12 @@ public class ConverterThatEnforcesAFormat extends TestBase { } }); tf.setImmediate(true); - addComponent(log); addComponent(tf); tf.setConvertedValue(50.0); } @Override - protected String getDescription() { + protected String getTestDescription() { return "Entering a valid double in the field should always cause the field contents to be formatted to contain 3 digits after the decimal point"; } diff --git a/uitest/src/com/vaadin/tests/converter/ConverterThatEnforcesAFormatTest.java b/uitest/src/com/vaadin/tests/converter/ConverterThatEnforcesAFormatTest.java new file mode 100644 index 0000000000..886e96700a --- /dev/null +++ b/uitest/src/com/vaadin/tests/converter/ConverterThatEnforcesAFormatTest.java @@ -0,0 +1,90 @@ +package com.vaadin.tests.converter; + +import org.junit.Test; +import org.openqa.selenium.Keys; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.support.ui.ExpectedCondition; + +import com.vaadin.testbench.elements.TextFieldElement; +import com.vaadin.tests.tb3.MultiBrowserTest; + +public class ConverterThatEnforcesAFormatTest extends MultiBrowserTest { + + private TextFieldElement field; + + @Override + public void setup() throws Exception { + super.setup(); + openTestURL(); + field = $(TextFieldElement.class).first(); + } + + @Test + public void checkDefault() { + waitUntilValueIs("50.000"); + } + + @Test + public void checkRounding() { + setValue("50.0202", Keys.ENTER); + waitUntilValueIs("50.020"); + } + + @Test + public void checkElaborating() { + setValue("12"); + waitUntilValueIs("12.000"); + } + + @Test + public void checkText() { + setValue("abc", Keys.ENTER); + waitUntilValueIs("abc"); + waitUntilHasCssClass("v-textfield-error"); + } + + private void setValue(String value, CharSequence... keysToSend) { + field.setValue(value); + if (keysToSend.length > 0) { + field.sendKeys(keysToSend); + } else { + field.submit(); + } + } + + private void waitUntilValueIs(final String expected) { + waitUntil(new ExpectedCondition<Boolean>() { + private String actual; + + @Override + public Boolean apply(WebDriver arg0) { + actual = field.getValue(); + return expected.equals(actual); + } + + @Override + public String toString() { + return String.format( + "the field to have value '%s' (was: '%s')", expected, + actual); + } + }); + } + + private void waitUntilHasCssClass(final String className) { + waitUntil(new ExpectedCondition<Boolean>() { + + @Override + public Boolean apply(WebDriver arg0) { + return hasCssClass(field, className); + } + + @Override + public String toString() { + return String.format("the field to have css class '%s'", + className); + } + }); + } + +} diff --git a/uitest/src/com/vaadin/tests/dd/DDTest8.java b/uitest/src/com/vaadin/tests/dd/DDTest8.java index ee7d8d9dc5..beaae4175e 100644 --- a/uitest/src/com/vaadin/tests/dd/DDTest8.java +++ b/uitest/src/com/vaadin/tests/dd/DDTest8.java @@ -10,8 +10,9 @@ import com.vaadin.event.dd.DragAndDropEvent; import com.vaadin.event.dd.DropHandler; import com.vaadin.event.dd.acceptcriteria.AcceptCriterion; import com.vaadin.event.dd.acceptcriteria.Or; +import com.vaadin.server.VaadinRequest; import com.vaadin.shared.ui.dd.VerticalDropLocation; -import com.vaadin.tests.components.TestBase; +import com.vaadin.tests.components.AbstractTestUI; import com.vaadin.ui.AbstractSelect; import com.vaadin.ui.Tree; import com.vaadin.ui.Tree.TreeDragMode; @@ -20,36 +21,48 @@ import com.vaadin.ui.Tree.TreeTargetDetails; /** * DD playground. Better quality example/prototype codes in {@link DDTest2}. */ -public class DDTest8 extends TestBase { +public class DDTest8 extends AbstractTestUI { @Override - protected void setup() { - final Tree t = new Tree( + protected void setup(VaadinRequest request) { + final Tree tree = new Tree( "Tree with criteria from AbstractSelect (OverItem, ContainsItem). Foo can be dragged anywhere, anything can be dropped on Foo or Bar. Bar5 subtree is also valid drop target."); - final HierarchicalContainer idx = new HierarchicalContainer(); - t.setContainerDataSource(idx); - t.addItem("Foo"); - t.addItem("Bar"); - t.addItem("Bar1"); - t.addItem("Bar2"); - t.addItem("Bar3"); - t.addItem("Bar4"); - t.addItem("Bar5"); - t.addItem("Child"); - t.setParent("Child", "Foo"); - t.setSizeFull(); - t.setDragMode(TreeDragMode.NODE); - - /* - * Moves items in tree (and could work in Table too). Also supports - * "building" tree. - * - * TODO fix algorithm, broken in some cases. - */ - DropHandler itemSorter = new DropHandler() { + final HierarchicalContainer container = new HierarchicalContainer(); + tree.setContainerDataSource(container); + tree.addItem("Foo"); + tree.addItem("Bar"); + tree.addItem("Bar1"); + tree.addItem("Bar2"); + tree.addItem("Bar3"); + tree.addItem("Bar4"); + tree.addItem("Bar5"); + tree.addItem("Child"); + tree.setParent("Child", "Foo"); + tree.setSizeFull(); + tree.setDragMode(TreeDragMode.NODE); + tree.setDropHandler(getDropHandler(tree, container)); - @SuppressWarnings("unused") + getLayout().setSizeFull(); + getLayout().getParent().setSizeFull(); + addComponent(tree); + } + + /** + * Moves items in tree (and could work in Table too). Also supports + * "building" tree. + * + * TODO fix algorithm, broken in some cases. + * + * @param tree + * @param container + * @return drop handler + */ + private DropHandler getDropHandler(final Tree tree, + final HierarchicalContainer container) { + return new DropHandler() { + + @SuppressWarnings({ "unused", "unchecked" }) private void populateSubTree(HierarchicalContainer idx, HierarchicalContainer subtree, Object itemId) { Collection<?> children = subtree.getChildren(itemId); @@ -91,6 +104,7 @@ public class DDTest8 extends TestBase { return hierarchicalContainer; } + @SuppressWarnings("unchecked") private void copyChildren(HierarchicalContainer source, HierarchicalContainer target, Object itemId) { Collection<?> children = source.getChildren(itemId); @@ -135,16 +149,16 @@ public class DDTest8 extends TestBase { Object itemIdAfter = details.getItemIdAfter(); if (itemIdOver.equals(itemIdInto)) { // directly on a node - t.setParent(itemId, itemIdOver); + container.setParent(itemId, itemIdOver); return; } - idx.setParent(itemId, itemIdInto); + container.setParent(itemId, itemIdInto); if (dropLocation == null) { System.err.println("No detail of drop place available"); } - idx.moveAfterSibling(itemId, itemIdAfter); + container.moveAfterSibling(itemId, itemIdAfter); } return; @@ -152,23 +166,17 @@ public class DDTest8 extends TestBase { @Override public AcceptCriterion getAcceptCriterion() { - return new Or(new AbstractSelect.TargetItemIs(t, "Foo", "Bar"), - new AbstractSelect.AcceptItem(t, "Foo"), - t.new TargetInSubtree("Bar5") // + return new Or(new AbstractSelect.TargetItemIs(tree, "Foo", + "Bar"), new AbstractSelect.AcceptItem(tree, "Foo"), + tree.new TargetInSubtree("Bar5") // ); } }; - - t.setDropHandler(itemSorter); - - getLayout().setSizeFull(); - addComponent(t); - } @Override - protected String getDescription() { + protected String getTestDescription() { return "Random DD tests"; } diff --git a/uitest/src/com/vaadin/tests/dd/DnDOnSubtreeTest.java b/uitest/src/com/vaadin/tests/dd/DnDOnSubtreeTest.java new file mode 100644 index 0000000000..2bceb905c4 --- /dev/null +++ b/uitest/src/com/vaadin/tests/dd/DnDOnSubtreeTest.java @@ -0,0 +1,52 @@ +package com.vaadin.tests.dd; + +import org.junit.Test; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.interactions.Actions; +import org.openqa.selenium.support.ui.ExpectedCondition; + +import com.vaadin.testbench.By; +import com.vaadin.testbench.TestBenchElement; +import com.vaadin.testbench.elements.TreeElement; +import com.vaadin.tests.tb3.MultiBrowserTest; + +public class DnDOnSubtreeTest extends MultiBrowserTest { + + @Override + protected Class<?> getUIClass() { + return DDTest8.class; + } + + @Test + public void testDragAndDropOnSubTrees() throws Exception { + openTestURL(); + TreeElement tree = $(TreeElement.class).first(); + WebElement bar2 = tree.findElement(By.vaadin("#n[3]")); + WebElement bar5 = tree.findElement(By.vaadin("#n[6]")); + new Actions(driver).moveToElement(bar2, 11, 8).clickAndHold() + .moveByOffset(10, 10).perform(); + /* Drop on Bar5, which is a subtree target */ + new Actions(driver).moveToElement(bar5, 34, 9).release().perform(); + testBenchElement(tree.findElement(By.vaadin("#n[5]/expand"))).click(5, + 5); + /* Assert that the dragged & dropped node is now a child of Bar5 */ + waitUntilElementPresent(tree, "#n[5]/n[0]"); + } + + private void waitUntilElementPresent(final TestBenchElement parent, + final String vaadinSelector) { + waitUntil(new ExpectedCondition<Boolean>() { + + @Override + public Boolean apply(WebDriver arg0) { + return parent.isElementPresent(By.vaadin(vaadinSelector)); + } + + @Override + public String toString() { + return String.format("element to contain '%s'", vaadinSelector); + } + }); + } +} diff --git a/uitest/src/com/vaadin/tests/fieldgroup/BasicPersonForm.java b/uitest/src/com/vaadin/tests/fieldgroup/BasicPersonForm.java index e418116cd5..a223cea6a0 100644 --- a/uitest/src/com/vaadin/tests/fieldgroup/BasicPersonForm.java +++ b/uitest/src/com/vaadin/tests/fieldgroup/BasicPersonForm.java @@ -10,12 +10,12 @@ import com.vaadin.data.util.converter.StringToBooleanConverter; import com.vaadin.data.validator.EmailValidator; import com.vaadin.data.validator.IntegerRangeValidator; import com.vaadin.data.validator.StringLengthValidator; -import com.vaadin.tests.components.TestBase; +import com.vaadin.server.VaadinRequest; +import com.vaadin.tests.components.AbstractTestUIWithLog; import com.vaadin.tests.data.bean.Address; import com.vaadin.tests.data.bean.Country; import com.vaadin.tests.data.bean.Person; import com.vaadin.tests.data.bean.Sex; -import com.vaadin.tests.util.Log; import com.vaadin.ui.Button; import com.vaadin.ui.Button.ClickEvent; import com.vaadin.ui.ComponentContainer; @@ -26,9 +26,8 @@ import com.vaadin.ui.TextArea; import com.vaadin.ui.TextField; import com.vaadin.ui.VerticalLayout; -public class BasicPersonForm extends TestBase { +public class BasicPersonForm extends AbstractTestUIWithLog { - private Log log = new Log(5); private TextField firstName; private TextArea lastName; private TextField email; @@ -80,7 +79,7 @@ public class BasicPersonForm extends TestBase { } @Override - protected void setup() { + protected void setup(VaadinRequest request) { addComponent(log); Panel confPanel = new ConfigurationPanel(); addComponent(confPanel); @@ -133,7 +132,7 @@ public class BasicPersonForm extends TestBase { msg = "Commit failed: " + e.getMessage(); } Notification.show(msg); - log.log(msg); + log(msg); } }); @@ -143,7 +142,7 @@ public class BasicPersonForm extends TestBase { @Override public void buttonClick(ClickEvent event) { fieldGroup.discard(); - log.log("Discarded changes"); + log("Discarded changes"); } }); @@ -152,7 +151,7 @@ public class BasicPersonForm extends TestBase { @Override public void buttonClick(ClickEvent event) { - log.log(getPerson(fieldGroup).toString()); + log(getPerson(fieldGroup).toString()); } }); @@ -182,20 +181,19 @@ public class BasicPersonForm extends TestBase { fieldGroup.setItemDataSource(new BeanItem<Person>(p)); } + @SuppressWarnings("unchecked") public static Person getPerson(FieldGroup binder) { return ((BeanItem<Person>) binder.getItemDataSource()).getBean(); } @Override - protected String getDescription() { - // TODO Auto-generated method stub - return null; + public String getDescription() { + return "Basic Person Form"; } @Override protected Integer getTicketNumber() { - // TODO Auto-generated method stub - return null; + return 8094; } } diff --git a/uitest/src/com/vaadin/tests/fieldgroup/BasicPersonFormTest.java b/uitest/src/com/vaadin/tests/fieldgroup/BasicPersonFormTest.java new file mode 100644 index 0000000000..f611325719 --- /dev/null +++ b/uitest/src/com/vaadin/tests/fieldgroup/BasicPersonFormTest.java @@ -0,0 +1,173 @@ +/* + * Copyright 2000-2014 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.tests.fieldgroup; + +import org.junit.Assert; + +import com.vaadin.testbench.TestBenchElement; +import com.vaadin.testbench.elements.ButtonElement; +import com.vaadin.testbench.elements.CheckBoxElement; +import com.vaadin.testbench.elements.NotificationElement; +import com.vaadin.testbench.elements.TableElement; +import com.vaadin.testbench.elements.TableRowElement; +import com.vaadin.testbench.elements.TextAreaElement; +import com.vaadin.testbench.elements.TextFieldElement; +import com.vaadin.tests.data.bean.Sex; +import com.vaadin.tests.tb3.MultiBrowserTest; + +public abstract class BasicPersonFormTest extends MultiBrowserTest { + + private static final String BEAN_VALUES = "Person [firstName=John, lastName=Doe, email=john@doe.com, age=64, sex=Male, address=Address [streetAddress=John street, postalCode=11223, city=John's town, country=USA], deceased=false, salary=null, salaryDouble=null, rent=null]"; + private int logCounter = 0; + + @Override + protected Class<?> getUIClass() { + return BasicPersonForm.class; + } + + protected TextFieldElement getFirstNameField() { + return $(TextFieldElement.class).caption("First Name").first(); + } + + protected TextAreaElement getLastNameArea() { + return $(TextAreaElement.class).caption("Last Name").first(); + } + + protected TextFieldElement getEmailField() { + return $(TextFieldElement.class).caption("Email").first(); + } + + protected TextFieldElement getAgeField() { + return $(TextFieldElement.class).caption("Age").first(); + } + + protected TableElement getGenderTable() { + return $(TableElement.class).caption("Sex").first(); + } + + protected TextFieldElement getDeceasedField() { + return $(TextFieldElement.class).caption("Deceased").first(); + } + + protected void showBeanValues() { + $(ButtonElement.class).caption("Show bean values").first().click(); + } + + protected CheckBoxElement getPreCommitFailsCheckBox() { + return $(CheckBoxElement.class).get(1); + } + + protected void commitChanges() { + $(ButtonElement.class).caption("Commit").first().click(); + } + + protected void closeNotification() { + $(NotificationElement.class).first().close(); + } + + protected CheckBoxElement getPostCommitFailsCheckBox() { + return $(CheckBoxElement.class).get(0); + } + + protected void discardChanges() { + $(ButtonElement.class).caption("Discard").first().click(); + } + + protected void assertFirstNameValue(String expected) { + assertFieldValue("First Name", expected, getFirstNameField()); + } + + protected void assertLastNameValue(String expected) { + assertFieldValue("Last Name", expected, getLastNameArea()); + } + + protected void assertEmailValue(String expected) { + assertFieldValue("Email", expected, getEmailField()); + } + + protected void assertAgeValue(String expected) { + assertFieldValue("Age", expected, getAgeField()); + } + + protected void assertDeceasedValue(String expected) { + assertFieldValue("Deceased", expected, getDeceasedField()); + } + + private void assertFieldValue(String caption, String expected, + TestBenchElement field) { + Assert.assertEquals( + String.format("Unexpected value for field '%s',", caption), + expected, field.getAttribute("value")); + } + + protected void assertSelectedSex(Sex sex) { + TableRowElement row = getGenderTable().getRow(getIndex(sex)); + Assert.assertTrue( + String.format("Given sex (%s) isn't selected.", + sex.getStringRepresentation()), + hasCssClass(row, "v-selected")); + } + + private int getIndex(Sex sex) { + switch (sex) { + case MALE: + return 0; + case FEMALE: + return 1; + default: + return 2; + } + } + + protected void assertBeanValuesUnchanged() { + showBeanValues(); + assertLogText(BEAN_VALUES); + } + + protected void assertCommitFails() { + commitChanges(); + closeNotification(); + assertLogText("Commit failed: Commit failed"); + } + + protected void assertCommitSuccessful() { + commitChanges(); + closeNotification(); + assertLogText("Commit succesful"); + } + + protected void assertDiscardResetsFields() { + discardChanges(); + assertLogText("Discarded changes"); + assertDefaults(); + } + + protected void assertLogText(String expected) { + ++logCounter; + Assert.assertEquals("Unexpected log contents,", logCounter + ". " + + expected, getLogRow(0)); + } + + protected void assertDefaults() { + assertFirstNameValue("John"); + assertLastNameValue("Doe"); + assertEmailValue("john@doe.com"); + assertAgeValue("64"); + assertSelectedSex(Sex.MALE); + assertDeceasedValue("NAAAAAH"); + } + +} diff --git a/uitest/src/com/vaadin/tests/fieldgroup/CommitHandlerFailuresTest.java b/uitest/src/com/vaadin/tests/fieldgroup/CommitHandlerFailuresTest.java new file mode 100644 index 0000000000..545c9c2e71 --- /dev/null +++ b/uitest/src/com/vaadin/tests/fieldgroup/CommitHandlerFailuresTest.java @@ -0,0 +1,60 @@ +package com.vaadin.tests.fieldgroup; + +import org.junit.Test; +import org.openqa.selenium.Keys; + +public class CommitHandlerFailuresTest extends BasicPersonFormTest { + + @Override + public void setup() throws Exception { + super.setup(); + openTestURL(); + } + + @Test + public void testDefaults() { + assertDefaults(); + assertBeanValuesUnchanged(); + } + + @Test + public void testUpdatingWithoutCommit() { + updateFields(); + assertBeanValuesUnchanged(); + } + + @Test + public void testPreCommitFails() { + updateFields(); + + getPreCommitFailsCheckBox().click(); + assertCommitFails(); + + assertBeanValuesUnchanged(); + } + + @Test + public void testPostCommitFails() { + updateFields(); + + getPostCommitFailsCheckBox().click(); + assertCommitFails(); + + assertBeanValuesUnchanged(); + } + + @Test + public void testDiscard() { + updateFields(); + assertDiscardResetsFields(); + assertBeanValuesUnchanged(); + } + + private void updateFields() { + getLastNameArea().sendKeys("Doeve", Keys.ENTER); + getFirstNameField().sendKeys("Mike", Keys.ENTER); + getEmailField().sendKeys("me@me.com", Keys.ENTER); + getAgeField().sendKeys("12", Keys.ENTER); + getGenderTable().getCell(2, 0).click(); + } +} diff --git a/uitest/src/com/vaadin/tests/fieldgroup/CommitWithValidationOrConversionErrorTest.java b/uitest/src/com/vaadin/tests/fieldgroup/CommitWithValidationOrConversionErrorTest.java new file mode 100644 index 0000000000..f5c751cd49 --- /dev/null +++ b/uitest/src/com/vaadin/tests/fieldgroup/CommitWithValidationOrConversionErrorTest.java @@ -0,0 +1,74 @@ +package com.vaadin.tests.fieldgroup; + +import org.junit.Test; + +public class CommitWithValidationOrConversionErrorTest extends + BasicPersonFormTest { + + private static final String UPDATED_BEAN_VALUES = "Person [firstName=John, lastName=Doever, email=john@doe.com, age=123, sex=Male, address=Address [streetAddress=John street, postalCode=11223, city=John's town, country=USA], deceased=false, salary=null, salaryDouble=null, rent=null]"; + private static final String UPDATED_NAME_BEAN_VALUES = "Person [firstName=John, lastName=Doever, email=john@doe.com, age=64, sex=Male, address=Address [streetAddress=John street, postalCode=11223, city=John's town, country=USA], deceased=false, salary=null, salaryDouble=null, rent=null]"; + + @Override + public void setup() throws Exception { + super.setup(); + openTestURL(); + } + + @Test + public void testCommitInvalidName() { + getLastNameArea().setValue("Doev"); + assertCommitFails(); + assertBeanValuesUnchanged(); + } + + @Test + public void testCommitInvalidAge() { + // default name invalid, must be fixed or doesn't test the correct error + getLastNameArea().setValue("Doever"); + + getAgeField().setValue("64,2"); + assertCommitFails(); + assertBeanValuesUnchanged(); + } + + @Test + public void testFixValidationError() { + getLastNameArea().setValue("Doev"); + assertCommitFails(); + assertBeanValuesUnchanged(); + + getLastNameArea().setValue("Doever"); + assertCommitSuccessful(); + showBeanValues(); + assertLogText(UPDATED_NAME_BEAN_VALUES); + } + + @Test + public void testFixConversionError() { + // default name invalid, must be fixed as well + getLastNameArea().setValue("Doever"); + + getAgeField().setValue("64,2"); + + assertCommitFails(); + assertBeanValuesUnchanged(); + + getAgeField().setValue("123"); + assertCommitSuccessful(); + + showBeanValues(); + assertLogText(UPDATED_BEAN_VALUES); + } + + @Test + public void testDiscardAfterSuccessfulCommit() { + getLastNameArea().setValue("Doever"); + getAgeField().setValue("123"); + assertCommitSuccessful(); + + discardChanges(); + assertLogText("Discarded changes"); + showBeanValues(); + assertLogText(UPDATED_BEAN_VALUES); + } +} diff --git a/uitest/src/com/vaadin/tests/fieldgroup/DateForm.java b/uitest/src/com/vaadin/tests/fieldgroup/DateForm.java index 3064856db9..6080f18391 100644 --- a/uitest/src/com/vaadin/tests/fieldgroup/DateForm.java +++ b/uitest/src/com/vaadin/tests/fieldgroup/DateForm.java @@ -8,9 +8,9 @@ import com.vaadin.data.fieldgroup.FieldGroup; import com.vaadin.data.fieldgroup.FieldGroup.CommitException; import com.vaadin.data.fieldgroup.PropertyId; import com.vaadin.data.util.BeanItem; -import com.vaadin.tests.components.TestBase; +import com.vaadin.server.VaadinRequest; +import com.vaadin.tests.components.AbstractTestUIWithLog; import com.vaadin.tests.data.bean.Person; -import com.vaadin.tests.util.Log; import com.vaadin.ui.Button; import com.vaadin.ui.Button.ClickEvent; import com.vaadin.ui.DateField; @@ -19,9 +19,8 @@ import com.vaadin.ui.Notification; import com.vaadin.ui.PopupDateField; import com.vaadin.ui.TextField; -public class DateForm extends TestBase { +public class DateForm extends AbstractTestUIWithLog { - private Log log = new Log(5); @PropertyId("date1") private DateField dateField; @PropertyId("date2") @@ -77,8 +76,8 @@ public class DateForm extends TestBase { } @Override - protected void setup() { - getMainWindow().setLocale(Locale.US); + protected void setup(VaadinRequest request) { + setLocale(Locale.US); addComponent(log); final FieldGroup fieldGroup = new BeanFieldGroup<DateObject>( DateObject.class); @@ -102,7 +101,7 @@ public class DateForm extends TestBase { msg = "Commit failed: " + e.getMessage(); } Notification.show(msg); - log.log(msg); + log(msg); } }); @@ -112,8 +111,7 @@ public class DateForm extends TestBase { @Override public void buttonClick(ClickEvent event) { fieldGroup.discard(); - log.log("Discarded changes"); - + log("Discarded changes"); } }); Button showBean = new Button("Show bean values", @@ -121,7 +119,7 @@ public class DateForm extends TestBase { @Override public void buttonClick(ClickEvent event) { - log.log(getPerson(fieldGroup).toString()); + log(getPerson(fieldGroup).toString()); } }); @@ -135,12 +133,13 @@ public class DateForm extends TestBase { fieldGroup.setItemDataSource(new BeanItem<DateObject>(d)); } + @SuppressWarnings("unchecked") public static Person getPerson(FieldGroup binder) { return ((BeanItem<Person>) binder.getItemDataSource()).getBean(); } @Override - protected String getDescription() { + public String getDescription() { return "Ensure FieldGroupFieldFactory supports Dates"; } diff --git a/uitest/src/com/vaadin/tests/fieldgroup/DateFormTest.java b/uitest/src/com/vaadin/tests/fieldgroup/DateFormTest.java new file mode 100644 index 0000000000..32d8bcb603 --- /dev/null +++ b/uitest/src/com/vaadin/tests/fieldgroup/DateFormTest.java @@ -0,0 +1,47 @@ +package com.vaadin.tests.fieldgroup; + +import org.junit.Assert; +import org.junit.Test; +import org.openqa.selenium.WebElement; + +import com.vaadin.testbench.By; +import com.vaadin.testbench.elements.DateFieldElement; +import com.vaadin.testbench.elements.InlineDateFieldElement; +import com.vaadin.testbench.elements.PopupDateFieldElement; +import com.vaadin.testbench.elements.TextFieldElement; +import com.vaadin.tests.tb3.MultiBrowserTest; + +public class DateFormTest extends MultiBrowserTest { + + @Test + public void testCorrectDateFormat() throws Exception { + openTestURL(); + Assert.assertEquals("Unexpected DateField value,", "1/20/84", + getDateFieldValue()); + Assert.assertEquals("Unexpected PopupDateField value,", "1/20/84", + getPopupDateFieldValue()); + WebElement day20 = getInlineDateFieldCalendarPanel().findElement( + By.vaadin("#day20")); + Assert.assertTrue( + "Unexpected InlineDateField state, 20th not selected.", + hasCssClass(day20, + "v-inline-datefield-calendarpanel-day-selected")); + Assert.assertEquals("Unexpected TextField contents,", + "Jan 20, 1984 4:34:49 PM", $(TextFieldElement.class).first() + .getValue()); + } + + protected String getDateFieldValue() { + return $(DateFieldElement.class).first().getValue(); + } + + protected String getPopupDateFieldValue() { + return $(PopupDateFieldElement.class).first().getValue(); + } + + protected WebElement getInlineDateFieldCalendarPanel() { + return $(InlineDateFieldElement.class).first().findElement( + By.className("v-inline-datefield-calendarpanel")); + } + +} diff --git a/uitest/src/com/vaadin/tests/fieldgroup/FieldGroupDiscardTest.java b/uitest/src/com/vaadin/tests/fieldgroup/FieldGroupDiscardTest.java new file mode 100644 index 0000000000..7d8beb2106 --- /dev/null +++ b/uitest/src/com/vaadin/tests/fieldgroup/FieldGroupDiscardTest.java @@ -0,0 +1,32 @@ +package com.vaadin.tests.fieldgroup; + +import org.junit.Test; +import org.openqa.selenium.Keys; + +public class FieldGroupDiscardTest extends BasicPersonFormTest { + + @Test + public void testFieldGroupDiscard() throws Exception { + openTestURL(); + assertDefaults(); + + /* make some changes */ + getFirstNameField().sendKeys("John123", Keys.ENTER); + getLastNameArea().sendKeys("Doe123", Keys.ENTER); + getEmailField().sendKeys("john@doe.com123", Keys.ENTER); + getAgeField().sendKeys("64123", Keys.ENTER); + getGenderTable().getCell(2, 0); + getDeceasedField().click(); + getDeceasedField().click(); + getDeceasedField().sendKeys("YAY!", Keys.ENTER); + + assertBeanValuesUnchanged(); + + assertDiscardResetsFields(); + + assertBeanValuesUnchanged(); + + /* we should still be at the state we started from */ + assertDefaults(); + } +} diff --git a/uitest/src/com/vaadin/tests/fields/TabIndexes.java b/uitest/src/com/vaadin/tests/fields/TabIndexes.java index cf2e253d08..32fb36815b 100644 --- a/uitest/src/com/vaadin/tests/fields/TabIndexes.java +++ b/uitest/src/com/vaadin/tests/fields/TabIndexes.java @@ -4,8 +4,7 @@ import java.util.ArrayList; import java.util.List; import com.vaadin.server.VaadinRequest; -import com.vaadin.tests.components.AbstractTestUI; -import com.vaadin.tests.util.Log; +import com.vaadin.tests.components.AbstractTestUIWithLog; import com.vaadin.ui.AbstractField; import com.vaadin.ui.Button; import com.vaadin.ui.Button.ClickEvent; @@ -30,14 +29,13 @@ import com.vaadin.ui.Tree; import com.vaadin.ui.TreeTable; import com.vaadin.ui.TwinColSelect; -public class TabIndexes extends AbstractTestUI { +@SuppressWarnings("rawtypes") +public class TabIndexes extends AbstractTestUIWithLog { private List<AbstractField> fields; - private Log log = new Log(5); @Override protected void setup(VaadinRequest request) { - addComponent(log); HorizontalLayout buttonLayout = new HorizontalLayout(); addComponent(buttonLayout); Button clearTabIndexes = new Button("Set all tab indexes to 0"); @@ -45,7 +43,7 @@ public class TabIndexes extends AbstractTestUI { @Override public void buttonClick(ClickEvent event) { - log.log("Setting tab indexes to 0"); + log("Setting tab indexes to 0"); for (AbstractField f : fields) { f.setTabIndex(0); } @@ -57,7 +55,7 @@ public class TabIndexes extends AbstractTestUI { @Override public void buttonClick(ClickEvent event) { - log.log("Setting tab indexes to 1"); + log("Setting tab indexes to 1"); for (AbstractField f : fields) { f.setTabIndex(1); } @@ -70,7 +68,7 @@ public class TabIndexes extends AbstractTestUI { @Override public void buttonClick(ClickEvent event) { int tabIndex = 1; - log.log("Setting tab indexes to 1..N"); + log("Setting tab indexes to 1..N"); for (AbstractField f : fields) { f.setTabIndex(tabIndex++); } @@ -84,7 +82,7 @@ public class TabIndexes extends AbstractTestUI { @Override public void buttonClick(ClickEvent event) { int tabIndex = fields.size(); - log.log("Setting tab indexes to N..1"); + log("Setting tab indexes to N..1"); for (AbstractField f : fields) { f.setTabIndex(tabIndex--); } @@ -153,8 +151,7 @@ public class TabIndexes extends AbstractTestUI { @Override protected String getTestDescription() { - // TODO Auto-generated method stub - return null; + return "Tab index should be propagated into html"; } } diff --git a/uitest/src/com/vaadin/tests/fields/TabIndexesTest.java b/uitest/src/com/vaadin/tests/fields/TabIndexesTest.java new file mode 100644 index 0000000000..6bd456c7e2 --- /dev/null +++ b/uitest/src/com/vaadin/tests/fields/TabIndexesTest.java @@ -0,0 +1,164 @@ +package com.vaadin.tests.fields; + +import java.util.ArrayList; +import java.util.List; + +import org.junit.Assert; +import org.junit.Test; +import org.openqa.selenium.WebElement; + +import com.vaadin.testbench.elements.ButtonElement; +import com.vaadin.tests.tb3.MultiBrowserTest; + +public class TabIndexesTest extends MultiBrowserTest { + + @Override + public void setup() throws Exception { + super.setup(); + openTestURL(); + } + + @Test + public void testTabIndexesSetToZero() { + // clicked by default + assertLogText("1. Setting tab indexes to 0"); + for (WebElement element : getFieldElements()) { + assertTabIndex("0", element); + } + } + + @Test + public void testTabIndexesSetToOne() { + setTabIndexesTo("1"); + for (WebElement element : getFieldElements()) { + assertTabIndex("1", element); + } + } + + @Test + public void testTabIndexesSetToOneThroughN() { + setTabIndexesTo("1..N"); + int counter = 0; + for (WebElement element : getFieldElements()) { + ++counter; + assertTabIndex(String.valueOf(counter), element); + } + } + + @Test + public void testTabIndexesSetToNThroughOne() { + setTabIndexesTo("N..1"); + List<WebElement> fieldElements = getFieldElements(); + int counter = fieldElements.size(); + for (WebElement element : fieldElements) { + assertTabIndex(String.valueOf(counter), element); + --counter; + } + } + + private void setTabIndexesTo(String expected) { + String caption = String.format("Set %stab indexes to %s", + (expected.contains("N") ? "" : "all "), expected); + $(ButtonElement.class).caption(caption).first().click(); + assertLogText("2. Setting tab indexes to " + expected); + } + + private void assertLogText(String expected) { + Assert.assertEquals("Unexpected log contents,", expected, getLogRow(0)); + } + + private void assertTabIndex(String expected, WebElement element) { + Assert.assertEquals("Unexpected tab index,", expected, + element.getAttribute("tabIndex")); + } + + private List<WebElement> getFieldElements() { + List<WebElement> fieldElements = new ArrayList<WebElement>(); + fieldElements.add(getElement1()); + fieldElements.add(getElement2()); + fieldElements.add(getElement3()); + fieldElements.add(getElement4()); + fieldElements.add(getElement5()); + fieldElements.add(getElement6()); + fieldElements.add(getElement7()); + fieldElements.add(getElement8()); + fieldElements.add(getElement9()); + fieldElements.add(getElement10()); + fieldElements.add(getElement11()); + fieldElements.add(getElement12()); + fieldElements.add(getElement13()); + fieldElements.add(getElement14()); + fieldElements.add(getElement15()); + fieldElements.add(getElement16()); + fieldElements.add(getElement17()); + return fieldElements; + } + + private WebElement getElement1() { + return vaadinElement("PID_Sfield-1/domChild[1]/domChild[1]"); + } + + private WebElement getElement2() { + return vaadinElement("PID_Sfield-2/domChild[0]"); + } + + private WebElement getElement3() { + return vaadinElement("PID_Sfield-3/domChild[0]"); + } + + private WebElement getElement4() { + return vaadinElement("PID_Sfield-4/domChild[0]"); + } + + private WebElement getElement5() { + return vaadinElement("PID_Sfield-5"); + } + + private WebElement getElement6() { + return vaadinElement("PID_Sfield-6/domChild[0]"); + } + + private WebElement getElement7() { + return vaadinElement("PID_Sfield-7/domChild[0]"); + } + + private WebElement getElement8() { + return vaadinElement("PID_Sfield-8/domChild[0]/domChild[0]"); + } + + private WebElement getElement9() { + return vaadinElement("PID_Sfield-9/domChild[1]/domChild[1]"); + } + + private WebElement getElement10() { + return vaadinElement("PID_Sfield-10/domChild[1]"); + } + + private WebElement getElement11() { + return vaadinElement("PID_Sfield-11/domChild[1]"); + } + + private WebElement getElement12() { + return vaadinElement("PID_Sfield-12"); + } + + private WebElement getElement13() { + return vaadinElement("PID_Sfield-13"); + } + + private WebElement getElement14() { + return vaadinElement("PID_Sfield-14"); + } + + private WebElement getElement15() { + return vaadinElement("PID_Sfield-15/domChild[1]"); + } + + private WebElement getElement16() { + return vaadinElement("PID_Sfield-16/domChild[0]"); + } + + private WebElement getElement17() { + return vaadinElement("PID_Sfield-17"); + } +} diff --git a/uitest/tb2/com/vaadin/tests/components/ui/CurrentUiRetained.html b/uitest/tb2/com/vaadin/tests/components/ui/CurrentUiRetained.html deleted file mode 100644 index fe030f2ea7..0000000000 --- a/uitest/tb2/com/vaadin/tests/components/ui/CurrentUiRetained.html +++ /dev/null @@ -1,52 +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="" /> -<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.CurrentUiRetained?restartApplication</td> - <td></td> -</tr> -<tr> - <td>pause</td> - <td>2000</td> - <td></td> -</tr> -<tr> - <td>click</td> - <td>vaadin=runcomvaadintestscomponentsuiCurrentUiRetained::/VVerticalLayout[0]/Slot[2]/VVerticalLayout[0]/Slot[0]/VButton[0]/domChild[0]/domChild[0]</td> - <td></td> -</tr> -<tr> - <td>assertText</td> - <td>vaadin=runcomvaadintestscomponentsuiCurrentUiRetained::PID_SLog_row_3</td> - <td>1. Correct UI.getCurrent before GC: true</td> -</tr> -<tr> - <td>assertText</td> - <td>vaadin=runcomvaadintestscomponentsuiCurrentUiRetained::PID_SLog_row_2</td> - <td>2. Correct UI.getCurrent after GC: true</td> -</tr> -<tr> - <td>assertText</td> - <td>vaadin=runcomvaadintestscomponentsuiCurrentUiRetained::PID_SLog_row_1</td> - <td>3. GC probe available before GC: true</td> -</tr> -<tr> - <td>assertText</td> - <td>vaadin=runcomvaadintestscomponentsuiCurrentUiRetained::PID_SLog_row_0</td> - <td>4. GC probe available after GC: false</td> -</tr> - -</tbody></table> -</body> -</html> diff --git a/uitest/tb2/com/vaadin/tests/components/ui/InitiallyEmptyFragment.html b/uitest/tb2/com/vaadin/tests/components/ui/InitiallyEmptyFragment.html deleted file mode 100644 index 933274eae6..0000000000 --- a/uitest/tb2/com/vaadin/tests/components/ui/InitiallyEmptyFragment.html +++ /dev/null @@ -1,47 +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://arturwin.office.itmill.com:9999/" /> -<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.InitialFragmentEvent?restartApplication</td> - <td></td> -</tr> -<!--There is no fragment change event when the fragment is initially empty--> -<tr> - <td>assertText</td> - <td>vaadin=runcomvaadintestscomponentsuiInitialFragmentEvent::PID_SLog_row_0</td> - <td></td> -</tr> -<tr> - <td>runScript</td> - <td>window.location.hash='bar'</td> - <td></td> -</tr> -<tr> - <td>pause</td> - <td>500</td> - <td></td> -</tr> -<tr> - <td>waitForVaadin</td> - <td></td> - <td></td> -</tr> -<tr> - <td>assertText</td> - <td>vaadin=runcomvaadintestscomponentsuiInitialFragmentEvent::PID_SLog_row_0</td> - <td>1. Fragment changed from "no event received" to bar</td> -</tr> -</tbody></table> -</body> -</html> diff --git a/uitest/tb2/com/vaadin/tests/components/ui/PollListenerTest.html b/uitest/tb2/com/vaadin/tests/components/ui/PollListenerTest.html deleted file mode 100644 index ac39d1f03c..0000000000 --- a/uitest/tb2/com/vaadin/tests/components/ui/PollListenerTest.html +++ /dev/null @@ -1,32 +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>PollListenerTest</title> -</head> -<body> -<table cellpadding="1" cellspacing="1" border="1"> -<thead> -<tr><td rowspan="1" colspan="3">PollListenerTest</td></tr> -</thead><tbody> -<tr> - <td>open</td> - <td>/run/com.vaadin.tests.components.ui.PollListenerTest?restartApplication</td> - <td></td> -</tr> -<tr> - <td>pause</td> - <td>5000</td> - <td></td> -</tr> -<tr> - <td>verifyTextPresent</td> - <td>PollEvent received</td> - <td></td> -</tr> - -</tbody></table> -</body> -</html> diff --git a/uitest/tb2/com/vaadin/tests/components/ui/RpcInvocationHandlerToString.html b/uitest/tb2/com/vaadin/tests/components/ui/RpcInvocationHandlerToString.html deleted file mode 100644 index c9d5aa303d..0000000000 --- a/uitest/tb2/com/vaadin/tests/components/ui/RpcInvocationHandlerToString.html +++ /dev/null @@ -1,51 +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.RpcInvocationHandlerToString?restartApplication</td> - <td></td> -</tr> -<tr> - <td>click</td> - <td>vaadin=runcomvaadintestscomponentsuiRpcInvocationHandlerToString::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VButton[0]/domChild[0]/domChild[0]</td> - <td></td> -</tr> -<tr> - <td>assertElementNotPresent</td> - <td>vaadin=runcomvaadintestscomponentsuiRpcInvocationHandlerToString::Root/VNotification[0]/HTML[0]</td> - <td></td> -</tr> -<tr> - <td>click</td> - <td>vaadin=runcomvaadintestscomponentsuiRpcInvocationHandlerToString::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[2]/VButton[0]/domChild[0]/domChild[0]</td> - <td></td> -</tr> -<tr> - <td>assertElementNotPresent</td> - <td>vaadin=runcomvaadintestscomponentsuiRpcInvocationHandlerToString::Root/VNotification[0]/HTML[0]</td> - <td></td> -</tr> -<tr> - <td>click</td> - <td>vaadin=runcomvaadintestscomponentsuiRpcInvocationHandlerToString::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[3]/VButton[0]/domChild[0]/domChild[0]</td> - <td></td> -</tr> -<tr> - <td>assertElementNotPresent</td> - <td>vaadin=runcomvaadintestscomponentsuiRpcInvocationHandlerToString::Root/VNotification[0]/HTML[0]</td> - <td></td> -</tr> -</tbody></table> -</body> -</html> diff --git a/uitest/tb2/com/vaadin/tests/components/ui/UIAccessExceptionHandling.html b/uitest/tb2/com/vaadin/tests/components/ui/UIAccessExceptionHandling.html deleted file mode 100644 index 94d8aa2777..0000000000 --- a/uitest/tb2/com/vaadin/tests/components/ui/UIAccessExceptionHandling.html +++ /dev/null @@ -1,67 +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.UIAccessExceptionHandling?restartApplication</td> - <td></td> -</tr> -<tr> - <td>click</td> - <td>vaadin=runcomvaadintestscomponentsuiUIAccessExceptionHandling::/VVerticalLayout[0]/Slot[2]/VVerticalLayout[0]/Slot[0]/VButton[0]/domChild[0]/domChild[0]</td> - <td></td> -</tr> -<tr> - <td>verifyText</td> - <td>vaadin=runcomvaadintestscomponentsuiUIAccessExceptionHandling::PID_SLog_row_0</td> - <td>1. Exception catched on get: java.util.concurrent.ExecutionException</td> -</tr> -<tr> - <td>verifyText</td> - <td>vaadin=runcomvaadintestscomponentsuiUIAccessExceptionHandling::PID_SLog_row_1</td> - <td>0. Exception catched on execution with ConnectorErrorEvent : java.util.concurrent.ExecutionException</td> -</tr> -<tr> - <td>click</td> - <td>vaadin=runcomvaadintestscomponentsuiUIAccessExceptionHandling::/VVerticalLayout[0]/Slot[2]/VVerticalLayout[0]/Slot[1]/VButton[0]/domChild[0]/domChild[0]</td> - <td></td> -</tr> -<tr> - <td>verifyText</td> - <td>vaadin=runcomvaadintestscomponentsuiUIAccessExceptionHandling::PID_SLog_row_0</td> - <td>1. Exception catched on get: java.util.concurrent.ExecutionException</td> -</tr> -<tr> - <td>verifyText</td> - <td>vaadin=runcomvaadintestscomponentsuiUIAccessExceptionHandling::PID_SLog_row_1</td> - <td>0. Exception catched on execution with ErrorEvent : java.util.concurrent.ExecutionException</td> -</tr> -<tr> - <td>click</td> - <td>vaadin=runcomvaadintestscomponentsuiUIAccessExceptionHandling::/VVerticalLayout[0]/Slot[2]/VVerticalLayout[0]/Slot[2]/VButton[0]/domChild[0]/domChild[0]</td> - <td></td> -</tr> -<tr> - <td>verifyText</td> - <td>vaadin=runcomvaadintestscomponentsuiUIAccessExceptionHandling::PID_SLog_row_0</td> - <td>1. Exception catched on get: java.util.concurrent.ExecutionException</td> -</tr> -<tr> - <td>verifyText</td> - <td>vaadin=runcomvaadintestscomponentsuiUIAccessExceptionHandling::PID_SLog_row_1</td> - <td>0. Exception catched on execution with ConnectorErrorEvent : java.util.concurrent.ExecutionException</td> -</tr> - -</tbody></table> -</body> -</html> diff --git a/uitest/tb2/com/vaadin/tests/components/ui/UIInitBrowserDetails.html b/uitest/tb2/com/vaadin/tests/components/ui/UIInitBrowserDetails.html deleted file mode 100644 index 3fd7a0d560..0000000000 --- a/uitest/tb2/com/vaadin/tests/components/ui/UIInitBrowserDetails.html +++ /dev/null @@ -1,112 +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:8070/" /> -<title>UIInitBrowserDetails</title> -</head> -<body> -<table cellpadding="1" cellspacing="1" border="1"> -<thead> -<tr><td rowspan="1" colspan="3">UIInitBrowserDetails</td></tr> -</thead><tbody> -<tr> - <td>open</td> - <td>/run/UIInitBrowserDetails?restartApplication</td> - <td></td> -</tr> -<!--location--> -<tr> - <td>assertNotText</td> - <td>vaadin=runUIInitBrowserDetails::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VGridLayout[0]/VLabel[4]</td> - <td>null</td> -</tr> -<tr> - <td>assertNotText</td> - <td>vaadin=runUIInitBrowserDetails::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VGridLayout[0]/VLabel[2]</td> - <td>null</td> -</tr> -<!--browser window width--> -<tr> - <td>assertNotText</td> - <td>vaadin=runUIInitBrowserDetails::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VGridLayout[0]/VLabel[4]</td> - <td>null</td> -</tr> -<tr> - <td>assertNotText</td> - <td>vaadin=runUIInitBrowserDetails::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VGridLayout[0]/VLabel[5]</td> - <td>-1</td> -</tr> -<!--browser window height--> -<tr> - <td>assertNotText</td> - <td>vaadin=runUIInitBrowserDetails::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VGridLayout[0]/VLabel[10]</td> - <td>null</td> -</tr> -<tr> - <td>assertNotText</td> - <td>vaadin=runUIInitBrowserDetails::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VGridLayout[0]/VLabel[8]</td> - <td>-1</td> -</tr> -<!--screen width--> -<tr> - <td>assertNotText</td> - <td>vaadin=runUIInitBrowserDetails::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VGridLayout[0]/VLabel[10]</td> - <td>null</td> -</tr> -<tr> - <td>assertNotText</td> - <td>vaadin=runUIInitBrowserDetails::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VGridLayout[0]/VLabel[11]</td> - <td>-1</td> -</tr> -<!--screen height--> -<tr> - <td>assertNotText</td> - <td>vaadin=runUIInitBrowserDetails::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VGridLayout[0]/VLabel[13]</td> - <td>null</td> -</tr> -<tr> - <td>assertNotText</td> - <td>vaadin=runUIInitBrowserDetails::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VGridLayout[0]/VLabel[14]</td> - <td>-1</td> -</tr> -<!--timezone offset--> -<tr> - <td>assertNotText</td> - <td>vaadin=runUIInitBrowserDetails::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VGridLayout[0]/VLabel[16]</td> - <td>null</td> -</tr> -<!--raw timezone offset--> -<tr> - <td>assertNotText</td> - <td>vaadin=runUIInitBrowserDetails::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VGridLayout[0]/VLabel[19]</td> - <td>null</td> -</tr> -<!--dst saving--> -<tr> - <td>assertNotText</td> - <td>vaadin=runUIInitBrowserDetails::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VGridLayout[0]/VLabel[22]</td> - <td>null</td> -</tr> -<!--dst in effect--> -<tr> - <td>assertNotText</td> - <td>vaadin=runUIInitBrowserDetails::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VGridLayout[0]/VLabel[25]</td> - <td>null</td> -</tr> -<!--current date--> -<tr> - <td>assertNotText</td> - <td>vaadin=runUIInitBrowserDetails::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VGridLayout[0]/VLabel[28]</td> - <td>null</td> -</tr> -<tr> - <td>assertNotText</td> - <td>vaadin=runUIInitBrowserDetails::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VGridLayout[0]/VLabel[29]</td> - <td>null</td> -</tr> - -</tbody></table> -</body> -</html> diff --git a/uitest/tb2/com/vaadin/tests/components/ui/UIInitException.html b/uitest/tb2/com/vaadin/tests/components/ui/UIInitException.html deleted file mode 100644 index 68b11e7942..0000000000 --- a/uitest/tb2/com/vaadin/tests/components/ui/UIInitException.html +++ /dev/null @@ -1,26 +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="" /> -<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.UIInitException?restartApplication</td> - <td></td> -</tr> -<tr> - <td>assertTextPresent</td> - <td>Catch me if you can</td> - <td></td> -</tr> -</tbody></table> -</body> -</html> diff --git a/uitest/tb2/com/vaadin/tests/components/ui/UIPolling.html b/uitest/tb2/com/vaadin/tests/components/ui/UIPolling.html deleted file mode 100644 index f770bae009..0000000000 --- a/uitest/tb2/com/vaadin/tests/components/ui/UIPolling.html +++ /dev/null @@ -1,53 +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/run/" /> -<title>WindowMaximizeRestoreTest</title> -</head> -<body> -<table cellpadding="1" cellspacing="1" border="1"> -<thead> -<tr><td rowspan="1" colspan="3">WindowMaximizeRestoreTest</td></tr> -</thead><tbody> -<tr> - <td>open</td> - <td>/run/UIPolling?restartApplication</td> - <td></td> -</tr> -<tr> - <td>type</td> - <td>vaadin=runUIPolling::/VVerticalLayout[0]/Slot[2]/VVerticalLayout[0]/Slot[0]/VTextField[0]</td> - <td>500</td> -</tr> -<tr> - <td>pause</td> - <td>2000</td> - <td></td> -</tr> -<!--Ensure polling has taken place--> -<tr> - <td>assertTextPresent</td> - <td>2. 1000ms has passed</td> - <td></td> -</tr> -<tr> - <td>type</td> - <td>vaadin=runUIPolling::/VVerticalLayout[0]/Slot[2]/VVerticalLayout[0]/Slot[0]/VTextField[0]</td> - <td>-1</td> -</tr> -<tr> - <td>pause</td> - <td>2000</td> - <td></td> -</tr> -<!--Ensure polling has stopped--> -<tr> - <td>assertTextNotPresent</td> - <td>8. 4000ms has passed</td> - <td></td> -</tr> -</tbody></table> -</body> -</html> diff --git a/uitest/tb2/com/vaadin/tests/components/ui/UITabIndex.html b/uitest/tb2/com/vaadin/tests/components/ui/UITabIndex.html deleted file mode 100644 index fa083f1489..0000000000 --- a/uitest/tb2/com/vaadin/tests/components/ui/UITabIndex.html +++ /dev/null @@ -1,57 +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.UITabIndex?restartApplication</td> - <td></td> -</tr> -<tr> - <td>assertAttribute</td> - <td>vaadin=runcomvaadintestscomponentsuiUITabIndex::@tabIndex</td> - <td>1</td> -</tr> -<tr> - <td>click</td> - <td>vaadin=runcomvaadintestscomponentsuiUITabIndex::/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[0]/VButton[0]/domChild[0]/domChild[0]</td> - <td></td> -</tr> -<tr> - <td>assertAttribute</td> - <td>vaadin=runcomvaadintestscomponentsuiUITabIndex::@tabIndex</td> - <td>-1</td> -</tr> -<tr> - <td>click</td> - <td>vaadin=runcomvaadintestscomponentsuiUITabIndex::/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[1]/VButton[0]/domChild[0]/domChild[0]</td> - <td></td> -</tr> -<tr> - <td>assertAttribute</td> - <td>vaadin=runcomvaadintestscomponentsuiUITabIndex::@tabIndex</td> - <td>0</td> -</tr> -<tr> - <td>click</td> - <td>vaadin=runcomvaadintestscomponentsuiUITabIndex::/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[2]/VButton[0]/domChild[0]/domChild[0]</td> - <td></td> -</tr> -<tr> - <td>assertAttribute</td> - <td>vaadin=runcomvaadintestscomponentsuiUITabIndex::@tabIndex</td> - <td>1</td> -</tr> - -</tbody></table> -</body> -</html> diff --git a/uitest/tb2/com/vaadin/tests/components/ui/UIsInMultipleTabs.html b/uitest/tb2/com/vaadin/tests/components/ui/UIsInMultipleTabs.html deleted file mode 100644 index 08561588c4..0000000000 --- a/uitest/tb2/com/vaadin/tests/components/ui/UIsInMultipleTabs.html +++ /dev/null @@ -1,47 +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="" /> -<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.UIsInMultipleTabs?restartApplication</td> - <td></td> -</tr> -<tr> - <td>assertText</td> - <td>vaadin=runcomvaadintestscomponentsuiUIsInMultipleTabs::/VVerticalLayout[0]/ChildComponentContainer[0]/VLabel[0]</td> - <td>This is UI number 1</td> -</tr> -<tr> - <td>open</td> - <td>/run/com.vaadin.tests.components.ui.UIsInMultipleTabs</td> - <td></td> -</tr> -<tr> - <td>assertText</td> - <td>vaadin=runcomvaadintestscomponentsuiUIsInMultipleTabs::/VVerticalLayout[0]/ChildComponentContainer[0]/VLabel[0]</td> - <td>This is UI number 2</td> -</tr> -<tr> - <td>open</td> - <td>/run/com.vaadin.tests.components.ui.UIsInMultipleTabs?restartApplication</td> - <td></td> -</tr> -<tr> - <td>assertText</td> - <td>vaadin=runcomvaadintestscomponentsuiUIsInMultipleTabs::/VVerticalLayout[0]/ChildComponentContainer[0]/VLabel[0]</td> - <td>This is UI number 1</td> -</tr> - -</tbody></table> -</body> -</html> diff --git a/uitest/tb2/com/vaadin/tests/components/window/CloseSubWindow.html b/uitest/tb2/com/vaadin/tests/components/window/CloseSubWindow.html deleted file mode 100644 index de5a793909..0000000000 --- a/uitest/tb2/com/vaadin/tests/components/window/CloseSubWindow.html +++ /dev/null @@ -1,53 +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>CloseSubWindow</title> -</head> -<body> -<table cellpadding="1" cellspacing="1" border="1"> -<thead> -<tr><td rowspan="1" colspan="3">CloseSubWindow</td></tr> -</thead><tbody> -<tr> - <td>open</td> - <td>/run/com.vaadin.tests.components.window.CloseSubWindow?restartApplication</td> - <td></td> -</tr> -<tr> - <td>click</td> - <td>vaadin=runcomvaadintestscomponentswindowCloseSubWindow::PID_Sopensub/domChild[0]/domChild[0]</td> - <td></td> -</tr> -<!--Close from click handler--> -<tr> - <td>click</td> - <td>vaadin=runcomvaadintestscomponentswindowCloseSubWindow::/VWindow[0]/FocusableScrollPanel[0]/VVerticalLayout[0]/ChildComponentContainer[0]/VButton[0]/domChild[0]/domChild[0]</td> - <td></td> -</tr> -<tr> - <td>assertText</td> - <td>vaadin=runcomvaadintestscomponentswindowCloseSubWindow::PID_SLog/ChildComponentContainer[0]/VLabel[0]</td> - <td>1. Window 'Sub-window' closed</td> -</tr> -<tr> - <td>click</td> - <td>vaadin=runcomvaadintestscomponentswindowCloseSubWindow::PID_Sopensub/domChild[0]/domChild[0]</td> - <td></td> -</tr> -<!--Click close in title bar--> -<tr> - <td>click</td> - <td>vaadin=runcomvaadintestscomponentswindowCloseSubWindow::/VWindow[0]/domChild[0]/domChild[0]/domChild[1]/domChild[1]</td> - <td></td> -</tr> -<tr> - <td>assertText</td> - <td>vaadin=runcomvaadintestscomponentswindowCloseSubWindow::PID_SLog/ChildComponentContainer[0]/VLabel[0]</td> - <td>2. Window 'Sub-window' closed</td> -</tr> -</tbody></table> -</body> -</html> diff --git a/uitest/tb2/com/vaadin/tests/components/window/ExtraWindowShown.html b/uitest/tb2/com/vaadin/tests/components/window/ExtraWindowShown.html deleted file mode 100644 index 65e8b0166b..0000000000 --- a/uitest/tb2/com/vaadin/tests/components/window/ExtraWindowShown.html +++ /dev/null @@ -1,61 +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="" /> -<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.window.ExtraWindowShown?restartApplication</td> - <td></td> -</tr> -<tr> - <td>click</td> - <td>vaadin=runcomvaadintestscomponentswindowExtraWindowShown::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VButton[0]/domChild[0]/domChild[0]</td> - <td></td> -</tr> -<tr> - <td>click</td> - <td>vaadin=runcomvaadintestscomponentswindowExtraWindowShown::/VWindow[0]/FocusableScrollPanel[0]/VVerticalLayout[0]/ChildComponentContainer[0]/VButton[0]/domChild[0]</td> - <td></td> -</tr> -<tr> - <td>pause</td> - <td>1000</td> - <td></td> -</tr> -<tr> - <td>assertElementNotPresent</td> - <td>vaadin=runcomvaadintestscomponentswindowExtraWindowShown::/VWindow[0]</td> - <td></td> -</tr> -<tr> - <td>click</td> - <td>vaadin=runcomvaadintestscomponentswindowExtraWindowShown::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VButton[0]/domChild[0]/domChild[0]</td> - <td></td> -</tr> -<tr> - <td>click</td> - <td>vaadin=runcomvaadintestscomponentswindowExtraWindowShown::/VWindow[0]/FocusableScrollPanel[0]/VVerticalLayout[0]/ChildComponentContainer[0]/VButton[0]/domChild[0]</td> - <td></td> -</tr> -<tr> - <td>pause</td> - <td>1000</td> - <td></td> -</tr> -<tr> - <td>assertElementNotPresent</td> - <td>vaadin=runcomvaadintestscomponentswindowExtraWindowShown::/VWindow[0]</td> - <td></td> -</tr> -</tbody></table> -</body> -</html> diff --git a/uitest/tb2/com/vaadin/tests/components/window/RepaintWindowContents.html b/uitest/tb2/com/vaadin/tests/components/window/RepaintWindowContents.html deleted file mode 100644 index 9cbcf1d5ea..0000000000 --- a/uitest/tb2/com/vaadin/tests/components/window/RepaintWindowContents.html +++ /dev/null @@ -1,57 +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://arturwin.office.itmill.com: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.window.RepaintWindowContents?restartApplication</td> - <td></td> -</tr> -<tr> - <td>assertText</td> - <td>vaadin=runcomvaadintestscomponentswindowRepaintWindowContents::/VWindow[0]/FocusableScrollPanel[0]/VVerticalLayout[0]/VButton[0]/domChild[0]/domChild[0]</td> - <td>Button 1</td> -</tr> -<tr> - <td>click</td> - <td>vaadin=runcomvaadintestscomponentswindowRepaintWindowContents::/VWindow[0]/FocusableScrollPanel[0]/VVerticalLayout[0]/VButton[0]/domChild[0]/domChild[0]</td> - <td></td> -</tr> -<tr> - <td>assertText</td> - <td>vaadin=runcomvaadintestscomponentswindowRepaintWindowContents::/VWindow[0]/FocusableScrollPanel[0]/VVerticalLayout[0]/VButton[0]/domChild[0]/domChild[0]</td> - <td>Button 2</td> -</tr> -<tr> - <td>click</td> - <td>vaadin=runcomvaadintestscomponentswindowRepaintWindowContents::/VWindow[0]/FocusableScrollPanel[0]/VVerticalLayout[0]/VButton[0]/domChild[0]/domChild[0]</td> - <td></td> -</tr> -<tr> - <td>assertText</td> - <td>vaadin=runcomvaadintestscomponentswindowRepaintWindowContents::/VWindow[0]/FocusableScrollPanel[0]/VVerticalLayout[0]/VButton[0]/domChild[0]/domChild[0]</td> - <td>Button 1</td> -</tr> -<tr> - <td>click</td> - <td>vaadin=runcomvaadintestscomponentswindowRepaintWindowContents::/VWindow[0]/FocusableScrollPanel[0]/VVerticalLayout[0]/VButton[0]/domChild[0]</td> - <td></td> -</tr> -<tr> - <td>assertText</td> - <td>vaadin=runcomvaadintestscomponentswindowRepaintWindowContents::/VWindow[0]/FocusableScrollPanel[0]/VVerticalLayout[0]/VButton[0]/domChild[0]/domChild[0]</td> - <td>Button 2</td> -</tr> - -</tbody></table> -</body> -</html> diff --git a/uitest/tb2/com/vaadin/tests/components/window/WindowShouldRemoveActionHandler.html b/uitest/tb2/com/vaadin/tests/components/window/WindowShouldRemoveActionHandler.html deleted file mode 100644 index 4923bff58a..0000000000 --- a/uitest/tb2/com/vaadin/tests/components/window/WindowShouldRemoveActionHandler.html +++ /dev/null @@ -1,107 +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="" /> -<title>WindowShouldRemoveActionHandler</title> -</head> -<body> -<table cellpadding="1" cellspacing="1" border="1"> -<thead> -<tr><td rowspan="1" colspan="3">WindowShouldRemoveActionHandler</td></tr> -</thead><tbody> -<tr> - <td>open</td> - <td>/run/com.vaadin.tests.components.window.WindowShouldRemoveActionHandler</td> - <td></td> -</tr> -<tr> - <td>waitForVaadin</td> - <td></td> - <td></td> -</tr> -<tr> - <td>click</td> - <td>vaadin=runcomvaadintestscomponentswindowWindowShouldRemoveActionHandler::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VButton[0]/domChild[0]/domChild[0]</td> - <td></td> -</tr> -<tr> - <td>waitForVaadin</td> - <td></td> - <td></td> -</tr> -<tr> - <td>click</td> - <td>vaadin=runcomvaadintestscomponentswindowWindowShouldRemoveActionHandler::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[2]/VButton[0]/domChild[0]/domChild[0]</td> - <td></td> -</tr> -<tr> - <td>waitForVaadin</td> - <td></td> - <td></td> -</tr> -<tr> - <td>verifyTitle</td> - <td>A panel with 2 action handlers</td> - <td></td> -</tr> -<tr> - <td>click</td> - <td>vaadin=runcomvaadintestscomponentswindowWindowShouldRemoveActionHandler::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VButton[0]/domChild[0]/domChild[0]</td> - <td></td> -</tr> -<tr> - <td>waitForVaadin</td> - <td></td> - <td></td> -</tr> -<tr> - <td>verifyTitle</td> - <td>A panel with 3 action handlers</td> - <td></td> -</tr> -<tr> - <td>click</td> - <td>vaadin=runcomvaadintestscomponentswindowWindowShouldRemoveActionHandler::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[3]/VButton[0]/domChild[0]/domChild[0]</td> - <td></td> -</tr> -<tr> - <td>waitForVaadin</td> - <td></td> - <td></td> -</tr> -<tr> - <td>click</td> - <td>vaadin=runcomvaadintestscomponentswindowWindowShouldRemoveActionHandler::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[3]/VButton[0]/domChild[0]/domChild[0]</td> - <td></td> -</tr> -<tr> - <td>waitForVaadin</td> - <td></td> - <td></td> -</tr> -<tr> - <td>verifyTitle</td> - <td>A panel with 3 action handlers - Removed handler - Removed handler</td> - <td></td> -</tr> -<tr> - <td>click</td> - <td>vaadin=runcomvaadintestscomponentswindowWindowShouldRemoveActionHandler::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VButton[0]/domChild[0]/domChild[0]</td> - <td></td> -</tr> -<tr> - <td>waitForVaadin</td> - <td></td> - <td></td> -</tr> -<tr> - <td>verifyTitle</td> - <td>A panel with 2 action handlers</td> - <td></td> -</tr> - -</tbody></table> -</body> -</html> diff --git a/uitest/tb2/com/vaadin/tests/components/window/WindowWithInvalidCloseListener.html b/uitest/tb2/com/vaadin/tests/components/window/WindowWithInvalidCloseListener.html deleted file mode 100644 index ea4d2c3666..0000000000 --- a/uitest/tb2/com/vaadin/tests/components/window/WindowWithInvalidCloseListener.html +++ /dev/null @@ -1,32 +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.window.WindowWithInvalidCloseListener?restartApplication</td> - <td></td> -</tr> -<tr> - <td>mouseClick</td> - <td>vaadin=runcomvaadintestscomponentswindowWindowWithInvalidCloseListener::/VWindow[0]/domChild[0]/domChild[0]/domChild[1]/domChild[1]</td> - <td>6,7</td> -</tr> -<tr> - <td>assertElementNotPresent</td> - <td>vaadin=runcomvaadintestscomponentswindowWindowWithInvalidCloseListener::/VWindow[0]</td> - <td></td> -</tr> - -</tbody></table> -</body> -</html> diff --git a/uitest/tb2/com/vaadin/tests/containers/sqlcontainer/TableQueryWithNonUniqueFirstPrimaryKey.html b/uitest/tb2/com/vaadin/tests/containers/sqlcontainer/TableQueryWithNonUniqueFirstPrimaryKey.html deleted file mode 100644 index 8b955ce17d..0000000000 --- a/uitest/tb2/com/vaadin/tests/containers/sqlcontainer/TableQueryWithNonUniqueFirstPrimaryKey.html +++ /dev/null @@ -1,67 +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:9999/" /> -<title>TableQueryWithNonUniqueFirstPrimaryKey</title> -</head> -<body> -<table cellpadding="1" cellspacing="1" border="1"> -<thead> -<tr><td rowspan="1" colspan="3">TableQueryWithNonUniqueFirstPrimaryKey</td></tr> -</thead><tbody> -<tr> - <td>open</td> - <td>/run/com.vaadin.tests.containers.sqlcontainer.TableQueryWithNonUniqueFirstPrimaryKey?restartApplication</td> - <td></td> -</tr> -<tr> - <td>enterCharacter</td> - <td>vaadin=runcomvaadintestscontainerssqlcontainerTableQueryWithNonUniqueFirstPrimaryKey::/VVerticalLayout[0]/ChildComponentContainer[0]/VFilterSelect[0]#textbox</td> - <td>rus</td> -</tr> -<tr> - <td>assertText</td> - <td>vaadin=runcomvaadintestscontainerssqlcontainerTableQueryWithNonUniqueFirstPrimaryKey::Root/VFilterSelect$SuggestionPopup[0]/VFilterSelect$SuggestionMenu[0]/#item0</td> - <td>TARUSCIO GIOVANNI</td> -</tr> -<tr> - <td>assertText</td> - <td>vaadin=runcomvaadintestscontainerssqlcontainerTableQueryWithNonUniqueFirstPrimaryKey::Root/VFilterSelect$SuggestionPopup[0]/VFilterSelect$SuggestionMenu[0]#item1</td> - <td>RUSSO GAETANO AUTORICAMBI</td> -</tr> -<tr> - <td>assertText</td> - <td>vaadin=runcomvaadintestscontainerssqlcontainerTableQueryWithNonUniqueFirstPrimaryKey::Root/VFilterSelect$SuggestionPopup[0]/VFilterSelect$SuggestionMenu[0]#item2</td> - <td>AMORUSO LUIGI SRL</td> -</tr> -<tr> - <td>assertText</td> - <td>vaadin=runcomvaadintestscontainerssqlcontainerTableQueryWithNonUniqueFirstPrimaryKey::Root/VFilterSelect$SuggestionPopup[0]/VFilterSelect$SuggestionMenu[0]#item3</td> - <td>CARUSO ROCCO</td> -</tr> -<tr> - <td>assertText</td> - <td>vaadin=runcomvaadintestscontainerssqlcontainerTableQueryWithNonUniqueFirstPrimaryKey::Root/VFilterSelect$SuggestionPopup[0]/VFilterSelect$SuggestionMenu[0]#item4</td> - <td>F.LLI RUSSO DI GAETANO RUSSO & C</td> -</tr> -<tr> - <td>assertText</td> - <td>vaadin=runcomvaadintestscontainerssqlcontainerTableQueryWithNonUniqueFirstPrimaryKey::Root/VFilterSelect$SuggestionPopup[0]/VFilterSelect$SuggestionMenu[0]#item5</td> - <td>RUSSO GIUSEPPE</td> -</tr> -<tr> - <td>assertText</td> - <td>vaadin=runcomvaadintestscontainerssqlcontainerTableQueryWithNonUniqueFirstPrimaryKey::Root/VFilterSelect$SuggestionPopup[0]/VFilterSelect$SuggestionMenu[0]#item6</td> - <td>TRUSCELLI ANTONIO</td> -</tr> -<tr> - <td>assertText</td> - <td>vaadin=runcomvaadintestscontainerssqlcontainerTableQueryWithNonUniqueFirstPrimaryKey::Root/VFilterSelect$SuggestionPopup[0]/VFilterSelect$SuggestionMenu[0]#item7</td> - <td>CARUSO CALOGERO</td> -</tr> - -</tbody></table> -</body> -</html> diff --git a/uitest/tb2/com/vaadin/tests/converter/ConverterThatEnforcesAFormat.html b/uitest/tb2/com/vaadin/tests/converter/ConverterThatEnforcesAFormat.html deleted file mode 100644 index 0bb576d76c..0000000000 --- a/uitest/tb2/com/vaadin/tests/converter/ConverterThatEnforcesAFormat.html +++ /dev/null @@ -1,62 +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://arturwin.office.itmill.com: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.converter.ConverterThatEnforcesAFormat?restartApplication</td> - <td></td> -</tr> -<tr> - <td>assertValue</td> - <td>vaadin=runcomvaadintestsconverterConverterThatEnforcesAFormat::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VTextField[0]</td> - <td>50.000</td> -</tr> -<tr> - <td>type</td> - <td>vaadin=runcomvaadintestsconverterConverterThatEnforcesAFormat::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VTextField[0]</td> - <td>50.0202</td> -</tr> -<tr> - <td>assertValue</td> - <td>vaadin=runcomvaadintestsconverterConverterThatEnforcesAFormat::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VTextField[0]</td> - <td>50.020</td> -</tr> -<tr> - <td>type</td> - <td>vaadin=runcomvaadintestsconverterConverterThatEnforcesAFormat::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VTextField[0]</td> - <td>12</td> -</tr> -<tr> - <td>assertValue</td> - <td>vaadin=runcomvaadintestsconverterConverterThatEnforcesAFormat::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VTextField[0]</td> - <td>12.000</td> -</tr> -<tr> - <td>type</td> - <td>vaadin=runcomvaadintestsconverterConverterThatEnforcesAFormat::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VTextField[0]</td> - <td>abc</td> -</tr> -<tr> - <td>assertValue</td> - <td>vaadin=runcomvaadintestsconverterConverterThatEnforcesAFormat::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VTextField[0]</td> - <td>abc</td> -</tr> -<tr> - <td>assertCSSClass</td> - <td>vaadin=runcomvaadintestsconverterConverterThatEnforcesAFormat::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VTextField[0]</td> - <td>v-textfield-error</td> -</tr> - -</tbody></table> -</body> -</html> diff --git a/uitest/tb2/com/vaadin/tests/dd/DnDOnSubtree.html b/uitest/tb2/com/vaadin/tests/dd/DnDOnSubtree.html deleted file mode 100644 index 844636cb02..0000000000 --- a/uitest/tb2/com/vaadin/tests/dd/DnDOnSubtree.html +++ /dev/null @@ -1,51 +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>DnDOnSubtree</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.dd.DDTest8?restartApplication</td> - <td></td> - </tr> - <tr> - <td>drag</td> - <td>vaadin=runcomvaadintestsddDDTest8::/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[0]/VTree[0]#n[3]</td> - <td>11,8</td> - </tr> - <!-- Drop on Bar5, which is a subtree target --> - <tr> - <td>drop</td> - <td>vaadin=runcomvaadintestsddDDTest8::/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[0]/VTree[0]#n[6]</td> - <td>34,9</td> - </tr> - <tr> - <td>mouseClick</td> - <td> - vaadin=runcomvaadintestsddDDTest8::/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[0]/VTree[0]#n[5]/expand - </td> - <td>10,8</td> - </tr> - <!-- Assert that the dragged & dropped node is now a child of Bar5 --> - <tr> - <td>assertElementPresent</td> - <td> - vaadin=runcomvaadintestsddDDTest8::/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[0]/VTree[0]#n[5]/n[0] - </td> - <td></td> - </tr> - </tbody> -</table> -</body> -</html> diff --git a/uitest/tb2/com/vaadin/tests/fieldgroup/CommitHandlerFailures.html b/uitest/tb2/com/vaadin/tests/fieldgroup/CommitHandlerFailures.html deleted file mode 100644 index aaaa0a6625..0000000000 --- a/uitest/tb2/com/vaadin/tests/fieldgroup/CommitHandlerFailures.html +++ /dev/null @@ -1,215 +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="" /> -<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.fieldgroup.BasicPersonForm?restartApplication</td> - <td></td> -</tr> -<!--assert we are starting with what we think we are starting with--> -<tr> - <td>assertValue</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[2]/VTextField[0]</td> - <td>John</td> -</tr> -<tr> - <td>assertValue</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[3]/VTextArea[0]</td> - <td>Doe</td> -</tr> -<tr> - <td>assertValue</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[4]/VTextField[0]</td> - <td>john@doe.com</td> -</tr> -<tr> - <td>assertValue</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[5]/VTextField[0]</td> - <td>64</td> -</tr> -<tr> - <td>assertCSSClass</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[6]/VScrollTable[0]/domChild[1]/domChild[0]/domChild[1]/domChild[0]/domChild[0]</td> - <td>v-selected</td> -</tr> -<tr> - <td>assertNotCSSClass</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[6]/VScrollTable[0]/domChild[1]/domChild[0]/domChild[1]/domChild[0]/domChild[2]</td> - <td>v-selected</td> -</tr> -<tr> - <td>assertValue</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[7]/VTextField[0]</td> - <td>NAAAAAH</td> -</tr> -<!--Make changes to fields--> -<tr> - <td>enterCharacter</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[3]/VTextArea[0]</td> - <td>Doeve</td> -</tr> -<tr> - <td>enterCharacter</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[2]/VTextField[0]</td> - <td>Mike</td> -</tr> -<tr> - <td>enterCharacter</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[4]/VTextField[0]</td> - <td>me@me.com</td> -</tr> -<tr> - <td>enterCharacter</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[5]/VTextField[0]</td> - <td>12</td> -</tr> -<tr> - <td>mouseClick</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[6]/VScrollTable[0]/domChild[1]/domChild[0]/domChild[1]/domChild[0]/domChild[2]/domChild[0]/domChild[0]</td> - <td>31,10</td> -</tr> -<!--show bean values--> -<tr> - <td>click</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[10]/VButton[0]/domChild[0]/domChild[0]</td> - <td></td> -</tr> -<tr> - <td>assertText</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::PID_SLog_row_0</td> - <td>1. Person [firstName=John, lastName=Doe, email=john@doe.com, age=64, sex=Male, address=Address [streetAddress=John street, postalCode=11223, city=John's town, country=USA], deceased=false, salary=null, salaryDouble=null, rent=null]</td> -</tr> -<!--pre commit fails--> -<tr> - <td>mouseClick</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VPanel[0]/VVerticalLayout[0]/ChildComponentContainer[1]/VCheckBox[0]/domChild[0]</td> - <td>35,6</td> -</tr> -<tr> - <td>click</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[8]/VButton[0]/domChild[0]/domChild[0]</td> - <td></td> -</tr> -<tr> - <td>closeNotification</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::Root/VNotification[0]</td> - <td>0,0</td> -</tr> -<tr> - <td>assertText</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::PID_SLog_row_0</td> - <td>2. Commit failed: Commit failed</td> -</tr> -<tr> - <td>click</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[10]/VButton[0]/domChild[0]/domChild[0]</td> - <td></td> -</tr> -<tr> - <td>assertText</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::PID_SLog_row_0</td> - <td>3. Person [firstName=John, lastName=Doe, email=john@doe.com, age=64, sex=Male, address=Address [streetAddress=John street, postalCode=11223, city=John's town, country=USA], deceased=false, salary=null, salaryDouble=null, rent=null]</td> -</tr> -<!--post commit fails--> -<tr> - <td>mouseClick</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VPanel[0]/VVerticalLayout[0]/ChildComponentContainer[1]/VCheckBox[0]/domChild[0]</td> - <td>10,7</td> -</tr> -<tr> - <td>mouseClick</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VPanel[0]/VVerticalLayout[0]/ChildComponentContainer[0]/VCheckBox[0]/domChild[0]</td> - <td>9,7</td> -</tr> -<tr> - <td>click</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[8]/VButton[0]/domChild[0]/domChild[0]</td> - <td></td> -</tr> -<tr> - <td>closeNotification</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::Root/VNotification[0]</td> - <td>0,0</td> -</tr> -<tr> - <td>assertText</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::PID_SLog_row_0</td> - <td>4. Commit failed: Commit failed</td> -</tr> -<tr> - <td>click</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[10]/VButton[0]/domChild[0]/domChild[0]</td> - <td></td> -</tr> -<tr> - <td>assertText</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::PID_SLog_row_0</td> - <td>5. Person [firstName=John, lastName=Doe, email=john@doe.com, age=64, sex=Male, address=Address [streetAddress=John street, postalCode=11223, city=John's town, country=USA], deceased=false, salary=null, salaryDouble=null, rent=null]</td> -</tr> -<!--discard and ensure old values are returned as all commits have failed--> -<tr> - <td>click</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[9]/VButton[0]/domChild[0]/domChild[0]</td> - <td></td> -</tr> -<tr> - <td>assertValue</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[2]/VTextField[0]</td> - <td>John</td> -</tr> -<tr> - <td>assertValue</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[3]/VTextArea[0]</td> - <td>Doe</td> -</tr> -<tr> - <td>assertValue</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[4]/VTextField[0]</td> - <td>john@doe.com</td> -</tr> -<tr> - <td>assertValue</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[5]/VTextField[0]</td> - <td>64</td> -</tr> -<tr> - <td>assertCSSClass</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[6]/VScrollTable[0]/domChild[1]/domChild[0]/domChild[1]/domChild[0]/domChild[0]</td> - <td>v-selected</td> -</tr> -<tr> - <td>assertNotCSSClass</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[6]/VScrollTable[0]/domChild[1]/domChild[0]/domChild[1]/domChild[0]/domChild[2]</td> - <td>v-selected</td> -</tr> -<tr> - <td>assertValue</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[7]/VTextField[0]</td> - <td>NAAAAAH</td> -</tr> -<!--show bean values--> -<tr> - <td>click</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[10]/VButton[0]/domChild[0]/domChild[0]</td> - <td></td> -</tr> -<tr> - <td>assertText</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::PID_SLog_row_0</td> - <td>7. Person [firstName=John, lastName=Doe, email=john@doe.com, age=64, sex=Male, address=Address [streetAddress=John street, postalCode=11223, city=John's town, country=USA], deceased=false, salary=null, salaryDouble=null, rent=null]</td> -</tr> - -</tbody></table> -</body> -</html> - diff --git a/uitest/tb2/com/vaadin/tests/fieldgroup/CommitWithValidationOrConversionError.html b/uitest/tb2/com/vaadin/tests/fieldgroup/CommitWithValidationOrConversionError.html deleted file mode 100644 index 8681c6485e..0000000000 --- a/uitest/tb2/com/vaadin/tests/fieldgroup/CommitWithValidationOrConversionError.html +++ /dev/null @@ -1,148 +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="" /> -<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.fieldgroup.BasicPersonForm?restartApplication</td> - <td></td> -</tr> -<tr> - <td>enterCharacter</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[3]/VTextArea[0]</td> - <td>Doev</td> -</tr> -<!--commit with invalid field must fail--> -<tr> - <td>click</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[8]/VButton[0]/domChild[0]</td> - <td></td> -</tr> -<tr> - <td>closeNotification</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::Root/VNotification[0]</td> - <td>0,0</td> -</tr> -<tr> - <td>assertText</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::PID_SLog_row_0</td> - <td>1. Commit failed: Commit failed</td> -</tr> -<tr> - <td>click</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[10]/VButton[0]/domChild[0]/domChild[0]</td> - <td></td> -</tr> -<tr> - <td>assertText</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::PID_SLog_row_0</td> - <td>2. Person [firstName=John, lastName=Doe, email=john@doe.com, age=64, sex=Male, address=Address [streetAddress=John street, postalCode=11223, city=John's town, country=USA], deceased=false, salary=null, salaryDouble=null, rent=null]</td> -</tr> -<tr> - <td>enterCharacter</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[5]/VTextField[0]</td> - <td>64,2</td> -</tr> -<!--commit with 2 fails--> -<tr> - <td>click</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[8]/VButton[0]/domChild[0]/domChild[0]</td> - <td></td> -</tr> -<tr> - <td>closeNotification</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::Root/VNotification[0]</td> - <td>0,0</td> -</tr> -<tr> - <td>assertText</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::PID_SLog_row_0</td> - <td>3. Commit failed: Commit failed</td> -</tr> -<tr> - <td>enterCharacter</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[3]/VTextArea[0]</td> - <td>Doever</td> -</tr> -<!--1 error fixed, still 1 conversion error--> -<tr> - <td>click</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[8]/VButton[0]/domChild[0]/domChild[0]</td> - <td></td> -</tr> -<tr> - <td>closeNotification</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::Root/VNotification[0]</td> - <td>0,0</td> -</tr> -<tr> - <td>assertText</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::PID_SLog_row_0</td> - <td>4. Commit failed: Commit failed</td> -</tr> -<tr> - <td>enterCharacter</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[5]/VTextField[0]</td> - <td>123</td> -</tr> -<!--all fields ok, commit should be ok--> -<tr> - <td>click</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[8]/VButton[0]/domChild[0]/domChild[0]</td> - <td></td> -</tr> -<tr> - <td>closeNotification</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::Root/VNotification[0]</td> - <td>0,0</td> -</tr> -<tr> - <td>assertText</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::PID_SLog_row_0</td> - <td>5. Commit succesful</td> -</tr> -<tr> - <td>click</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[10]/VButton[0]/domChild[0]/domChild[0]</td> - <td></td> -</tr> -<tr> - <td>assertText</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::PID_SLog_row_0</td> - <td>6. Person [firstName=John, lastName=Doever, email=john@doe.com, age=123, sex=Male, address=Address [streetAddress=John street, postalCode=11223, city=John's town, country=USA], deceased=false, salary=null, salaryDouble=null, rent=null]</td> -</tr> -<!--discard should now have no effect--> -<tr> - <td>click</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[9]/VButton[0]/domChild[0]/domChild[0]</td> - <td></td> -</tr> -<tr> - <td>assertText</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::PID_SLog_row_0</td> - <td>7. Discarded changes</td> -</tr> -<tr> - <td>click</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[10]/VButton[0]/domChild[0]</td> - <td></td> -</tr> -<tr> - <td>assertText</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::PID_SLog_row_0</td> - <td>8. Person [firstName=John, lastName=Doever, email=john@doe.com, age=123, sex=Male, address=Address [streetAddress=John street, postalCode=11223, city=John's town, country=USA], deceased=false, salary=null, salaryDouble=null, rent=null]</td> -</tr> - -</tbody></table> -</body> -</html> - diff --git a/uitest/tb2/com/vaadin/tests/fieldgroup/DateForm.html b/uitest/tb2/com/vaadin/tests/fieldgroup/DateForm.html deleted file mode 100644 index f141091805..0000000000 --- a/uitest/tb2/com/vaadin/tests/fieldgroup/DateForm.html +++ /dev/null @@ -1,42 +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.fieldgroup.DateForm?restartApplication</td> - <td></td> -</tr> -<tr> - <td>assertValue</td> - <td>vaadin=runcomvaadintestsfieldgroupDateForm::/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[1]/VPopupCalendar[0]#field</td> - <td>1/20/84</td> -</tr> -<tr> - <td>assertValue</td> - <td>vaadin=runcomvaadintestsfieldgroupDateForm::/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[2]/VPopupCalendar[0]#field</td> - <td>1/20/84</td> -</tr> -<tr> - <td>assertCSSClass</td> - <td>vaadin=runcomvaadintestsfieldgroupDateForm::/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[3]/VDateFieldCalendar[0]/VCalendarPanel[0]#day20</td> - <td>v-inline-datefield-calendarpanel-day-selected</td> -</tr> -<tr> - <td>assertValue</td> - <td>vaadin=runcomvaadintestsfieldgroupDateForm::/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[4]/VTextField[0]</td> - <td>Jan 20, 1984 4:34:49 PM</td> -</tr> - -</tbody></table> -</body> -</html> diff --git a/uitest/tb2/com/vaadin/tests/fieldgroup/FieldGroupDiscard.html b/uitest/tb2/com/vaadin/tests/fieldgroup/FieldGroupDiscard.html deleted file mode 100644 index a2ac1b748b..0000000000 --- a/uitest/tb2/com/vaadin/tests/fieldgroup/FieldGroupDiscard.html +++ /dev/null @@ -1,164 +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="" /> -<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.fieldgroup.BasicPersonForm?restartApplication</td> - <td></td> -</tr> -<!--assert we are starting with what we think we are starting with--> -<tr> - <td>assertValue</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[2]/VTextField[0]</td> - <td>John</td> -</tr> -<tr> - <td>assertValue</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[3]/VTextArea[0]</td> - <td>Doe</td> -</tr> -<tr> - <td>assertValue</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[4]/VTextField[0]</td> - <td>john@doe.com</td> -</tr> -<tr> - <td>assertValue</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[5]/VTextField[0]</td> - <td>64</td> -</tr> -<tr> - <td>assertCSSClass</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[6]/VScrollTable[0]/domChild[1]/domChild[0]/domChild[1]/domChild[0]/domChild[0]</td> - <td>v-selected</td> -</tr> -<tr> - <td>assertNotCSSClass</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[6]/VScrollTable[0]/domChild[1]/domChild[0]/domChild[1]/domChild[0]/domChild[2]</td> - <td>v-selected</td> -</tr> -<tr> - <td>assertValue</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[7]/VTextField[0]</td> - <td>NAAAAAH</td> -</tr> -<!--make some changes--> -<tr> - <td>enterCharacter</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[2]/VTextField[0]</td> - <td>John123</td> -</tr> -<tr> - <td>enterCharacter</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[3]/VTextArea[0]</td> - <td>Doe123</td> -</tr> -<tr> - <td>enterCharacter</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[4]/VTextField[0]</td> - <td>john@doe.com123</td> -</tr> -<tr> - <td>enterCharacter</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[5]/VTextField[0]</td> - <td>64123</td> -</tr> -<tr> - <td>mouseClick</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[6]/VScrollTable[0]/domChild[1]/domChild[0]/domChild[1]/domChild[0]/domChild[1]/domChild[0]/domChild[0]</td> - <td>33,8</td> -</tr> -<tr> - <td>mouseClick</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[7]/VTextField[0]</td> - <td>72,10</td> -</tr> -<tr> - <td>mouseClick</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[7]/VTextField[0]</td> - <td>-18,15</td> -</tr> -<tr> - <td>type</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[7]/VTextField[0]</td> - <td>YAY!</td> -</tr> -<tr> - <td>click</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[10]/VButton[0]/domChild[0]/domChild[0]</td> - <td></td> -</tr> -<tr> - <td>assertText</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::PID_SLog_row_0</td> - <td>1. Person [firstName=John, lastName=Doe, email=john@doe.com, age=64, sex=Male, address=Address [streetAddress=John street, postalCode=11223, city=John's town, country=USA], deceased=false, salary=null, salaryDouble=null, rent=null]</td> -</tr> -<tr> - <td>click</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[9]/VButton[0]/domChild[0]/domChild[0]</td> - <td></td> -</tr> -<tr> - <td>assertText</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::PID_SLog_row_0</td> - <td>2. Discarded changes</td> -</tr> -<tr> - <td>click</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[10]/VButton[0]/domChild[0]/domChild[0]</td> - <td></td> -</tr> -<tr> - <td>assertText</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::PID_SLog_row_0</td> - <td>3. Person [firstName=John, lastName=Doe, email=john@doe.com, age=64, sex=Male, address=Address [streetAddress=John street, postalCode=11223, city=John's town, country=USA], deceased=false, salary=null, salaryDouble=null, rent=null]</td> -</tr> -<!--we should still be at the state we started from--> -<tr> - <td>assertValue</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[2]/VTextField[0]</td> - <td>John</td> -</tr> -<tr> - <td>assertValue</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[3]/VTextArea[0]</td> - <td>Doe</td> -</tr> -<tr> - <td>assertValue</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[4]/VTextField[0]</td> - <td>john@doe.com</td> -</tr> -<tr> - <td>assertValue</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[5]/VTextField[0]</td> - <td>64</td> -</tr> -<tr> - <td>assertCSSClass</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[6]/VScrollTable[0]/domChild[1]/domChild[0]/domChild[1]/domChild[0]/domChild[0]</td> - <td>v-selected</td> -</tr> -<tr> - <td>assertNotCSSClass</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[6]/VScrollTable[0]/domChild[1]/domChild[0]/domChild[1]/domChild[0]/domChild[2]</td> - <td>v-selected</td> -</tr> -<tr> - <td>assertValue</td> - <td>vaadin=runcomvaadintestsfieldgroupBasicPersonForm::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[7]/VTextField[0]</td> - <td>NAAAAAH</td> -</tr> -</tbody></table> -</body> -</html> diff --git a/uitest/tb2/com/vaadin/tests/fields/TabIndexes.html b/uitest/tb2/com/vaadin/tests/fields/TabIndexes.html deleted file mode 100644 index a78be3045c..0000000000 --- a/uitest/tb2/com/vaadin/tests/fields/TabIndexes.html +++ /dev/null @@ -1,376 +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://arturwin.office.itmill.com: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.fields.TabIndexes?restartApplication</td> - <td></td> -</tr> -<tr> - <td>assertAttribute</td> - <td>vaadin=runcomvaadintestsfieldsTabIndexes::PID_Sfield-1/domChild[1]/domChild[1]@tabIndex</td> - <td>0</td> -</tr> -<tr> - <td>assertAttribute</td> - <td>vaadin=runcomvaadintestsfieldsTabIndexes::PID_Sfield-2/domChild[0]@tabIndex</td> - <td>0</td> -</tr> -<tr> - <td>assertAttribute</td> - <td>vaadin=runcomvaadintestsfieldsTabIndexes::PID_Sfield-3/domChild[0]@tabIndex</td> - <td>0</td> -</tr> -<tr> - <td>assertAttribute</td> - <td>vaadin=runcomvaadintestsfieldsTabIndexes::PID_Sfield-4/domChild[0]@tabIndex</td> - <td>0</td> -</tr> -<tr> - <td>assertAttribute</td> - <td>vaadin=runcomvaadintestsfieldsTabIndexes::PID_Sfield-5@tabIndex</td> - <td>0</td> -</tr> -<tr> - <td>assertAttribute</td> - <td>vaadin=runcomvaadintestsfieldsTabIndexes::PID_Sfield-6/domChild[0]@tabIndex</td> - <td>0</td> -</tr> -<tr> - <td>assertAttribute</td> - <td>vaadin=runcomvaadintestsfieldsTabIndexes::PID_Sfield-7/domChild[0]@tabIndex</td> - <td>0</td> -</tr> -<tr> - <td>assertAttribute</td> - <td>vaadin=runcomvaadintestsfieldsTabIndexes::PID_Sfield-8/domChild[0]/domChild[0]@tabIndex</td> - <td>0</td> -</tr> -<tr> - <td>assertAttribute</td> - <td>vaadin=runcomvaadintestsfieldsTabIndexes::PID_Sfield-9/domChild[1]/domChild[1]@tabIndex</td> - <td>0</td> -</tr> -<tr> - <td>assertAttribute</td> - <td>vaadin=runcomvaadintestsfieldsTabIndexes::PID_Sfield-10/domChild[1]@tabIndex</td> - <td>0</td> -</tr> -<tr> - <td>assertAttribute</td> - <td>vaadin=runcomvaadintestsfieldsTabIndexes::PID_Sfield-11/domChild[1]@tabIndex</td> - <td>0</td> -</tr> -<tr> - <td>assertAttribute</td> - <td>vaadin=runcomvaadintestsfieldsTabIndexes::PID_Sfield-12@tabIndex</td> - <td>0</td> -</tr> -<tr> - <td>assertAttribute</td> - <td>vaadin=runcomvaadintestsfieldsTabIndexes::PID_Sfield-13@tabIndex</td> - <td>0</td> -</tr> -<tr> - <td>assertAttribute</td> - <td>vaadin=runcomvaadintestsfieldsTabIndexes::PID_Sfield-14@tabIndex</td> - <td>0</td> -</tr> -<tr> - <td>assertAttribute</td> - <td>vaadin=runcomvaadintestsfieldsTabIndexes::PID_Sfield-15/domChild[1]@tabIndex</td> - <td>0</td> -</tr> -<tr> - <td>assertAttribute</td> - <td>vaadin=runcomvaadintestsfieldsTabIndexes::PID_Sfield-16/domChild[0]@tabIndex</td> - <td>0</td> -</tr> -<tr> - <td>assertAttribute</td> - <td>vaadin=runcomvaadintestsfieldsTabIndexes::PID_Sfield-17@tabIndex</td> - <td>0</td> -</tr> -<tr> - <td>click</td> - <td>vaadin=runcomvaadintestsfieldsTabIndexes::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VHorizontalLayout[0]/VOrderedLayout$Slot[1]/VButton[0]/domChild[0]/domChild[0]</td> - <td></td> -</tr> -<tr> - <td>assertAttribute</td> - <td>vaadin=runcomvaadintestsfieldsTabIndexes::PID_Sfield-1/domChild[1]/domChild[1]@tabIndex</td> - <td>1</td> -</tr> -<tr> - <td>assertAttribute</td> - <td>vaadin=runcomvaadintestsfieldsTabIndexes::PID_Sfield-2/domChild[0]@tabIndex</td> - <td>1</td> -</tr> -<tr> - <td>assertAttribute</td> - <td>vaadin=runcomvaadintestsfieldsTabIndexes::PID_Sfield-3/domChild[0]@tabIndex</td> - <td>1</td> -</tr> -<tr> - <td>assertAttribute</td> - <td>vaadin=runcomvaadintestsfieldsTabIndexes::PID_Sfield-4/domChild[0]@tabIndex</td> - <td>1</td> -</tr> -<tr> - <td>assertAttribute</td> - <td>vaadin=runcomvaadintestsfieldsTabIndexes::PID_Sfield-5@tabIndex</td> - <td>1</td> -</tr> -<tr> - <td>assertAttribute</td> - <td>vaadin=runcomvaadintestsfieldsTabIndexes::PID_Sfield-6/domChild[0]@tabIndex</td> - <td>1</td> -</tr> -<tr> - <td>assertAttribute</td> - <td>vaadin=runcomvaadintestsfieldsTabIndexes::PID_Sfield-7/domChild[0]@tabIndex</td> - <td>1</td> -</tr> -<tr> - <td>assertAttribute</td> - <td>vaadin=runcomvaadintestsfieldsTabIndexes::PID_Sfield-8/domChild[0]/domChild[0]@tabIndex</td> - <td>1</td> -</tr> -<tr> - <td>assertAttribute</td> - <td>vaadin=runcomvaadintestsfieldsTabIndexes::PID_Sfield-9/domChild[1]/domChild[1]@tabIndex</td> - <td>1</td> -</tr> -<tr> - <td>assertAttribute</td> - <td>vaadin=runcomvaadintestsfieldsTabIndexes::PID_Sfield-10/domChild[1]@tabIndex</td> - <td>1</td> -</tr> -<tr> - <td>assertAttribute</td> - <td>vaadin=runcomvaadintestsfieldsTabIndexes::PID_Sfield-11/domChild[1]@tabIndex</td> - <td>1</td> -</tr> -<tr> - <td>assertAttribute</td> - <td>vaadin=runcomvaadintestsfieldsTabIndexes::PID_Sfield-12@tabIndex</td> - <td>1</td> -</tr> -<tr> - <td>assertAttribute</td> - <td>vaadin=runcomvaadintestsfieldsTabIndexes::PID_Sfield-13@tabIndex</td> - <td>1</td> -</tr> -<tr> - <td>assertAttribute</td> - <td>vaadin=runcomvaadintestsfieldsTabIndexes::PID_Sfield-14@tabIndex</td> - <td>1</td> -</tr> -<tr> - <td>assertAttribute</td> - <td>vaadin=runcomvaadintestsfieldsTabIndexes::PID_Sfield-15/domChild[1]@tabIndex</td> - <td>1</td> -</tr> -<tr> - <td>assertAttribute</td> - <td>vaadin=runcomvaadintestsfieldsTabIndexes::PID_Sfield-16/domChild[0]@tabIndex</td> - <td>1</td> -</tr> -<tr> - <td>assertAttribute</td> - <td>vaadin=runcomvaadintestsfieldsTabIndexes::PID_Sfield-17@tabIndex</td> - <td>1</td> -</tr> -<tr> - <td>click</td> - <td>vaadin=runcomvaadintestsfieldsTabIndexes::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VHorizontalLayout[0]/VOrderedLayout$Slot[2]/VButton[0]/domChild[0]/domChild[0]</td> - <td></td> -</tr> -<tr> - <td>assertAttribute</td> - <td>vaadin=runcomvaadintestsfieldsTabIndexes::PID_Sfield-1/domChild[1]/domChild[1]@tabIndex</td> - <td>1</td> -</tr> -<tr> - <td>assertAttribute</td> - <td>vaadin=runcomvaadintestsfieldsTabIndexes::PID_Sfield-2/domChild[0]@tabIndex</td> - <td>2</td> -</tr> -<tr> - <td>assertAttribute</td> - <td>vaadin=runcomvaadintestsfieldsTabIndexes::PID_Sfield-3/domChild[0]@tabIndex</td> - <td>3</td> -</tr> -<tr> - <td>assertAttribute</td> - <td>vaadin=runcomvaadintestsfieldsTabIndexes::PID_Sfield-4/domChild[0]@tabIndex</td> - <td>4</td> -</tr> -<tr> - <td>assertAttribute</td> - <td>vaadin=runcomvaadintestsfieldsTabIndexes::PID_Sfield-5@tabIndex</td> - <td>5</td> -</tr> -<tr> - <td>assertAttribute</td> - <td>vaadin=runcomvaadintestsfieldsTabIndexes::PID_Sfield-6/domChild[0]@tabIndex</td> - <td>6</td> -</tr> -<tr> - <td>assertAttribute</td> - <td>vaadin=runcomvaadintestsfieldsTabIndexes::PID_Sfield-7/domChild[0]@tabIndex</td> - <td>7</td> -</tr> -<tr> - <td>assertAttribute</td> - <td>vaadin=runcomvaadintestsfieldsTabIndexes::PID_Sfield-8/domChild[0]/domChild[0]@tabIndex</td> - <td>8</td> -</tr> -<tr> - <td>assertAttribute</td> - <td>vaadin=runcomvaadintestsfieldsTabIndexes::PID_Sfield-9/domChild[1]/domChild[1]@tabIndex</td> - <td>9</td> -</tr> -<tr> - <td>assertAttribute</td> - <td>vaadin=runcomvaadintestsfieldsTabIndexes::PID_Sfield-10/domChild[1]@tabIndex</td> - <td>10</td> -</tr> -<tr> - <td>assertAttribute</td> - <td>vaadin=runcomvaadintestsfieldsTabIndexes::PID_Sfield-11/domChild[1]@tabIndex</td> - <td>11</td> -</tr> -<tr> - <td>assertAttribute</td> - <td>vaadin=runcomvaadintestsfieldsTabIndexes::PID_Sfield-12@tabIndex</td> - <td>12</td> -</tr> -<tr> - <td>assertAttribute</td> - <td>vaadin=runcomvaadintestsfieldsTabIndexes::PID_Sfield-13@tabIndex</td> - <td>13</td> -</tr> -<tr> - <td>assertAttribute</td> - <td>vaadin=runcomvaadintestsfieldsTabIndexes::PID_Sfield-14@tabIndex</td> - <td>14</td> -</tr> -<tr> - <td>assertAttribute</td> - <td>vaadin=runcomvaadintestsfieldsTabIndexes::PID_Sfield-15/domChild[1]@tabIndex</td> - <td>15</td> -</tr> -<tr> - <td>assertAttribute</td> - <td>vaadin=runcomvaadintestsfieldsTabIndexes::PID_Sfield-16/domChild[0]@tabIndex</td> - <td>16</td> -</tr> -<tr> - <td>assertAttribute</td> - <td>vaadin=runcomvaadintestsfieldsTabIndexes::PID_Sfield-17@tabIndex</td> - <td>17</td> -</tr> -<tr> - <td>click</td> - <td>vaadin=runcomvaadintestsfieldsTabIndexes::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VHorizontalLayout[0]/VOrderedLayout$Slot[3]/VButton[0]/domChild[0]/domChild[0]</td> - <td></td> -</tr> -<tr> - <td>assertAttribute</td> - <td>vaadin=runcomvaadintestsfieldsTabIndexes::PID_Sfield-1/domChild[1]/domChild[1]@tabIndex</td> - <td>17</td> -</tr> -<tr> - <td>assertAttribute</td> - <td>vaadin=runcomvaadintestsfieldsTabIndexes::PID_Sfield-2/domChild[0]@tabIndex</td> - <td>16</td> -</tr> -<tr> - <td>assertAttribute</td> - <td>vaadin=runcomvaadintestsfieldsTabIndexes::PID_Sfield-3/domChild[0]@tabIndex</td> - <td>15</td> -</tr> -<tr> - <td>assertAttribute</td> - <td>vaadin=runcomvaadintestsfieldsTabIndexes::PID_Sfield-4/domChild[0]@tabIndex</td> - <td>14</td> -</tr> -<tr> - <td>assertAttribute</td> - <td>vaadin=runcomvaadintestsfieldsTabIndexes::PID_Sfield-5@tabIndex</td> - <td>13</td> -</tr> -<tr> - <td>assertAttribute</td> - <td>vaadin=runcomvaadintestsfieldsTabIndexes::PID_Sfield-6/domChild[0]@tabIndex</td> - <td>12</td> -</tr> -<tr> - <td>assertAttribute</td> - <td>vaadin=runcomvaadintestsfieldsTabIndexes::PID_Sfield-7/domChild[0]@tabIndex</td> - <td>11</td> -</tr> -<tr> - <td>assertAttribute</td> - <td>vaadin=runcomvaadintestsfieldsTabIndexes::PID_Sfield-8/domChild[0]/domChild[0]@tabIndex</td> - <td>10</td> -</tr> -<tr> - <td>assertAttribute</td> - <td>vaadin=runcomvaadintestsfieldsTabIndexes::PID_Sfield-9/domChild[1]/domChild[1]@tabIndex</td> - <td>9</td> -</tr> -<tr> - <td>assertAttribute</td> - <td>vaadin=runcomvaadintestsfieldsTabIndexes::PID_Sfield-10/domChild[1]@tabIndex</td> - <td>8</td> -</tr> -<tr> - <td>assertAttribute</td> - <td>vaadin=runcomvaadintestsfieldsTabIndexes::PID_Sfield-11/domChild[1]@tabIndex</td> - <td>7</td> -</tr> -<tr> - <td>assertAttribute</td> - <td>vaadin=runcomvaadintestsfieldsTabIndexes::PID_Sfield-12@tabIndex</td> - <td>6</td> -</tr> -<tr> - <td>assertAttribute</td> - <td>vaadin=runcomvaadintestsfieldsTabIndexes::PID_Sfield-13@tabIndex</td> - <td>5</td> -</tr> -<tr> - <td>assertAttribute</td> - <td>vaadin=runcomvaadintestsfieldsTabIndexes::PID_Sfield-14@tabIndex</td> - <td>4</td> -</tr> -<tr> - <td>assertAttribute</td> - <td>vaadin=runcomvaadintestsfieldsTabIndexes::PID_Sfield-15/domChild[1]@tabIndex</td> - <td>3</td> -</tr> -<tr> - <td>assertAttribute</td> - <td>vaadin=runcomvaadintestsfieldsTabIndexes::PID_Sfield-16/domChild[0]@tabIndex</td> - <td>2</td> -</tr> -<tr> - <td>assertAttribute</td> - <td>vaadin=runcomvaadintestsfieldsTabIndexes::PID_Sfield-17@tabIndex</td> - <td>1</td> -</tr> -</tbody></table> -</body> -</html> |