Author: dsvyatobatsko
Date: 2008-05-26 06:59:45 -0400 (Mon, 26 May 2008)
New Revision: 8753
Modified:
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/ComboBoxTest.java
Log:
combobox component test extension
Modified:
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/ComboBoxTest.java
===================================================================
---
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/ComboBoxTest.java 2008-05-26
09:50:09 UTC (rev 8752)
+++
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/ComboBoxTest.java 2008-05-26
10:59:45 UTC (rev 8753)
@@ -62,14 +62,41 @@
selenium.type(predefinedCBId + "comboboxField", "Hunt");
selenium.typeKeys(predefinedCBId + "comboboxField", "Hunt");
- Assert.assertTrue(isVisibleById(predefinedCBId + "list"),
"Component pop-up should show up on click");
+ Assert.assertTrue(isVisibleById(predefinedCBId + "list"),
"Component's pop-up must show up on key typing");
clickById(predefinedCBId + "list");
- Assert.assertFalse(isVisibleById(predefinedCBId + "list"),
"Component pop-up has to be closed");
+ Assert.assertFalse(isVisibleById(predefinedCBId + "list"),
"Component's pop-up has to be closed");
Assert.assertEquals(getValue(predefinedCBId), "Hunter");
- delay(2000);
+ writeStatus("check a combobox with dynamic suggestions list");
+
+ clickById(selectItemsCBId);
+
+ writeStatus("verify \"directInputSuggestions\" component's
attribute");
+
+ writeStatus("type \"O\"");
+
+ selenium.type(selectItemsCBId + "comboboxField", "O");
+ selenium.typeKeys(selectItemsCBId + "comboboxField", "O");
+
+ Assert.assertTrue(isVisibleById(selectItemsCBId + "list"),
"Component's pop-up must show up on key typing");
+ Assert.assertEquals(getValue(selectItemsCBId), "Oak");
+
+ writeStatus("check a combobox with a simple String list as suggestions
list");
+
+ clickById(suggestionValuesCBId);
+ writeStatus("type \"Ma\"");
+
+ selenium.type(suggestionValuesCBId + "comboboxField", "Ma");
+ selenium.typeKeys(suggestionValuesCBId + "comboboxField",
"Ma");
+
+ Assert.assertTrue(isVisibleById(suggestionValuesCBId + "list"),
"Component's pop-up must show up on key typing");
+
+ clickById(suggestionValuesCBId + "list");
+
+ Assert.assertFalse(isVisibleById(suggestionValuesCBId + "list"),
"Component's pop-up has to be closed");
+ Assert.assertEquals(getValue(suggestionValuesCBId), "Maple");
}
/**
@@ -81,8 +108,8 @@
return runScript("$('" + clientId +
"comboboxValue').value;");
}
- public String getTestUrl() {
- return "/faces/pages/comboBox/comboBoxTest.xhtml";
- }
+ public String getTestUrl() {
+ return "/faces/pages/comboBox/comboBoxTest.xhtml";
+ }
}
Show replies by date