Author: dsvyatobatsko
Date: 2008-05-08 13:01:23 -0400 (Thu, 08 May 2008)
New Revision: 8510
Added:
trunk/test-applications/seleniumTest/src/main/webapp/pages/comboBox/
trunk/test-applications/seleniumTest/src/main/webapp/pages/comboBox/comboBoxTest.xhtml
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/ComboBoxTest.java
Modified:
trunk/test-applications/seleniumTest/src/main/webapp/WEB-INF/faces-config.xml
Log:
combobox component test
Modified: trunk/test-applications/seleniumTest/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
---
trunk/test-applications/seleniumTest/src/main/webapp/WEB-INF/faces-config.xml 2008-05-08
16:54:26 UTC (rev 8509)
+++
trunk/test-applications/seleniumTest/src/main/webapp/WEB-INF/faces-config.xml 2008-05-08
17:01:23 UTC (rev 8510)
@@ -71,5 +71,10 @@
<managed-bean-name>regionBean</managed-bean-name>
<managed-bean-class>org.ajax4jsf.A4JRegionTestBean</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>comboBean</managed-bean-name>
+ <managed-bean-class>org.ajax4jsf.ComboBoxTestBean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
</managed-bean>
</faces-config>
\ No newline at end of file
Added:
trunk/test-applications/seleniumTest/src/main/webapp/pages/comboBox/comboBoxTest.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/seleniumTest/src/main/webapp/pages/comboBox/comboBoxTest.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added: trunk/test-applications/seleniumTest/src/test/java/org/richfaces/ComboBoxTest.java
===================================================================
--- trunk/test-applications/seleniumTest/src/test/java/org/richfaces/ComboBoxTest.java
(rev 0)
+++
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/ComboBoxTest.java 2008-05-08
17:01:23 UTC (rev 8510)
@@ -0,0 +1,57 @@
+package org.richfaces;
+
+import org.ajax4jsf.test.base.SeleniumTestBase;
+import org.ajax4jsf.test.base.Templates;
+import org.testng.Assert;
+import org.testng.annotations.AfterTest;
+import org.testng.annotations.BeforeTest;
+import org.testng.annotations.Parameters;
+import org.testng.annotations.Test;
+
+public class ComboBoxTest extends SeleniumTestBase {
+
+ public ComboBoxTest() {
+ super("http", "localhost", "8080");
+ }
+
+ /**
+ * This method are invoking before selenium tests started
+ */
+ @BeforeTest
+ @Parameters( { "browser" })
+ public void startSelenium(String browser) {
+ super.startSelenium(browser);
+ }
+
+ /**
+ * This method are invoking after selenium tests completed
+ */
+ @AfterTest
+ public void stopSelenium() {
+ super.stopSelenium();
+ }
+
+ @Test
+ public void testComboBoxComponent() throws Exception {
+ _testComboBoxComponent(Templates.SIMPLE);
+ _testComboBoxComponent(Templates.DATATABLE);
+ }
+
+ private void _testComboBoxComponent(Templates template) {
+ renderPage("/faces/pages/comboBox/comboBoxTest.xhtml", template);
+
+ String parentId = getParentId() + "_form:";
+
+ String predefinedCBId = parentId + "predefinedcomboboxField";
+ String selectItemsCBId = parentId + "selectItemscomboboxField";
+ String suggestionValuesCBId = parentId +
"suggestionValuescomboboxField";
+
+ writeStatus("check components\\' default labels");
+
+ getTextById(predefinedCBId).startsWith("Select a");
+ getTextById(selectItemsCBId).startsWith("Select a");
+ getTextById(suggestionValuesCBId).startsWith("Select a");
+
+ }
+
+}
Property changes on:
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/ComboBoxTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Show replies by date