Author: dsvyatobatsko
Date: 2008-05-27 13:46:43 -0400 (Tue, 27 May 2008)
New Revision: 8790
Modified:
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/ComboBoxTest.java
Log:
restored the version erased by rename folder commit
Modified:
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/ComboBoxTest.java
===================================================================
---
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/ComboBoxTest.java 2008-05-27
17:08:13 UTC (rev 8789)
+++
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/ComboBoxTest.java 2008-05-27
17:46:43 UTC (rev 8790)
@@ -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";
+ }
-}
+}
\ No newline at end of file
Show replies by date