summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorArtur Signell <artur.signell@itmill.com>2009-04-03 09:14:07 +0000
committerArtur Signell <artur.signell@itmill.com>2009-04-03 09:14:07 +0000
commitc0e35f4ea8fcc7c61ae2b2d4882373217da1b3af (patch)
tree760de7fa3f063d9070eb7ee77a36e677387fe324 /tests
parent1216fd25d6ee545db3b205369d7624d3201fba5f (diff)
downloadvaadin-framework-c0e35f4ea8fcc7c61ae2b2d4882373217da1b3af.tar.gz
vaadin-framework-c0e35f4ea8fcc7c61ae2b2d4882373217da1b3af.zip
Merged Testing Tools branch
svn changeset:7298/svn branch:6.0
Diffstat (limited to 'tests')
-rw-r--r--tests/com/itmill/toolkit/tests/sampler/SamplerSmokeTest.java32
-rw-r--r--tests/com/itmill/toolkit/tests/sampler/SamplerSmokeTest2.java57
2 files changed, 89 insertions, 0 deletions
diff --git a/tests/com/itmill/toolkit/tests/sampler/SamplerSmokeTest.java b/tests/com/itmill/toolkit/tests/sampler/SamplerSmokeTest.java
new file mode 100644
index 0000000000..125423633a
--- /dev/null
+++ b/tests/com/itmill/toolkit/tests/sampler/SamplerSmokeTest.java
@@ -0,0 +1,32 @@
+package com.itmill.toolkit.tests.sampler;
+
+import com.itmill.testingtools.runner.TestRunner;
+
+public class SamplerSmokeTest extends TestRunner {
+
+ public void testNew() throws Exception {
+ selenium.open("/sampler?restartApplication");
+ waitForITMillToolkit();
+ selenium
+ .click("itmilltoolkit=sampler::/IVerticalLayout[0]/ChildComponentContainer[1]/ISplitPanelHorizontal[0]/IPanel[0]/IGridLayout[0]/AbsolutePanel[0]/ChildComponentContainer[1]/IButton[0]");
+ waitForITMillToolkit();
+ assertEquals(
+ "Tooltips",
+ selenium
+ .getText("itmilltoolkit=sampler::/IVerticalLayout[0]/ChildComponentContainer[1]/ISplitPanelHorizontal[0]/IHorizontalLayout[0]/ChildComponentContainer[0]/IVerticalLayout[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]"));
+ selenium
+ .click("itmilltoolkit=sampler::/IVerticalLayout[0]/ChildComponentContainer[1]/ISplitPanelHorizontal[0]/IHorizontalLayout[0]/ChildComponentContainer[0]/IVerticalLayout[0]/ChildComponentContainer[1]/IVerticalLayout[0]/ChildComponentContainer[3]/IButton[0]");
+ waitForITMillToolkit();
+ selenium
+ .click("itmilltoolkit=sampler::/IVerticalLayout[0]/ChildComponentContainer[1]/ISplitPanelHorizontal[0]/IHorizontalLayout[0]/ChildComponentContainer[0]/IVerticalLayout[0]/ChildComponentContainer[1]/IVerticalLayout[0]/ChildComponentContainer[3]/IButton[0]");
+ waitForITMillToolkit();
+ selenium
+ .click("itmilltoolkit=sampler::/IVerticalLayout[0]/ChildComponentContainer[1]/ISplitPanelHorizontal[0]/IHorizontalLayout[0]/ChildComponentContainer[0]/IVerticalLayout[0]/ChildComponentContainer[0]/IVerticalLayout[0]/ChildComponentContainer[0]/IHorizontalLayout[0]/ChildComponentContainer[2]/IActiveLink[0]/domChild[0]/domChild[0]");
+ waitForITMillToolkit();
+ verifyTrue(selenium
+ .isTextPresent("'m terribly sorry, but it seems the source could not be found.\nPlease try adding the source folder to the classpath for your server, or tell the administrator to do so!"));
+ waitForITMillToolkit();
+ selenium.click("PID141_window_close");
+ waitForITMillToolkit();
+ }
+}
diff --git a/tests/com/itmill/toolkit/tests/sampler/SamplerSmokeTest2.java b/tests/com/itmill/toolkit/tests/sampler/SamplerSmokeTest2.java
new file mode 100644
index 0000000000..3a6b3d8191
--- /dev/null
+++ b/tests/com/itmill/toolkit/tests/sampler/SamplerSmokeTest2.java
@@ -0,0 +1,57 @@
+package com.itmill.toolkit.tests.sampler;
+
+import com.itmill.testingtools.runner.TestRunner;
+
+public class SamplerSmokeTest2 extends TestRunner {
+
+ public void testNew() throws Exception {
+ selenium.open("/sampler?restartApplication");
+ waitForITMillToolkit();
+ selenium
+ .click("itmilltoolkit=sampler::/IVerticalLayout[0]/ChildComponentContainer[1]/ISplitPanelHorizontal[0]/IPanel[0]/IGridLayout[0]/AbsolutePanel[0]/ChildComponentContainer[16]/IButton[0]");
+ waitForITMillToolkit();
+ selenium
+ .click("itmilltoolkit=sampler::/IVerticalLayout[0]/ChildComponentContainer[0]/IHorizontalLayout[0]/ChildComponentContainer[6]/IHorizontalLayout[0]/ChildComponentContainer[1]/IButton[0]");
+ waitForITMillToolkit();
+ selenium
+ .type(
+ "itmilltoolkit=sampler::/IVerticalLayout[0]/ChildComponentContainer[1]/ISplitPanelHorizontal[0]/IHorizontalLayout[0]/ChildComponentContainer[0]/IVerticalLayout[0]/ChildComponentContainer[1]/IVerticalLayout[0]/ChildComponentContainer[0]/IForm[0]/IFormLayout[0]/IFormLayout$IFormLayoutTable[0]/ITextField[0]",
+ "Peter");
+ waitForITMillToolkit();
+ selenium
+ .type(
+ "itmilltoolkit=sampler::/IVerticalLayout[0]/ChildComponentContainer[1]/ISplitPanelHorizontal[0]/IHorizontalLayout[0]/ChildComponentContainer[0]/IVerticalLayout[0]/ChildComponentContainer[1]/IVerticalLayout[0]/ChildComponentContainer[0]/IForm[0]/IFormLayout[0]/IFormLayout$IFormLayoutTable[0]/ITextField[1]",
+ "Person");
+ waitForITMillToolkit();
+ selenium
+ .type(
+ "itmilltoolkit=sampler::/IVerticalLayout[0]/ChildComponentContainer[1]/ISplitPanelHorizontal[0]/IHorizontalLayout[0]/ChildComponentContainer[0]/IVerticalLayout[0]/ChildComponentContainer[1]/IVerticalLayout[0]/ChildComponentContainer[0]/IForm[0]/IFormLayout[0]/IFormLayout$IFormLayoutTable[0]/IFilterSelect[0]/domChild[1]",
+ "finland");
+ waitForITMillToolkit();
+ selenium
+ .type(
+ "itmilltoolkit=sampler::/IVerticalLayout[0]/ChildComponentContainer[1]/ISplitPanelHorizontal[0]/IHorizontalLayout[0]/ChildComponentContainer[0]/IVerticalLayout[0]/ChildComponentContainer[1]/IVerticalLayout[0]/ChildComponentContainer[0]/IForm[0]/IFormLayout[0]/IFormLayout$IFormLayoutTable[0]/IPasswordField[0]",
+ "mypass");
+ waitForITMillToolkit();
+ selenium
+ .click("itmilltoolkit=sampler::/IVerticalLayout[0]/ChildComponentContainer[1]/ISplitPanelHorizontal[0]/IHorizontalLayout[0]/ChildComponentContainer[0]/IVerticalLayout[0]/ChildComponentContainer[1]/IVerticalLayout[0]/ChildComponentContainer[0]/IForm[0]/IFormLayout[0]/IFormLayout$IFormLayoutTable[0]/IPopupCalendar[0]/domChild[1]");
+ waitForITMillToolkit();
+ selenium
+ .click("//table[@id='PID_TOOLKIT_POPUPCAL']/tbody/tr[4]/td[2]/span");
+ waitForITMillToolkit();
+ selenium
+ .type(
+ "itmilltoolkit=sampler::/IVerticalLayout[0]/ChildComponentContainer[1]/ISplitPanelHorizontal[0]/IHorizontalLayout[0]/ChildComponentContainer[0]/IVerticalLayout[0]/ChildComponentContainer[1]/IVerticalLayout[0]/ChildComponentContainer[0]/IForm[0]/IFormLayout[0]/IFormLayout$IFormLayoutTable[0]/ITextField[2]",
+ "45");
+ waitForITMillToolkit();
+ selenium
+ .click("itmilltoolkit=sampler::/IVerticalLayout[0]/ChildComponentContainer[1]/ISplitPanelHorizontal[0]/IHorizontalLayout[0]/ChildComponentContainer[0]/IVerticalLayout[0]/ChildComponentContainer[1]/IVerticalLayout[0]/ChildComponentContainer[0]/IForm[0]/IFormLayout[0]/IFormLayout$IFormLayoutTable[0]/IHorizontalLayout[0]/ChildComponentContainer[1]/IButton[0]");
+ waitForITMillToolkit();
+ selenium
+ .click("itmilltoolkit=sampler::/IVerticalLayout[0]/ChildComponentContainer[1]/ISplitPanelHorizontal[0]/IHorizontalLayout[0]/ChildComponentContainer[0]/IVerticalLayout[0]/ChildComponentContainer[1]/IVerticalLayout[0]/ChildComponentContainer[1]/IButton[0]");
+ waitForITMillToolkit();
+ verifyTrue(selenium
+ .isTextPresent("First name: Peter\nLast name: Person\nCountry:"));
+ verifyTrue(selenium.isTextPresent("Shoe size: 45\nPassword: mypass"));
+ }
+}