Author: ppitonak(a)redhat.com
Date: 2011-01-28 09:21:31 -0500 (Fri, 28 Jan 2011)
New Revision: 21306
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichAccordionBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTabPanelBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTogglePanelBean.java
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jCommandButton/list.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jCommandLink/list.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richAccordion/list.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richAccordionItem/list.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/dataModel.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/list.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/simple.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richFileUpload/list.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richFileUpload/simple.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richFunctions/all.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richFunctions/list.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceInput/list.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceInput/simple.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceSelect/list.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceSelect/simple.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richInputNumberSlider/list.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richInputNumberSpinner/list.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richMenuGroup/list.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richMenuItem/list.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richMenuSeparator/list.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richMenuSeparator/simple.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richPanel/customLook.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richPanel/list.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richPanel/nested.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richPanelMenu/list.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richPanelMenu/simple.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richPanelMenuGroup/list.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richPanelMenuGroup/simple.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richPanelMenuItem/list.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richPanelMenuItem/simple.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richProgressBar/list.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richProgressBar/static.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richSelect/list.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richSelect/simple.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richTab/list.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richTab/simple.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richTabPanel/list.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richTogglePanel/list.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richTogglePanel/rf9013.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richTogglePanelItem/list.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richTogglePanelItem/simple.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richToolbar/list.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richToolbarGroup/list.xhtml
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richAccordion/TestRichAccordion.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsiblePanel/TestRichCollapsiblePanel.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richSelect/TestRichSelect.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTabPanel/TestRichTabPanel.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTogglePanel/TestRichTogglePanel.java
Log:
* added/fixed tests for panels
* fixed test in rich:select
* refactoring and minor fixes
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichAccordionBean.java
===================================================================
---
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichAccordionBean.java 2011-01-28
14:10:11 UTC (rev 21305)
+++
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichAccordionBean.java 2011-01-28
14:21:31 UTC (rev 21306)
@@ -28,7 +28,6 @@
import javax.faces.bean.ViewScoped;
import org.richfaces.component.UIAccordion;
-
import org.richfaces.tests.metamer.Attributes;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -60,7 +59,15 @@
attributes.setAttribute("activeItem", "item1");
attributes.setAttribute("rendered", true);
+ // will be tested in another way
+ attributes.remove("converter");
attributes.remove("itemChangeListener");
+
+ // TODO remove as soon as it is added to taglib RF-10310
+ attributes.setAttribute("onbeforedomupdate", null);
+ attributes.setAttribute("onbegin", null);
+ attributes.setAttribute("oncomplete", null);
+
}
public Attributes getAttributes() {
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTabPanelBean.java
===================================================================
---
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTabPanelBean.java 2011-01-28
14:10:11 UTC (rev 21305)
+++
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTabPanelBean.java 2011-01-28
14:21:31 UTC (rev 21306)
@@ -58,9 +58,14 @@
attributes.setAttribute("activeItem", "tab1");
attributes.setAttribute("rendered", true);
- // TODO has to be tested in another way
+ // will be tested in another way
attributes.remove("converter");
attributes.remove("itemChangeListener");
+
+ // TODO remove as soon as it is added to taglib RF-10310
+ attributes.setAttribute("onbeforedomupdate", null);
+ attributes.setAttribute("onbegin", null);
+ attributes.setAttribute("oncomplete", null);
}
public Attributes getAttributes() {
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTogglePanelBean.java
===================================================================
---
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTogglePanelBean.java 2011-01-28
14:10:11 UTC (rev 21305)
+++
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTogglePanelBean.java 2011-01-28
14:21:31 UTC (rev 21306)
@@ -59,8 +59,14 @@
attributes.setAttribute("activeItem", "item1");
attributes.setAttribute("rendered", true);
- // TODO has to be tested in another way
+ // will to be tested in another way
+ attributes.remove("converter");
attributes.remove("itemChangeListener");
+
+ // TODO remove as soon as it is added to taglib RF-10310
+ attributes.setAttribute("onbeforedomupdate", null);
+ attributes.setAttribute("onbegin", null);
+ attributes.setAttribute("oncomplete", null);
}
public Attributes getAttributes() {
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jCommandButton/list.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jCommandButton/list.xhtml 2011-01-28
14:10:11 UTC (rev 21305)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jCommandButton/list.xhtml 2011-01-28
14:21:31 UTC (rev 21306)
@@ -5,7 +5,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jCommandLink/list.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jCommandLink/list.xhtml 2011-01-28
14:10:11 UTC (rev 21305)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jCommandLink/list.xhtml 2011-01-28
14:21:31 UTC (rev 21306)
@@ -5,7 +5,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richAccordion/list.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richAccordion/list.xhtml 2011-01-28
14:10:11 UTC (rev 21305)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richAccordion/list.xhtml 2011-01-28
14:21:31 UTC (rev 21306)
@@ -5,7 +5,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richAccordionItem/list.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richAccordionItem/list.xhtml 2011-01-28
14:10:11 UTC (rev 21305)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richAccordionItem/list.xhtml 2011-01-28
14:21:31 UTC (rev 21306)
@@ -5,7 +5,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/dataModel.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/dataModel.xhtml 2011-01-28
14:10:11 UTC (rev 21305)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/dataModel.xhtml 2011-01-28
14:21:31 UTC (rev 21306)
@@ -5,7 +5,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/list.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/list.xhtml 2011-01-28
14:10:11 UTC (rev 21305)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/list.xhtml 2011-01-28
14:21:31 UTC (rev 21306)
@@ -5,7 +5,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/simple.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/simple.xhtml 2011-01-28
14:10:11 UTC (rev 21305)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/simple.xhtml 2011-01-28
14:21:31 UTC (rev 21306)
@@ -6,7 +6,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richFileUpload/list.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richFileUpload/list.xhtml 2011-01-28
14:10:11 UTC (rev 21305)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richFileUpload/list.xhtml 2011-01-28
14:21:31 UTC (rev 21306)
@@ -5,7 +5,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richFileUpload/simple.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richFileUpload/simple.xhtml 2011-01-28
14:10:11 UTC (rev 21305)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richFileUpload/simple.xhtml 2011-01-28
14:21:31 UTC (rev 21306)
@@ -6,7 +6,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richFunctions/all.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richFunctions/all.xhtml 2011-01-28
14:10:11 UTC (rev 21305)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richFunctions/all.xhtml 2011-01-28
14:21:31 UTC (rev 21306)
@@ -5,7 +5,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richFunctions/list.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richFunctions/list.xhtml 2011-01-28
14:10:11 UTC (rev 21305)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richFunctions/list.xhtml 2011-01-28
14:21:31 UTC (rev 21306)
@@ -5,7 +5,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceInput/list.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceInput/list.xhtml 2011-01-28
14:10:11 UTC (rev 21305)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceInput/list.xhtml 2011-01-28
14:21:31 UTC (rev 21306)
@@ -5,7 +5,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceInput/simple.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceInput/simple.xhtml 2011-01-28
14:10:11 UTC (rev 21305)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceInput/simple.xhtml 2011-01-28
14:21:31 UTC (rev 21306)
@@ -6,7 +6,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceSelect/list.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceSelect/list.xhtml 2011-01-28
14:10:11 UTC (rev 21305)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceSelect/list.xhtml 2011-01-28
14:21:31 UTC (rev 21306)
@@ -5,7 +5,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceSelect/simple.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceSelect/simple.xhtml 2011-01-28
14:10:11 UTC (rev 21305)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceSelect/simple.xhtml 2011-01-28
14:21:31 UTC (rev 21306)
@@ -6,7 +6,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richInputNumberSlider/list.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richInputNumberSlider/list.xhtml 2011-01-28
14:10:11 UTC (rev 21305)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richInputNumberSlider/list.xhtml 2011-01-28
14:21:31 UTC (rev 21306)
@@ -5,7 +5,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richInputNumberSpinner/list.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richInputNumberSpinner/list.xhtml 2011-01-28
14:10:11 UTC (rev 21305)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richInputNumberSpinner/list.xhtml 2011-01-28
14:21:31 UTC (rev 21306)
@@ -5,7 +5,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richMenuGroup/list.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richMenuGroup/list.xhtml 2011-01-28
14:10:11 UTC (rev 21305)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richMenuGroup/list.xhtml 2011-01-28
14:21:31 UTC (rev 21306)
@@ -5,7 +5,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richMenuItem/list.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richMenuItem/list.xhtml 2011-01-28
14:10:11 UTC (rev 21305)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richMenuItem/list.xhtml 2011-01-28
14:21:31 UTC (rev 21306)
@@ -5,7 +5,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richMenuSeparator/list.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richMenuSeparator/list.xhtml 2011-01-28
14:10:11 UTC (rev 21305)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richMenuSeparator/list.xhtml 2011-01-28
14:21:31 UTC (rev 21306)
@@ -5,7 +5,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richMenuSeparator/simple.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richMenuSeparator/simple.xhtml 2011-01-28
14:10:11 UTC (rev 21305)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richMenuSeparator/simple.xhtml 2011-01-28
14:21:31 UTC (rev 21306)
@@ -6,7 +6,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richPanel/customLook.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richPanel/customLook.xhtml 2011-01-28
14:10:11 UTC (rev 21305)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richPanel/customLook.xhtml 2011-01-28
14:21:31 UTC (rev 21306)
@@ -5,7 +5,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richPanel/list.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richPanel/list.xhtml 2011-01-28
14:10:11 UTC (rev 21305)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richPanel/list.xhtml 2011-01-28
14:21:31 UTC (rev 21306)
@@ -5,7 +5,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richPanel/nested.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richPanel/nested.xhtml 2011-01-28
14:10:11 UTC (rev 21305)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richPanel/nested.xhtml 2011-01-28
14:21:31 UTC (rev 21306)
@@ -5,7 +5,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richPanelMenu/list.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richPanelMenu/list.xhtml 2011-01-28
14:10:11 UTC (rev 21305)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richPanelMenu/list.xhtml 2011-01-28
14:21:31 UTC (rev 21306)
@@ -5,7 +5,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richPanelMenu/simple.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richPanelMenu/simple.xhtml 2011-01-28
14:10:11 UTC (rev 21305)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richPanelMenu/simple.xhtml 2011-01-28
14:21:31 UTC (rev 21306)
@@ -6,7 +6,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richPanelMenuGroup/list.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richPanelMenuGroup/list.xhtml 2011-01-28
14:10:11 UTC (rev 21305)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richPanelMenuGroup/list.xhtml 2011-01-28
14:21:31 UTC (rev 21306)
@@ -5,7 +5,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richPanelMenuGroup/simple.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richPanelMenuGroup/simple.xhtml 2011-01-28
14:10:11 UTC (rev 21305)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richPanelMenuGroup/simple.xhtml 2011-01-28
14:21:31 UTC (rev 21306)
@@ -6,7 +6,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richPanelMenuItem/list.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richPanelMenuItem/list.xhtml 2011-01-28
14:10:11 UTC (rev 21305)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richPanelMenuItem/list.xhtml 2011-01-28
14:21:31 UTC (rev 21306)
@@ -5,7 +5,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richPanelMenuItem/simple.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richPanelMenuItem/simple.xhtml 2011-01-28
14:10:11 UTC (rev 21305)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richPanelMenuItem/simple.xhtml 2011-01-28
14:21:31 UTC (rev 21306)
@@ -6,7 +6,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richProgressBar/list.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richProgressBar/list.xhtml 2011-01-28
14:10:11 UTC (rev 21305)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richProgressBar/list.xhtml 2011-01-28
14:21:31 UTC (rev 21306)
@@ -5,7 +5,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richProgressBar/static.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richProgressBar/static.xhtml 2011-01-28
14:10:11 UTC (rev 21305)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richProgressBar/static.xhtml 2011-01-28
14:21:31 UTC (rev 21306)
@@ -6,7 +6,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richSelect/list.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richSelect/list.xhtml 2011-01-28
14:10:11 UTC (rev 21305)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richSelect/list.xhtml 2011-01-28
14:21:31 UTC (rev 21306)
@@ -5,7 +5,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richSelect/simple.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richSelect/simple.xhtml 2011-01-28
14:10:11 UTC (rev 21305)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richSelect/simple.xhtml 2011-01-28
14:21:31 UTC (rev 21306)
@@ -6,7 +6,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richTab/list.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richTab/list.xhtml 2011-01-28
14:10:11 UTC (rev 21305)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richTab/list.xhtml 2011-01-28
14:21:31 UTC (rev 21306)
@@ -5,7 +5,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richTab/simple.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richTab/simple.xhtml 2011-01-28
14:10:11 UTC (rev 21305)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richTab/simple.xhtml 2011-01-28
14:21:31 UTC (rev 21306)
@@ -6,7 +6,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richTabPanel/list.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richTabPanel/list.xhtml 2011-01-28
14:10:11 UTC (rev 21305)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richTabPanel/list.xhtml 2011-01-28
14:21:31 UTC (rev 21306)
@@ -5,7 +5,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richTogglePanel/list.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richTogglePanel/list.xhtml 2011-01-28
14:10:11 UTC (rev 21305)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richTogglePanel/list.xhtml 2011-01-28
14:21:31 UTC (rev 21306)
@@ -6,7 +6,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richTogglePanel/rf9013.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richTogglePanel/rf9013.xhtml 2011-01-28
14:10:11 UTC (rev 21305)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richTogglePanel/rf9013.xhtml 2011-01-28
14:21:31 UTC (rev 21306)
@@ -1,12 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
-
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:metamer="http://java.sun.com/jsf/composite/metamer"
-
xmlns:rich="http://richfaces.org/rich">
+
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:rich="http://richfaces.org/rich">
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richTogglePanelItem/list.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richTogglePanelItem/list.xhtml 2011-01-28
14:10:11 UTC (rev 21305)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richTogglePanelItem/list.xhtml 2011-01-28
14:21:31 UTC (rev 21306)
@@ -5,7 +5,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richTogglePanelItem/simple.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richTogglePanelItem/simple.xhtml 2011-01-28
14:10:11 UTC (rev 21305)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richTogglePanelItem/simple.xhtml 2011-01-28
14:21:31 UTC (rev 21306)
@@ -6,7 +6,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richToolbar/list.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richToolbar/list.xhtml 2011-01-28
14:10:11 UTC (rev 21305)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richToolbar/list.xhtml 2011-01-28
14:21:31 UTC (rev 21306)
@@ -5,7 +5,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richToolbarGroup/list.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richToolbarGroup/list.xhtml 2011-01-28
14:10:11 UTC (rev 21305)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richToolbarGroup/list.xhtml 2011-01-28
14:21:31 UTC (rev 21306)
@@ -5,7 +5,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richAccordion/TestRichAccordion.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richAccordion/TestRichAccordion.java 2011-01-28
14:10:11 UTC (rev 21305)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richAccordion/TestRichAccordion.java 2011-01-28
14:21:31 UTC (rev 21306)
@@ -25,6 +25,7 @@
import static
org.jboss.test.selenium.guard.request.RequestTypeGuardFactory.guardNoRequest;
import static org.jboss.test.selenium.guard.request.RequestTypeGuardFactory.guardXhr;
import static org.jboss.test.selenium.locator.LocatorFactory.jq;
+import static org.jboss.test.selenium.locator.option.OptionLocatorFactory.optionLabel;
import static org.jboss.test.selenium.utils.URLUtils.buildUrl;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertFalse;
@@ -42,6 +43,7 @@
import org.jboss.test.selenium.locator.Attribute;
import org.jboss.test.selenium.locator.AttributeLocator;
import org.jboss.test.selenium.locator.JQueryLocator;
+import org.jboss.test.selenium.waiting.EventFiredCondition;
import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
import org.richfaces.tests.metamer.ftest.annotations.IssueTracking;
import org.testng.annotations.Test;
@@ -68,6 +70,8 @@
private JQueryLocator[] disabledHeaders = {pjq("div[id$=item1:header]
div.rf-ac-itm-lbl-dis"),
pjq("div[id$=item2:header] div.rf-ac-itm-lbl-dis"),
pjq("div[id$=item3:header] div.rf-ac-itm-lbl-dis"),
pjq("div[id$=item4:header] div.rf-ac-itm-lbl-dis"),
pjq("div[id$=item5:header] div.rf-ac-itm-lbl-dis")};
+ private JQueryLocator leftIcon = pjq("div[id$=item{0}] td.rf-ac-itm-ico");
+ private JQueryLocator rightIcon = pjq("div[id$=item{0}]
td.rf-ac-itm-exp-ico");
@Override
public URL getTestUrl() {
@@ -94,48 +98,6 @@
}
@Test
- public void testSwitchTypeNull() {
- for (int i = 2; i >= 0; i--) {
- final int index = i;
- guardXhr(selenium).click(itemHeaders[index]);
- waitGui.failWith("Item " + index + " is not
displayed.").until(isDisplayed.locator(itemContents[index]));
- }
- }
-
- @Test
- public void testSwitchTypeAjax() {
-
selenium.click(pjq("input[type=radio][name$=switchTypeInput][value=ajax]"));
- selenium.waitForPageToLoad();
-
- testSwitchTypeNull();
- }
-
- @Test
- public void testSwitchTypeClient() {
-
selenium.click(pjq("input[type=radio][name$=switchTypeInput][value=client]"));
- selenium.waitForPageToLoad();
-
- for (int i = 2; i >= 0; i--) {
- final int index = i;
- guardNoRequest(selenium).click(itemHeaders[index]);
- waitGui.failWith("Item " + index + " is not
displayed.").until(isDisplayed.locator(itemContents[index]));
- }
- }
-
- @Test
- @IssueTracking("https://issues.jboss.org/browse/RF-10040")
- public void testSwitchTypeServer() {
-
selenium.click(pjq("input[type=radio][name$=switchTypeInput][value=server]"));
- selenium.waitForPageToLoad();
-
- for (int i = 2; i >= 0; i--) {
- final int index = i;
- guardHttp(selenium).click(itemHeaders[index]);
- waitGui.failWith("Item " + index + " is not
displayed.").until(isDisplayed.locator(itemContents[index]));
- }
- }
-
- @Test
public void testActiveItem() {
selenium.type(pjq("input[type=text][id$=activeItemInput]"),
"item5");
selenium.waitForPageToLoad();
@@ -179,7 +141,7 @@
selenium.click(itemHeaders[2]);
waitGui.failWith("Item 3 is not
displayed.").until(isDisplayed.locator(itemContents[2]));
- assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES,
PhaseId.PROCESS_VALIDATIONS,
+ phaseInfo.assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES,
PhaseId.PROCESS_VALIDATIONS,
PhaseId.RENDER_RESPONSE);
}
@@ -283,8 +245,7 @@
selenium.click(itemHeaders[2]);
waitGui.failWith("Item 3 is not
displayed.").until(isDisplayed.locator(itemContents[2]));
- String listenerOutput = selenium.getText(jq("div#phasesPanel
li:eq(5)"));
- assertEquals(listenerOutput, "* item changed: item1 -> item3",
"Item change listener's output");
+ phaseInfo.assertListener(PhaseId.INVOKE_APPLICATION, "item changed: item1
-> item3");
}
@Test
@@ -313,25 +274,72 @@
}
@Test
- public void testItemchangeEvents() {
- selenium.type(pjq("input[type=text][id$=onbeforeitemchangeInput]"),
"metamerEvents += \"beforeitemchange \"");
- selenium.waitForPageToLoad();
- selenium.type(pjq("input[type=text][id$=onitemchangeInput]"),
"metamerEvents += \"itemchange \"");
- selenium.waitForPageToLoad();
+ @IssueTracking("https://issues.jboss.org/browse/RF-10352")
+ public void testItemLeftIconActive() {
+ JQueryLocator icon =
leftIcon.format(1).getDescendant(jq("div.rf-ac-itm-ico-act"));
+ JQueryLocator input = pjq("select[id$=itemLeftIconActiveInput]");
+ JQueryLocator image = leftIcon.format(1).getChild(jq("img"));
- selenium.getEval(new JavaScript("window.metamerEvents =
\"\";"));
- String time1Value = selenium.getText(time);
+ // icon=null
+ for (int i = 1; i < 6; i++) {
+ assertFalse(selenium.isElementPresent(leftIcon.format(i)), "Left icon of
item" + i + " should not be present on the page.");
+ }
- guardXhr(selenium).click(itemHeaders[2]);
- waitGui.failWith("Page was not updated").waitForChange(time1Value,
retrieveText.locator(time));
+ verifyStandardIcons(input, icon, image, "");
+ }
- String[] events = selenium.getEval(new
JavaScript("window.metamerEvents")).split(" ");
+ @Test
+ public void testItemLeftIconDisabled() {
+ JQueryLocator icon =
leftIcon.format(4).getDescendant(jq("div.rf-ac-itm-ico-inact"));
+ JQueryLocator input = pjq("select[id$=itemLeftIconDisabledInput]");
+ JQueryLocator image = leftIcon.format(4).getChild(jq("img"));
- assertEquals(events[0], "beforeitemchange", "Attribute
onbeforeitemchange doesn't work");
- assertEquals(events[1], "itemchange", "Attribute
onbeforeitemchange doesn't work");
+ verifyStandardIcons(input, icon, image, "-dis");
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-10352")
+ public void testItemLeftIconInactive() {
+ JQueryLocator icon =
leftIcon.format(3).getDescendant(jq("div.rf-ac-itm-ico-inact"));
+ JQueryLocator input = pjq("select[id$=itemLeftIconInactiveInput]");
+ JQueryLocator image = leftIcon.format(3).getChild(jq("img"));
+
+ verifyStandardIcons(input, icon, image, "");
+ }
+
+ @Test
+ public void testItemRightIconActive() {
+ JQueryLocator icon =
rightIcon.format(1).getDescendant(jq("div.rf-ac-itm-ico-act"));
+ JQueryLocator input = pjq("select[id$=itemRightIconActiveInput]");
+ JQueryLocator image = rightIcon.format(1).getChild(jq("img"));
+
+ // icon=null
+ for (int i = 1; i < 6; i++) {
+ assertFalse(selenium.isElementPresent(rightIcon.format(i)), "Right icon
of item" + i + " should not be present on the page.");
+ }
+
+ verifyStandardIcons(input, icon, image, "-hdr");
+ }
+
+ @Test
+ public void testItemRightIconDisabled() {
+ JQueryLocator icon =
rightIcon.format(4).getDescendant(jq("div.rf-ac-itm-ico-inact"));
+ JQueryLocator input = pjq("select[id$=itemRightIconDisabledInput]");
+ JQueryLocator image = rightIcon.format(4).getChild(jq("img"));
+
+ verifyStandardIcons(input, icon, image, "-hdr-dis");
+ }
+
+ @Test
+ public void testItemRightIconInactive() {
+ JQueryLocator icon =
rightIcon.format(3).getDescendant(jq("div.rf-ac-itm-ico-inact"));
+ JQueryLocator input = pjq("select[id$=itemRightIconInactiveInput]");
+ JQueryLocator image = rightIcon.format(3).getChild(jq("img"));
+
+ verifyStandardIcons(input, icon, image, "-hdr");
+ }
+
+ @Test
public void testLang() {
testLang(accordion);
}
@@ -352,6 +360,58 @@
}
@Test
+ public void testAjaxEvents() {
+ selenium.type(pjq("input[type=text][id$=onbeginInput]"),
"metamerEvents += \"begin \"");
+ selenium.waitForPageToLoad();
+ selenium.type(pjq("input[type=text][id$=onbeforedomupdateInput]"),
"metamerEvents += \"beforedomupdate \"");
+ selenium.waitForPageToLoad();
+ selenium.type(pjq("input[type=text][id$=oncompleteInput]"),
"metamerEvents += \"complete \"");
+ selenium.waitForPageToLoad();
+
+ selenium.getEval(new JavaScript("window.metamerEvents =
\"\";"));
+
+ guardXhr(selenium).click(itemHeaders[1]);
+ waitGui.failWith("Item 2 is not
displayed.").until(isDisplayed.locator(itemContents[1]));
+
+ String[] events = selenium.getEval(new
JavaScript("window.metamerEvents")).split(" ");
+
+ assertEquals(events.length, 3, "3 events should be fired.");
+ assertEquals(events[0], "begin", "Attribute onbegin doesn't
work");
+ assertEquals(events[1], "beforedomupdate", "Attribute
onbeforedomupdate doesn't work");
+ assertEquals(events[2], "complete", "Attribute oncomplete
doesn't work");
+ }
+
+ @Test
+ public void testItemchangeEvents() {
+ selenium.type(pjq("input[type=text][id$=onbeforeitemchangeInput]"),
"metamerEvents += \"beforeitemchange \"");
+ selenium.waitForPageToLoad();
+ selenium.type(pjq("input[type=text][id$=onitemchangeInput]"),
"metamerEvents += \"itemchange \"");
+ selenium.waitForPageToLoad();
+
+ selenium.getEval(new JavaScript("window.metamerEvents =
\"\";"));
+ String time1Value = selenium.getText(time);
+
+ guardXhr(selenium).click(itemHeaders[2]);
+ waitGui.failWith("Page was not updated").waitForChange(time1Value,
retrieveText.locator(time));
+
+ String[] events = selenium.getEval(new
JavaScript("window.metamerEvents")).split(" ");
+
+ assertEquals(events[0], "beforeitemchange", "Attribute
onbeforeitemchange doesn't work");
+ assertEquals(events[1], "itemchange", "Attribute
onbeforeitemchange doesn't work");
+ }
+
+ @Test
+ public void testOnbeforeitemchange() {
+ selenium.type(pjq("input[id$=onbeforeitemchangeInput]"),
"metamerEvents += \"onbeforeitemchange \"");
+ selenium.waitForPageToLoad(TIMEOUT);
+
+ guardXhr(selenium).click(itemHeaders[1]);
+ waitGui.failWith("Item 2 is not
displayed.").until(isDisplayed.locator(itemContents[1]));
+
+ waitGui.failWith("onbeforeitemchange attribute does not work
correctly").until(new EventFiredCondition(new Event("beforeitemchange")));
+ }
+
+ @Test
public void testOnclick() {
testFireEvent(Event.CLICK, accordion);
}
@@ -362,6 +422,17 @@
}
@Test
+ public void testOnitemchange() {
+ selenium.type(pjq("input[id$=onitemchangeInput]"), "metamerEvents
+= \"onitemchange \"");
+ selenium.waitForPageToLoad(TIMEOUT);
+
+ guardXhr(selenium).click(itemHeaders[1]);
+ waitGui.failWith("Item 2 is not
displayed.").until(isDisplayed.locator(itemContents[1]));
+
+ waitGui.failWith("onitemchange attribute does not work
correctly").until(new EventFiredCondition(new Event("itemchange")));
+ }
+
+ @Test
public void testOnmousedown() {
testFireEvent(Event.MOUSEDOWN, accordion);
}
@@ -387,6 +458,16 @@
}
@Test
+ public void testRender() {
+ selenium.type(pjq("input[type=text][id$=renderInput]"),
"renderChecker");
+ selenium.waitForPageToLoad();
+
+ String renderCheckerTime = selenium.getText(renderChecker);
+ guardXhr(selenium).click(itemHeaders[1]);
+ waitGui.failWith("Attribute render doesn't
work").waitForChange(renderCheckerTime, retrieveText.locator(renderChecker));
+ }
+
+ @Test
public void testRendered() {
selenium.click(pjq("input[type=radio][name$=renderedInput][value=false]"));
selenium.waitForPageToLoad();
@@ -395,6 +476,16 @@
}
@Test
+ public void testStatus() {
+ selenium.type(pjq("input[type=text][id$=statusInput]"),
"statusChecker");
+ selenium.waitForPageToLoad();
+
+ String statusCheckerTime = selenium.getText(statusChecker);
+ guardXhr(selenium).click(itemHeaders[1]);
+ waitGui.failWith("Attribute status doesn't
work").waitForChange(statusCheckerTime, retrieveText.locator(statusChecker));
+ }
+
+ @Test
public void testStyle() {
testStyle(accordion, "style");
}
@@ -405,6 +496,48 @@
}
@Test
+ public void testSwitchTypeNull() {
+ for (int i = 2; i >= 0; i--) {
+ final int index = i;
+ guardXhr(selenium).click(itemHeaders[index]);
+ waitGui.failWith("Item " + index + " is not
displayed.").until(isDisplayed.locator(itemContents[index]));
+ }
+ }
+
+ @Test
+ public void testSwitchTypeAjax() {
+
selenium.click(pjq("input[type=radio][name$=switchTypeInput][value=ajax]"));
+ selenium.waitForPageToLoad();
+
+ testSwitchTypeNull();
+ }
+
+ @Test
+ public void testSwitchTypeClient() {
+
selenium.click(pjq("input[type=radio][name$=switchTypeInput][value=client]"));
+ selenium.waitForPageToLoad();
+
+ for (int i = 2; i >= 0; i--) {
+ final int index = i;
+ guardNoRequest(selenium).click(itemHeaders[index]);
+ waitGui.failWith("Item " + index + " is not
displayed.").until(isDisplayed.locator(itemContents[index]));
+ }
+ }
+
+ @Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-10040")
+ public void testSwitchTypeServer() {
+
selenium.click(pjq("input[type=radio][name$=switchTypeInput][value=server]"));
+ selenium.waitForPageToLoad();
+
+ for (int i = 2; i >= 0; i--) {
+ final int index = i;
+ guardHttp(selenium).click(itemHeaders[index]);
+ waitGui.failWith("Item " + index + " is not
displayed.").until(isDisplayed.locator(itemContents[index]));
+ }
+ }
+
+ @Test
public void testTitle() {
testTitle(accordion);
}
@@ -424,4 +557,62 @@
String value = selenium.getStyle(accordion, CssProperty.WIDTH);
assertEquals(value, "356px", "Attribute width");
}
+
+ private void verifyStandardIcons(JQueryLocator input, JQueryLocator icon,
JQueryLocator image, String classSuffix) {
+ String imageNameSuffix = "";
+ if (classSuffix.contains("dis")) {
+ imageNameSuffix = "Disabled";
+ }
+
+ selenium.select(input, optionLabel("chevronDown"));
+ selenium.waitForPageToLoad();
+ assertTrue(selenium.belongsClass(icon, "rf-ico-chevron-down" +
classSuffix), "Div should have set class rf-ico-chevron-down" + classSuffix +
".");
+ assertTrue(selenium.getStyle(icon,
CssProperty.BACKGROUND_IMAGE).contains("ChevronDown" + imageNameSuffix +
".png"), "Icon should contain a chevron down.");
+
+ selenium.select(input, optionLabel("chevronUp"));
+ selenium.waitForPageToLoad();
+ assertTrue(selenium.belongsClass(icon, "rf-ico-chevron-up" +
classSuffix), "Div should have set class rf-ico-chevron-up" + classSuffix +
".");
+ assertTrue(selenium.getStyle(icon,
CssProperty.BACKGROUND_IMAGE).contains("ChevronUp" + imageNameSuffix +
".png"), "Icon should contain a chevron up.");
+
+ selenium.select(input, optionLabel("disc"));
+ selenium.waitForPageToLoad();
+ assertTrue(selenium.belongsClass(icon, "rf-ico-disc" + classSuffix),
"Div should have set class rf-ico-disc" + classSuffix + ".");
+ assertTrue(selenium.getStyle(icon,
CssProperty.BACKGROUND_IMAGE).contains("Disc" + imageNameSuffix +
".png"), "Icon should contain a disc.");
+
+ selenium.select(input, optionLabel("grid"));
+ selenium.waitForPageToLoad();
+ assertTrue(selenium.belongsClass(icon, "rf-ico-grid" + classSuffix),
"Div should have set class rf-ico-grid" + classSuffix + ".");
+ assertTrue(selenium.getStyle(icon,
CssProperty.BACKGROUND_IMAGE).contains("Grid" + imageNameSuffix +
".png"), "Icon should contain a grid.");
+
+ selenium.select(input, optionLabel("triangle"));
+ selenium.waitForPageToLoad();
+ assertTrue(selenium.belongsClass(icon, "rf-ico-triangle" +
classSuffix), "Div should have set class rf-ico-triangle" + classSuffix +
".");
+ assertTrue(selenium.getStyle(icon,
CssProperty.BACKGROUND_IMAGE).contains("Triangle" + imageNameSuffix +
".png"), "Icon should contain a triangle.");
+
+ selenium.select(input, optionLabel("triangleDown"));
+ selenium.waitForPageToLoad();
+ assertTrue(selenium.belongsClass(icon, "rf-ico-triangle-down" +
classSuffix), "Div should have set class rf-ico-triangle-down" + classSuffix +
".");
+ assertTrue(selenium.getStyle(icon,
CssProperty.BACKGROUND_IMAGE).contains("TriangleDown" + imageNameSuffix +
".png"), "Icon should contain a triangle down.");
+
+ selenium.select(input, optionLabel("triangleUp"));
+ selenium.waitForPageToLoad();
+ assertTrue(selenium.belongsClass(icon, "rf-ico-triangle-up" +
classSuffix), "Div should have set class rf-ico-triangle-up" + classSuffix +
".");
+ assertTrue(selenium.getStyle(icon,
CssProperty.BACKGROUND_IMAGE).contains("TriangleUp" + imageNameSuffix +
".png"), "Icon should contain a triangle up.");
+
+ selenium.select(input, optionLabel("none"));
+ selenium.waitForPageToLoad();
+ assertFalse(selenium.isElementPresent(icon), "Icon should not be present
when icon=none.");
+
+ selenium.select(input, optionLabel("star"));
+ selenium.waitForPageToLoad();
+ assertFalse(selenium.isElementPresent(icon), "Icon's div should not be
present when icon=star.");
+ assertTrue(selenium.isElementPresent(image), "Icon's image should be
rendered.");
+
assertTrue(selenium.getAttribute(image.getAttribute(Attribute.SRC)).contains("star.png"),
"Icon's src attribute should contain star.png.");
+
+ selenium.select(input, optionLabel("nonexisting"));
+ selenium.waitForPageToLoad();
+ assertFalse(selenium.isElementPresent(icon), "Icon's div should not be
present when icon=nonexisting.");
+ assertTrue(selenium.isElementPresent(image), "Icon's image should be
rendered.");
+
assertTrue(selenium.getAttribute(image.getAttribute(Attribute.SRC)).contains("nonexisting"),
"Icon's src attribute should contain nonexisting.");
+ }
}
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsiblePanel/TestRichCollapsiblePanel.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsiblePanel/TestRichCollapsiblePanel.java 2011-01-28
14:10:11 UTC (rev 21305)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsiblePanel/TestRichCollapsiblePanel.java 2011-01-28
14:21:31 UTC (rev 21306)
@@ -525,7 +525,6 @@
selenium.select(input, optionLabel("star"));
selenium.waitForPageToLoad();
assertFalse(selenium.isElementPresent(icon), "Icon's div should not be
present when icon=star.");
- waitFor(5000);
assertTrue(selenium.isElementPresent(image), "Icon's image should be
rendered.");
assertTrue(selenium.getAttribute(image.getAttribute(Attribute.SRC)).contains("star.png"),
"Icon's src attribute should contain star.png.");
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richSelect/TestRichSelect.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richSelect/TestRichSelect.java 2011-01-28
14:10:11 UTC (rev 21305)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richSelect/TestRichSelect.java 2011-01-28
14:21:31 UTC (rev 21306)
@@ -206,8 +206,11 @@
selenium.type(pjq("input[type=text][id$=listHeightInput]"),
"");
selenium.waitForPageToLoad();
- height = selenium.getStyle(jq("span.rf-is-lst-scrl"),
CssProperty.HEIGHT);
- assertEquals(height, "200px", "Height of list did not
change");
+ selenium.mouseDown(button);
+ selenium.mouseUp(button);
+ assertTrue(selenium.isVisible(popup), "Popup should be displayed.");
+
+ assertEquals(selenium.getElementHeight(jq("div.rf-sel-lst-scrl")), 100,
"Height of list did not change");
}
@Test
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTabPanel/TestRichTabPanel.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTabPanel/TestRichTabPanel.java 2011-01-28
14:10:11 UTC (rev 21305)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTabPanel/TestRichTabPanel.java 2011-01-28
14:21:31 UTC (rev 21306)
@@ -53,6 +53,8 @@
public class TestRichTabPanel extends AbstractMetamerTest {
private JQueryLocator panel = pjq("div[id$=tabPanel]");
+ private JQueryLocator[] items = {pjq("div[id$=tab1]"),
pjq("div[id$=tab2]"), pjq("div[id$=tab3]"),
pjq("div[id$=tab4]"),
+ pjq("div[id$=tab5]")};
private JQueryLocator[] itemContents = {pjq("div[id$=tab1] >
div.rf-tb-cnt"), pjq("div[id$=tab2] > div.rf-tb-cnt"),
pjq("div[id$=tab3] > div.rf-tb-cnt"), pjq("div[id$=tab4] >
div.rf-tb-cnt"), pjq("div[id$=tab5] > div.rf-tb-cnt")};
private JQueryLocator[] activeHeaders = {pjq("td[id$=tab1:header:active]"),
pjq("td[id$=tab2:header:active]"),
@@ -95,54 +97,12 @@
assertTrue(displayed, "Content of item1 should be visible.");
for (int i = 1; i < 5; i++) {
- displayed = selenium.isDisplayed(itemContents[i]);
+ displayed = selenium.isDisplayed(items[i]);
assertFalse(displayed, "Tab" + (i + 1) + "'s content
should not be visible.");
}
}
@Test
- public void testSwitchTypeNull() {
- for (int i = 2; i >= 0; i--) {
- final int index = i;
- guardXhr(selenium).click(inactiveHeaders[index]);
- waitGui.failWith("Tab " + (index + 1) + " is not
displayed.").until(isDisplayed.locator(itemContents[index]));
- }
- }
-
- @Test
- public void testSwitchTypeAjax() {
- selenium.click(pjq("input[name$=switchTypeInput][value=ajax]"));
- selenium.waitForPageToLoad();
-
- testSwitchTypeNull();
- }
-
- @Test
- public void testSwitchTypeClient() {
- selenium.click(pjq("input[name$=switchTypeInput][value=client]"));
- selenium.waitForPageToLoad();
-
- for (int i = 2; i >= 0; i--) {
- final int index = i;
- guardNoRequest(selenium).click(inactiveHeaders[index]);
- waitGui.failWith("Tab " + (index + 1) + " is not
displayed.").until(isDisplayed.locator(itemContents[index]));
- }
- }
-
- @Test
- @IssueTracking("https://issues.jboss.org/browse/RF-10040")
- public void testSwitchTypeServer() {
- selenium.click(pjq("input[name$=switchTypeInput][value=server]"));
- selenium.waitForPageToLoad();
-
- for (int i = 2; i >= 0; i--) {
- final int index = i;
- guardHttp(selenium).click(inactiveHeaders[index]);
- waitGui.failWith("Tab " + (index + 1) + " is not
displayed.").until(isDisplayed.locator(itemContents[index]));
- }
- }
-
- @Test
public void testActiveItem() {
selenium.type(pjq("input[type=text][id$=activeItemInput]"),
"tab5");
selenium.waitForPageToLoad();
@@ -159,7 +119,7 @@
assertTrue(displayed, "Content of tab5 should be visible.");
for (int i = 0; i < 4; i++) {
- displayed = selenium.isDisplayed(itemContents[i]);
+ displayed = selenium.isDisplayed(items[i]);
assertFalse(displayed, "Tab" + (i + 1) + "'s content
should not be visible.");
}
@@ -172,7 +132,7 @@
}
for (int i = 0; i < 5; i++) {
- displayed = selenium.isDisplayed(itemContents[i]);
+ displayed = selenium.isDisplayed(items[i]);
assertFalse(displayed, "Tab" + (i + 1) + "'s content
should not be visible.");
}
}
@@ -186,7 +146,7 @@
selenium.click(inactiveHeaders[2]);
waitGui.failWith("Tab 3 is not
displayed.").until(isDisplayed.locator(itemContents[2]));
- assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES,
PhaseId.PROCESS_VALIDATIONS,
+ phaseInfo.assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES,
PhaseId.PROCESS_VALIDATIONS,
PhaseId.RENDER_RESPONSE);
}
@@ -263,7 +223,7 @@
selenium.click(inactiveHeaders[2]);
waitGui.failWith("Tab 3 is not
displayed.").until(isDisplayed.locator(itemContents[2]));
- assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES,
PhaseId.RENDER_RESPONSE);
+ phaseInfo.assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES,
PhaseId.RENDER_RESPONSE);
String listenerOutput = selenium.getText(jq("div#phasesPanel
li:eq(2)"));
assertEquals(listenerOutput, "* item changed: tab1 -> tab3",
"Item change listener's output");
@@ -302,6 +262,28 @@
}
@Test
+ public void testAjaxEvents() {
+ selenium.type(pjq("input[type=text][id$=onbeginInput]"),
"metamerEvents += \"begin \"");
+ selenium.waitForPageToLoad();
+ selenium.type(pjq("input[type=text][id$=onbeforedomupdateInput]"),
"metamerEvents += \"beforedomupdate \"");
+ selenium.waitForPageToLoad();
+ selenium.type(pjq("input[type=text][id$=oncompleteInput]"),
"metamerEvents += \"complete \"");
+ selenium.waitForPageToLoad();
+
+ selenium.getEval(new JavaScript("window.metamerEvents =
\"\";"));
+
+ guardXhr(selenium).click(inactiveHeaders[2]);
+ waitGui.failWith("Item 3 is not
displayed.").until(isDisplayed.locator(itemContents[2]));
+
+ String[] events = selenium.getEval(new
JavaScript("window.metamerEvents")).split(" ");
+
+ assertEquals(events.length, 3, "3 events should be fired.");
+ assertEquals(events[0], "begin", "Attribute onbegin doesn't
work");
+ assertEquals(events[1], "beforedomupdate", "Attribute
onbeforedomupdate doesn't work");
+ assertEquals(events[2], "complete", "Attribute oncomplete
doesn't work");
+ }
+
+ @Test
public void testOnbeforeitemchange() {
selenium.type(pjq("input[id$=onbeforeitemchangeInput]"),
"metamerEvents += \"onbeforeitemchange \"");
selenium.waitForPageToLoad(TIMEOUT);
@@ -380,6 +362,16 @@
}
@Test
+ public void testRender() {
+ selenium.type(pjq("input[type=text][id$=renderInput]"),
"renderChecker");
+ selenium.waitForPageToLoad();
+
+ String renderCheckerTime = selenium.getText(renderChecker);
+ guardXhr(selenium).click(inactiveHeaders[1]);
+ waitGui.failWith("Attribute render doesn't
work").waitForChange(renderCheckerTime, retrieveText.locator(renderChecker));
+ }
+
+ @Test
public void testRendered() {
selenium.click(pjq("input[type=radio][name$=renderedInput][value=false]"));
selenium.waitForPageToLoad();
@@ -388,6 +380,16 @@
}
@Test
+ public void testStatus() {
+ selenium.type(pjq("input[type=text][id$=statusInput]"),
"statusChecker");
+ selenium.waitForPageToLoad();
+
+ String statusCheckerTime = selenium.getText(statusChecker);
+ guardXhr(selenium).click(inactiveHeaders[1]);
+ waitGui.failWith("Attribute status doesn't
work").waitForChange(statusCheckerTime, retrieveText.locator(statusChecker));
+ }
+
+ @Test
public void testStyle() {
testStyle(panel, "style");
}
@@ -398,15 +400,55 @@
}
@Test
+ public void testSwitchTypeNull() {
+ for (int i = 2; i >= 0; i--) {
+ final int index = i;
+ guardXhr(selenium).click(inactiveHeaders[index]);
+ waitGui.failWith("Tab " + (index + 1) + " is not
displayed.").until(isDisplayed.locator(itemContents[index]));
+ }
+ }
+
+ @Test
+ public void testSwitchTypeAjax() {
+ selenium.click(pjq("input[name$=switchTypeInput][value=ajax]"));
+ selenium.waitForPageToLoad();
+
+ testSwitchTypeNull();
+ }
+
+ @Test
+ public void testSwitchTypeClient() {
+ selenium.click(pjq("input[name$=switchTypeInput][value=client]"));
+ selenium.waitForPageToLoad();
+
+ for (int i = 2; i >= 0; i--) {
+ final int index = i;
+ guardNoRequest(selenium).click(inactiveHeaders[index]);
+ waitGui.failWith("Tab " + (index + 1) + " is not
displayed.").until(isDisplayed.locator(itemContents[index]));
+ }
+ }
+
+ @Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-10040")
+ public void testSwitchTypeServer() {
+ selenium.click(pjq("input[name$=switchTypeInput][value=server]"));
+ selenium.waitForPageToLoad();
+
+ for (int i = 2; i >= 0; i--) {
+ final int index = i;
+ guardHttp(selenium).click(inactiveHeaders[index]);
+ waitGui.failWith("Tab " + (index + 1) + " is not
displayed.").until(isDisplayed.locator(itemContents[index]));
+ }
+ }
+
+ @Test
public void testTabContentClass() {
final String value = "metamer-ftest-class";
selenium.type(pjq("input[id$=tabContentClassInput]"), value);
selenium.waitForPageToLoad();
- for (JQueryLocator loc : itemContents) {
- assertTrue(selenium.belongsClass(loc, value), "tabContentClass does not
work");
- }
+ assertTrue(selenium.belongsClass(itemContents[0], value), "tabContentClass
does not work");
}
@Test
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTogglePanel/TestRichTogglePanel.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTogglePanel/TestRichTogglePanel.java 2011-01-28
14:10:11 UTC (rev 21305)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTogglePanel/TestRichTogglePanel.java 2011-01-28
14:21:31 UTC (rev 21306)
@@ -82,75 +82,6 @@
}
@Test
- public void testSwitchTypeNull() {
- guardXhr(selenium).click(tc3);
- waitGui.failWith("Item 3 is not
displayed.").until(isDisplayed.locator(item3));
- assertFalse(selenium.isVisible(item1), "Item 1 should not be
visible.");
- assertFalse(selenium.isVisible(item2), "Item 2 should not be
visible.");
-
- guardXhr(selenium).click(tc2);
- waitGui.failWith("Item 2 is not
displayed.").until(isDisplayed.locator(item2));
- assertFalse(selenium.isVisible(item1), "Item 1 should not be
visible.");
- assertFalse(selenium.isVisible(item3), "Item 3 should not be
visible.");
-
- guardXhr(selenium).click(tc1);
- waitGui.failWith("Item 1 is not
displayed.").until(isDisplayed.locator(item1));
- assertFalse(selenium.isVisible(item2), "Item 2 should not be
visible.");
- assertFalse(selenium.isVisible(item3), "Item 3 should not be
visible.");
- }
-
- @Test
- public void testSwitchTypeAjax() {
- selenium.click(pjq("input[name$=switchTypeInput][value=ajax]"));
- selenium.waitForPageToLoad();
-
- testSwitchTypeNull();
- }
-
- @Test
- public void testSwitchTypeClient() {
- selenium.click(pjq("input[name$=switchTypeInput][value=client]"));
- selenium.waitForPageToLoad();
-
- guardNoRequest(selenium).click(tc3);
- waitGui.failWith("Item 3 is not
displayed.").until(isDisplayed.locator(item3));
- assertFalse(selenium.isVisible(item1), "Item 1 should not be
visible.");
- assertFalse(selenium.isVisible(item2), "Item 2 should not be
visible.");
-
- guardNoRequest(selenium).click(tc2);
- waitGui.failWith("Item 2 is not
displayed.").until(isDisplayed.locator(item2));
- assertFalse(selenium.isVisible(item1), "Item 1 should not be
visible.");
- assertFalse(selenium.isVisible(item3), "Item 3 should not be
visible.");
-
- guardNoRequest(selenium).click(tc1);
- waitGui.failWith("Item 1 is not
displayed.").until(isDisplayed.locator(item1));
- assertFalse(selenium.isVisible(item2), "Item 2 should not be
visible.");
- assertFalse(selenium.isVisible(item3), "Item 3 should not be
visible.");
- }
-
- @Test
- @IssueTracking("https://issues.jboss.org/browse/RF-10040")
- public void testSwitchTypeServer() {
- selenium.click(pjq("input[name$=switchTypeInput][value=server]"));
- selenium.waitForPageToLoad();
-
- guardHttp(selenium).click(tc3);
- assertTrue(selenium.isVisible(item3), "Item 3 should be visible.");
- assertFalse(selenium.isDisplayed(item1), "Item 1 should not be
displayed.");
- assertFalse(selenium.isDisplayed(item2), "Item 2 should not be
displayed.");
-
- guardHttp(selenium).click(tc2);
- assertTrue(selenium.isVisible(item2), "Item 2 should be visible.");
- assertFalse(selenium.isDisplayed(item1), "Item 1 should not be
displayed.");
- assertFalse(selenium.isDisplayed(item3), "Item 3 should not be
displayed.");
-
- guardHttp(selenium).click(tc1);
- assertTrue(selenium.isVisible(item1), "Item 1 should be visible.");
- assertFalse(selenium.isDisplayed(item2), "Item 2 should not be
displayed.");
- assertFalse(selenium.isDisplayed(item3), "Item 3 should not be
displayed.");
- }
-
- @Test
public void testFirstLastPrevNextSwitchNull() {
guardXhr(selenium).click(tcNext);
waitGui.failWith("Next item (2) is not
displayed.").until(isDisplayed.locator(item2));
@@ -261,7 +192,7 @@
selenium.click(tc3);
waitGui.failWith("Item 3 is not
displayed.").until(isDisplayed.locator(item3));
- assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES,
PhaseId.PROCESS_VALIDATIONS,
+ phaseInfo.assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES,
PhaseId.PROCESS_VALIDATIONS,
PhaseId.RENDER_RESPONSE);
String listenerOutput = selenium.getText(jq("div#phasesPanel
li:eq(3)"));
@@ -327,7 +258,7 @@
selenium.click(tc3);
waitGui.failWith("Item 3 is not
displayed.").until(isDisplayed.locator(item3));
- assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES,
PhaseId.RENDER_RESPONSE);
+ phaseInfo.assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES,
PhaseId.RENDER_RESPONSE);
String listenerOutput = selenium.getText(jq("div#phasesPanel
li:eq(2)"));
assertEquals(listenerOutput, "* item changed: item1 -> item3",
"Item change listener's output");
@@ -338,8 +269,7 @@
selenium.click(tc3);
waitGui.failWith("Item 3 is not
displayed.").until(isDisplayed.locator(item3));
- String listenerOutput = selenium.getText(jq("div#phasesPanel
li:eq(5)"));
- assertEquals(listenerOutput, "* item changed: item1 -> item3",
"Item change listener's output");
+ phaseInfo.assertListener(PhaseId.INVOKE_APPLICATION, "item changed: item1
-> item3");
}
@Test
@@ -374,6 +304,29 @@
}
@Test
+ public void testAjaxEvents() {
+ selenium.type(pjq("input[type=text][id$=onbeginInput]"),
"metamerEvents += \"begin \"");
+ selenium.waitForPageToLoad();
+ selenium.type(pjq("input[type=text][id$=onbeforedomupdateInput]"),
"metamerEvents += \"beforedomupdate \"");
+ selenium.waitForPageToLoad();
+ selenium.type(pjq("input[type=text][id$=oncompleteInput]"),
"metamerEvents += \"complete \"");
+ selenium.waitForPageToLoad();
+
+ selenium.getEval(new JavaScript("window.metamerEvents =
\"\";"));
+
+ String reqTime = selenium.getText(time);
+ guardXhr(selenium).click(tc2);
+ waitGui.failWith("Page was not updated").waitForChange(reqTime,
retrieveText.locator(time));
+
+ String[] events = selenium.getEval(new
JavaScript("window.metamerEvents")).split(" ");
+
+ assertEquals(events.length, 3, "3 events should be fired.");
+ assertEquals(events[0], "begin", "Attribute onbegin doesn't
work");
+ assertEquals(events[1], "beforedomupdate", "Attribute
onbeforedomupdate doesn't work");
+ assertEquals(events[2], "complete", "Attribute oncomplete
doesn't work");
+ }
+
+ @Test
public void testItemchangeEvents() {
selenium.type(pjq("input[type=text][id$=onbeforeitemchangeInput]"),
"metamerEvents += \"beforeitemchange \"");
selenium.waitForPageToLoad();
@@ -439,6 +392,16 @@
}
@Test
+ public void testRender() {
+ selenium.type(pjq("input[type=text][id$=renderInput]"),
"renderChecker");
+ selenium.waitForPageToLoad();
+
+ String renderCheckerTime = selenium.getText(renderChecker);
+ guardXhr(selenium).click(tc2);
+ waitGui.failWith("Attribute render doesn't
work").waitForChange(renderCheckerTime, retrieveText.locator(renderChecker));
+ }
+
+ @Test
public void testRendered() {
selenium.click(pjq("input[type=radio][name$=renderedInput][value=false]"));
selenium.waitForPageToLoad();
@@ -447,6 +410,16 @@
}
@Test
+ public void testStatus() {
+ selenium.type(pjq("input[type=text][id$=statusInput]"),
"statusChecker");
+ selenium.waitForPageToLoad();
+
+ String statusCheckerTime = selenium.getText(statusChecker);
+ guardXhr(selenium).click(tc2);
+ waitGui.failWith("Attribute status doesn't
work").waitForChange(statusCheckerTime, retrieveText.locator(statusChecker));
+ }
+
+ @Test
public void testStyle() {
testStyle(panel, "style");
}
@@ -457,6 +430,75 @@
}
@Test
+ public void testSwitchTypeNull() {
+ guardXhr(selenium).click(tc3);
+ waitGui.failWith("Item 3 is not
displayed.").until(isDisplayed.locator(item3));
+ assertFalse(selenium.isVisible(item1), "Item 1 should not be
visible.");
+ assertFalse(selenium.isVisible(item2), "Item 2 should not be
visible.");
+
+ guardXhr(selenium).click(tc2);
+ waitGui.failWith("Item 2 is not
displayed.").until(isDisplayed.locator(item2));
+ assertFalse(selenium.isVisible(item1), "Item 1 should not be
visible.");
+ assertFalse(selenium.isVisible(item3), "Item 3 should not be
visible.");
+
+ guardXhr(selenium).click(tc1);
+ waitGui.failWith("Item 1 is not
displayed.").until(isDisplayed.locator(item1));
+ assertFalse(selenium.isVisible(item2), "Item 2 should not be
visible.");
+ assertFalse(selenium.isVisible(item3), "Item 3 should not be
visible.");
+ }
+
+ @Test
+ public void testSwitchTypeAjax() {
+ selenium.click(pjq("input[name$=switchTypeInput][value=ajax]"));
+ selenium.waitForPageToLoad();
+
+ testSwitchTypeNull();
+ }
+
+ @Test
+ public void testSwitchTypeClient() {
+ selenium.click(pjq("input[name$=switchTypeInput][value=client]"));
+ selenium.waitForPageToLoad();
+
+ guardNoRequest(selenium).click(tc3);
+ waitGui.failWith("Item 3 is not
displayed.").until(isDisplayed.locator(item3));
+ assertFalse(selenium.isVisible(item1), "Item 1 should not be
visible.");
+ assertFalse(selenium.isVisible(item2), "Item 2 should not be
visible.");
+
+ guardNoRequest(selenium).click(tc2);
+ waitGui.failWith("Item 2 is not
displayed.").until(isDisplayed.locator(item2));
+ assertFalse(selenium.isVisible(item1), "Item 1 should not be
visible.");
+ assertFalse(selenium.isVisible(item3), "Item 3 should not be
visible.");
+
+ guardNoRequest(selenium).click(tc1);
+ waitGui.failWith("Item 1 is not
displayed.").until(isDisplayed.locator(item1));
+ assertFalse(selenium.isVisible(item2), "Item 2 should not be
visible.");
+ assertFalse(selenium.isVisible(item3), "Item 3 should not be
visible.");
+ }
+
+ @Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-10040")
+ public void testSwitchTypeServer() {
+ selenium.click(pjq("input[name$=switchTypeInput][value=server]"));
+ selenium.waitForPageToLoad();
+
+ guardHttp(selenium).click(tc3);
+ assertTrue(selenium.isVisible(item3), "Item 3 should be visible.");
+ assertFalse(selenium.isDisplayed(item1), "Item 1 should not be
displayed.");
+ assertFalse(selenium.isDisplayed(item2), "Item 2 should not be
displayed.");
+
+ guardHttp(selenium).click(tc2);
+ assertTrue(selenium.isVisible(item2), "Item 2 should be visible.");
+ assertFalse(selenium.isDisplayed(item1), "Item 1 should not be
displayed.");
+ assertFalse(selenium.isDisplayed(item3), "Item 3 should not be
displayed.");
+
+ guardHttp(selenium).click(tc1);
+ assertTrue(selenium.isVisible(item1), "Item 1 should be visible.");
+ assertFalse(selenium.isDisplayed(item2), "Item 2 should not be
displayed.");
+ assertFalse(selenium.isDisplayed(item3), "Item 3 should not be
displayed.");
+ }
+
+ @Test
public void testTitle() {
testTitle(panel);
}