Author: d.bulahov
Date: 2007-05-03 11:57:15 -0400 (Thu, 03 May 2007)
New Revision: 638
Modified:
trunk/richfaces/datascroller/src/test/java/org/richfaces/component/DatascrollerComponentTest.java
Log:
test fixed
Modified:
trunk/richfaces/datascroller/src/test/java/org/richfaces/component/DatascrollerComponentTest.java
===================================================================
---
trunk/richfaces/datascroller/src/test/java/org/richfaces/component/DatascrollerComponentTest.java 2007-05-03
15:01:12 UTC (rev 637)
+++
trunk/richfaces/datascroller/src/test/java/org/richfaces/component/DatascrollerComponentTest.java 2007-05-03
15:57:15 UTC (rev 638)
@@ -64,11 +64,17 @@
private UIComponent form;
private UIData data;
private UIOutput first;
+ private UIOutput first_disabled;
private UIOutput fastrewind;
+ private UIOutput fastrewind_disabled;
private UIOutput previous;
+ private UIOutput previous_disabled;
private UIOutput fastforward;
+ private UIOutput fastforward_disabled;
private UIOutput next;
+ private UIOutput next_disabled;
private UIOutput last;
+ private UIOutput last_disabled;
private UICommand command = null;
/**
@@ -106,29 +112,65 @@
first = (UIOutput) application.createComponent(UIOutput.COMPONENT_TYPE);
first.setId("first");
first.setValue("first");
+ first_disabled = (UIOutput) application.createComponent(UIOutput.COMPONENT_TYPE);
+ first_disabled.setId("first_disabled");
+ first_disabled.setValue("first_disabled");
+
fastrewind = (UIOutput) application.createComponent(UIOutput.COMPONENT_TYPE);
fastrewind.setId("fastrewind");
fastrewind.setValue("fastrewind");
+
+ fastrewind_disabled = (UIOutput) application.createComponent(UIOutput.COMPONENT_TYPE);
+ fastrewind_disabled.setId("fastrewind_disabled");
+ fastrewind_disabled.setValue("fastrewind_disabled");
+
previous = (UIOutput) application.createComponent(UIOutput.COMPONENT_TYPE);
previous.setId("previous");
previous.setValue("previous");
+
+ previous_disabled = (UIOutput) application.createComponent(UIOutput.COMPONENT_TYPE);
+ previous_disabled.setId("previous_disabled");
+ previous_disabled.setValue("previous_disabled");
+
fastforward = (UIOutput) application.createComponent(UIOutput.COMPONENT_TYPE);
fastforward.setId("fastforward");
fastforward.setValue("fastforward");
+
+ fastforward_disabled = (UIOutput)
application.createComponent(UIOutput.COMPONENT_TYPE);
+ fastforward_disabled.setId("fastforward_disabled");
+ fastforward_disabled.setValue("fastforward_disabled");
+
next = (UIOutput) application.createComponent(UIOutput.COMPONENT_TYPE);
next.setId("next");
next.setValue("next");
+
+ next_disabled = (UIOutput) application.createComponent(UIOutput.COMPONENT_TYPE);
+ next_disabled.setId("next_disabled");
+ next_disabled.setValue("next_disabled");
+
last = (UIOutput) application.createComponent(UIOutput.COMPONENT_TYPE);
last.setId("last");
last.setValue("last");
- scroller.getFacets().put(first.getId(), first);
+ last_disabled = (UIOutput) application.createComponent(UIOutput.COMPONENT_TYPE);
+ last_disabled.setId("last_disabled");
+ last_disabled.setValue("last_disabled");
+
+ scroller.getFacets().put(first.getId(), first);
scroller.getFacets().put(fastrewind.getId(), fastrewind);
scroller.getFacets().put(previous.getId(), previous);
scroller.getFacets().put(fastforward.getId(), fastforward);
scroller.getFacets().put(next.getId(), next);
scroller.getFacets().put(last.getId(), last);
+ scroller.getFacets().put(first_disabled.getId(), first_disabled);
+ scroller.getFacets().put(fastrewind_disabled.getId(), fastrewind_disabled);
+ scroller.getFacets().put(previous_disabled.getId(), previous_disabled);
+ scroller.getFacets().put(fastforward_disabled.getId(), fastforward_disabled);
+ scroller.getFacets().put(next_disabled.getId(), next_disabled);
+ scroller.getFacets().put(last_disabled.getId(), last_disabled);
+
+
form.getChildren().add(scroller);
command = new HtmlCommandLink();
@@ -167,18 +209,18 @@
assertNotNull(div);
assertEquals("div", div.getNodeName());
- HtmlElement f1 = page.getHtmlElementById(first.getClientId(facesContext));
- assertNotNull(f1);
+ HtmlElement f1_d = page.getHtmlElementById(first_disabled.getClientId(facesContext));
+ assertNotNull(f1_d);
HtmlElement f2 = page.getHtmlElementById(last.getClientId(facesContext));
assertNotNull(f2);
HtmlElement f3 = page.getHtmlElementById(fastforward.getClientId(facesContext));
assertNotNull(f3);
- HtmlElement f4 = page.getHtmlElementById(fastrewind.getClientId(facesContext));
- assertNotNull(f4);
+ HtmlElement f4_d =
page.getHtmlElementById(fastrewind_disabled.getClientId(facesContext));
+ assertNotNull(f4_d);
HtmlElement f5 = page.getHtmlElementById(next.getClientId(facesContext));
assertNotNull(f5);
- HtmlElement f6 = page.getHtmlElementById(previous.getClientId(facesContext));
- assertNotNull(f6);
+ HtmlElement f6_d =
page.getHtmlElementById(previous_disabled.getClientId(facesContext));
+ assertNotNull(f6_d);
String classAttr = div.getAttributeValue("class");
assertTrue(classAttr.contains("dr-dscr"));
Show replies by date