Author: konstantin.mishin
Date: 2009-02-17 12:27:00 -0500 (Tue, 17 Feb 2009)
New Revision: 12684
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ComboBoxTestBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/comboBox/comboBoxTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ComboBoxTest.java
Log:
RF-6071
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ComboBoxTestBean.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ComboBoxTestBean.java 2009-02-17
15:17:59 UTC (rev 12683)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ComboBoxTestBean.java 2009-02-17
17:27:00 UTC (rev 12684)
@@ -40,6 +40,7 @@
private Boolean directInputSuggestions;
private Boolean filterNewValues;
private Boolean selectFirstOnUpdate;
+ private Boolean enableManualInput;
private List<SelectItem> treeItems;
private List<String> treeNames;
@@ -58,6 +59,7 @@
directInputSuggestions = false;
filterNewValues = true;
selectFirstOnUpdate = true;
+ enableManualInput = true;
}
/**
@@ -143,4 +145,12 @@
public Boolean getSelectFirstOnUpdate() {
return selectFirstOnUpdate;
}
+
+ public void setEnableManualInput(Boolean enableManualInput) {
+ this.enableManualInput = enableManualInput;
+ }
+
+ public Boolean getEnableManualInput() {
+ return enableManualInput;
+ }
}
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/comboBox/comboBoxTest.xhtml
===================================================================
(Binary files differ)
Modified:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ComboBoxTest.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ComboBoxTest.java 2009-02-17
15:17:59 UTC (rev 12683)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ComboBoxTest.java 2009-02-17
17:27:00 UTC (rev 12684)
@@ -55,12 +55,15 @@
private String selectFirstOnUpdate;
+ private String enableManualInput;
+
private void init(Template template) {
renderPage(null, template, "#{comboBean.init}");
String attrForm = getParentId() + "attrForm";
directInputSuggestions = attrForm + ":directInputSuggestions";
filterNewValues = attrForm + ":filterNewValues";
selectFirstOnUpdate = attrForm + ":selectFirstOnUpdate";
+ enableManualInput = attrForm + ":enableManualInput";
String mainForm = getParentId() + "_form";
comboBox = mainForm + ":comboBox";
comboboxField = comboBox + "comboboxField";
@@ -281,6 +284,16 @@
Assert.assertEquals(selenium.getValue(comboboxField), "Select ...");
}
+ /**
+ * Check with enableManualInput = false attribute.
+ */
+ @Test
+ public void testDisableManualInput(Template template) {
+ init(template);
+ clickAjaxCommandAndWait(enableManualInput);
+ Assert.assertEquals(selenium.getAttribute("xpath=id('" + comboboxField +
"')@readonly"), "true");
+ }
+
@Override
public void setValueEmpty() {
selenium.type(getParentId() + "autoTestForm:componentIdcomboboxValue",
"");