Author: jjamrich
Date: 2011-08-19 14:39:46 -0400 (Fri, 19 Aug 2011)
New Revision: 22663
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPickList/TestPickList.java
Log:
RFPL-1612: pickList: Fix some problems in tests and add issueTracking
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPickList/TestPickList.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPickList/TestPickList.java 2011-08-18
20:31:01 UTC (rev 22662)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPickList/TestPickList.java 2011-08-19
18:39:46 UTC (rev 22663)
@@ -56,8 +56,8 @@
private JQueryLocator pickListTop = pjq("div.rf-pick[id$=pickList]");
private JQueryLocator output = pjq("span[id$=output]");
private JQueryLocator pickListMsgBox = pjq("span.rf-msg >
span[id$=msg:form:pickList] > span.rf-msg-det");
- private JQueryLocator targetCaptionLocator = pjq("div[id$=pickListTarget]
div.rf-pick-target-caption");
- private JQueryLocator sourceCaptionLocator = pjq("div[id$=pickListSource]
div.rf-pick-source-caption");
+ private JQueryLocator targetCaptionLocator = pjq("div[id$=pickListTargetList]
> div.rf-pick-target-caption");
+ private JQueryLocator sourceCaptionLocator = pjq("div[id$=pickListSourceList]
> div.rf-pick-source-caption");
private JQueryLocator pickListCtrl = pjq("div.rf-pick-lst-scrl");
private JQueryLocator pickListOrderingControlsContainer =
pjq("table[id$=pickListTarget] td:eq(1)");
@@ -193,16 +193,19 @@
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-11334")
public void testDisabledClass() {
String disabledClass = "my-cool-disabled-class";
attributes.setDisabledClass(disabledClass);
+ attributes.setDisabled(Boolean.TRUE);
String found = selenium.getAttribute(pickListTop.getAttribute(classAttr));
assertTrue(found != null);
- assertTrue(found.contains(disabledClass));
+ assertTrue(found.contains(disabledClass), "Following class " + found +
" doesn't coitains " + disabledClass);
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-11335")
public void testHeaderClass() {
String headerClass = "my-cool-header-class";
attributes.setHeaderClass(headerClass);
@@ -279,226 +282,271 @@
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-11322")
public void testOnadditem() {
testFireEvent(new Event("additem"), pickListTop);
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-11322")
public void testOnblur() {
testFireEvent(new Event("blur"), pickListTop);
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-11322")
public void testOnchange() {
testFireEvent(new Event("change"), pickListTop);
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-11322")
public void testOnclick() {
testFireEvent(new Event("click"), pickListTop);
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-11322")
public void testOndblclick() {
testFireEvent(new Event("dblclick"), pickListTop);
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-11322")
public void testOnfocus() {
testFireEvent(new Event("focus"), pickListTop);
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-11322")
public void testOnkeydown() {
testFireEvent(new Event("keydown"), pickListTop);
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-11322")
public void testOnkeypress() {
testFireEvent(new Event("keypress"), pickListTop);
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-11322")
public void testOnkeyup() {
testFireEvent(new Event("keyup"), pickListTop);
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-11322")
public void testOnlistclick() {
testFireEvent(new Event("listclick"), pickListTop);
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-11322")
public void testOnlistdblclick() {
testFireEvent(new Event("listdblclick"), pickListTop);
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-11322")
public void testOnlistkeydown() {
testFireEvent(new Event("listkeydown"), pickListTop);
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-11322")
public void testOnlistkeypress() {
testFireEvent(new Event("listkeypress"), pickListTop);
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-11322")
public void testOnlistkeyup() {
testFireEvent(new Event("listkeyup"), pickListTop);
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-11322")
public void testOnlistmousedown() {
testFireEvent(new Event("listmousedown"), pickListTop);
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-11322")
public void testOnlistmousemove() {
testFireEvent(new Event("listmousemove"), pickListTop);
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-11322")
public void testOnlistmouseout() {
testFireEvent(new Event("listmouseout"), pickListTop);
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-11322")
public void testOnlistmouseover() {
testFireEvent(new Event("listmouseover"), pickListTop);
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-11322")
public void testOnlistmouseup() {
testFireEvent(new Event("listmouseup"), pickListTop);
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-11322")
public void testOnmousedown() {
testFireEvent(new Event("mousedown"), pickListTop);
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-11322")
public void testOnmousemove() {
testFireEvent(new Event("mousemove"), pickListTop);
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-11322")
public void testOnmouseout() {
testFireEvent(new Event("mouseout"), pickListTop);
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-11322")
public void testOnmouseover() {
testFireEvent(new Event("mouseover"), pickListTop);
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-11322")
public void testOnmouseup() {
testFireEvent(new Event("mouseup"), pickListTop);
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-11322")
public void testOnremoveitem() {
testFireEvent(new Event("emoveitem"), pickListTop);
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-11322")
public void testOnsourceclick() {
testFireEvent(new Event("sourceclick"), pickListTop);
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-11322")
public void testOnsourcedblclick() {
testFireEvent(new Event("sourcedblclick"), pickListTop);
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-11322")
public void testOnsourcekeydown() {
testFireEvent(new Event("sourcekeydown"), pickListTop);
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-11322")
public void testOnsourcekeypress() {
testFireEvent(new Event("sourcekeypress"), pickListTop);
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-11322")
public void testOnsourcekeyup() {
testFireEvent(new Event("sourcekeyup"), pickListTop);
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-11322")
public void testOnsourcemousedown() {
testFireEvent(new Event("sourcemousedown"), pickListTop);
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-11322")
public void testOnsourcemousemove() {
testFireEvent(new Event("sourcemousemove"), pickListTop);
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-11322")
public void testOnsourcemouseout() {
testFireEvent(new Event("sourcemouseout"), pickListTop);
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-11322")
public void testOnsourcemouseover() {
testFireEvent(new Event("sourcemouseover"), pickListTop);
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-11322")
public void testOnsourcemouseup() {
testFireEvent(new Event("sourcemouseup"), pickListTop);
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-11322")
public void testOntargetclick() {
testFireEvent(new Event("targetclick"), pickListTop);
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-11322")
public void testOntargetdblclick() {
testFireEvent(new Event("targetdblclick"), pickListTop);
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-11322")
public void testOntargetkeydown() {
testFireEvent(new Event("targetkeydown"), pickListTop);
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-11322")
public void testOntargetkeypress() {
testFireEvent(new Event("targetkeypress"), pickListTop);
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-11322")
public void testOntargetkeyup() {
testFireEvent(new Event("targetkeyup"), pickListTop);
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-11322")
public void testOntargetmousedown() {
testFireEvent(new Event("targetmousedown"), pickListTop);
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-11322")
public void testOntargetmousemove() {
testFireEvent(new Event("targetmousemove"), pickListTop);
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-11322")
public void testOntargetmouseout() {
testFireEvent(new Event("targetmouseout"), pickListTop);
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-11322")
public void testOntargetmouseover() {
testFireEvent(new Event("targetmouseover"), pickListTop);
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-11322")
public void testOntargetmouseup() {
testFireEvent(new Event("targetmouseup"), pickListTop);
}
@@ -592,6 +640,7 @@
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-11336")
public void testRequired() {
attributes.setRequired(Boolean.TRUE);
addItem("richfaces");
@@ -607,6 +656,7 @@
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-11336")
public void testRequiredMessage() {
String requiredMessage = "Test validation message";
attributes.setRequiredMessage(requiredMessage);
@@ -657,10 +707,12 @@
String targetCaption = "This is target";
attributes.setTargetCaption(targetCaption);
- waitModel.until(textEquals.locator(targetCaptionLocator).text(targetCaption));
+ waitModel.until(elementPresent.locator(targetCaptionLocator));
+ assertTrue(targetCaption.equals(selenium.getText(targetCaptionLocator)));
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-11337")
public void testValidator() {
addAllItems();
selenium.click(a4jSubmit);
@@ -670,6 +722,7 @@
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-11337")
public void testValidatorMessage() {
String validationMessage = "We are sorry, but @ is not allowed to join
us!";
attributes.setValidatorMessage(validationMessage);