JBoss Rich Faces SVN: r22697 - in modules/tests/metamer/trunk: ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsiblePanel and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2011-09-10 16:57:48 -0400 (Sat, 10 Sep 2011)
New Revision: 22697
Modified:
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichCollapsiblePanelBean.properties
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsiblePanel/TestRichCollapsiblePanel.java
Log:
added transparent icon
Modified: modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichCollapsiblePanelBean.properties
===================================================================
--- modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichCollapsiblePanelBean.properties 2011-09-09 14:58:26 UTC (rev 22696)
+++ modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichCollapsiblePanelBean.properties 2011-09-10 20:57:48 UTC (rev 22697)
@@ -8,6 +8,7 @@
attr.leftCollapsedIcon.chevron=chevron
attr.leftCollapsedIcon.chevronUp=chevronUp
attr.leftCollapsedIcon.chevronDown=chevronDown
+attr.leftCollapsedIcon.transparent=transparent
attr.leftCollapsedIcon.triangle=triangle
attr.leftCollapsedIcon.triangleUp=triangleUp
attr.leftCollapsedIcon.triangleDown=triangleDown
@@ -21,6 +22,7 @@
attr.leftExpandedIcon.chevron=chevron
attr.leftExpandedIcon.chevronUp=chevronUp
attr.leftExpandedIcon.chevronDown=chevronDown
+attr.leftExpandedIcon.transparent=transparent
attr.leftExpandedIcon.triangle=triangle
attr.leftExpandedIcon.triangleUp=triangleUp
attr.leftExpandedIcon.triangleDown=triangleDown
@@ -34,6 +36,7 @@
attr.rightCollapsedIcon.chevron=chevron
attr.rightCollapsedIcon.chevronUp=chevronUp
attr.rightCollapsedIcon.chevronDown=chevronDown
+attr.rightCollapsedIcon.transparent=transparent
attr.rightCollapsedIcon.triangle=triangle
attr.rightCollapsedIcon.triangleUp=triangleUp
attr.rightCollapsedIcon.triangleDown=triangleDown
@@ -47,6 +50,7 @@
attr.rightExpandedIcon.chevron=chevron
attr.rightExpandedIcon.chevronUp=chevronUp
attr.rightExpandedIcon.chevronDown=chevronDown
+attr.rightExpandedIcon.transparent=transparent
attr.rightExpandedIcon.triangle=triangle
attr.rightExpandedIcon.triangleUp=triangleUp
attr.rightExpandedIcon.triangleDown=triangleDown
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-09-09 14:58:26 UTC (rev 22696)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsiblePanel/TestRichCollapsiblePanel.java 2011-09-10 20:57:48 UTC (rev 22697)
@@ -140,9 +140,9 @@
// icon=null
assertTrue(selenium.belongsClass(icon, "rf-ico-chevron-up-hdr"),
- "Div should have set class rf-ico-chevron-up-hdr.");
+ "Div should have set class rf-ico-chevron-up-hdr.");
assertTrue(selenium.getStyle(icon, CssProperty.BACKGROUND_IMAGE).contains("chevronUp.png"),
- "Icon should contain a chevron up.");
+ "Icon should contain a chevron up.");
verifyStandardIcons(input, icon, image);
}
@@ -155,9 +155,9 @@
// icon=null
assertTrue(selenium.belongsClass(icon, "rf-ico-chevron-down-hdr"),
- "Div should have set class rf-ico-chevron-down-hdr.");
+ "Div should have set class rf-ico-chevron-down-hdr.");
assertTrue(selenium.getStyle(icon, CssProperty.BACKGROUND_IMAGE).contains("chevronDown.png"),
- "Icon should contain a chevron down.");
+ "Icon should contain a chevron down.");
verifyStandardIcons(input, icon, image);
}
@@ -372,56 +372,62 @@
private void verifyStandardIcons(JQueryLocator input, JQueryLocator icon, JQueryLocator image) {
selenium.select(input, optionLabel("chevron"));
selenium.waitForPageToLoad();
- assertTrue(selenium.belongsClass(icon, "rf-ico-chevron-hdr"),
- "Div should have set class rf-ico-chevron-hdr.");
+ assertTrue(selenium.belongsClass(icon, "rf-ico-chevron-hdr"), "Div should have set class rf-ico-chevron-hdr.");
assertTrue(selenium.getStyle(icon, CssProperty.BACKGROUND_IMAGE).contains("chevron.png"),
- "Icon should contain a chevron.");
+ "Icon should contain a chevron.");
selenium.select(input, optionLabel("chevronDown"));
selenium.waitForPageToLoad();
assertTrue(selenium.belongsClass(icon, "rf-ico-chevron-down-hdr"),
- "Div should have set class rf-ico-chevron-down-hdr.");
+ "Div should have set class rf-ico-chevron-down-hdr.");
assertTrue(selenium.getStyle(icon, CssProperty.BACKGROUND_IMAGE).contains("chevronDown.png"),
- "Icon should contain a chevron down.");
+ "Icon should contain a chevron down.");
selenium.select(input, optionLabel("chevronUp"));
selenium.waitForPageToLoad();
assertTrue(selenium.belongsClass(icon, "rf-ico-chevron-up-hdr"),
- "Div should have set class rf-ico-chevron-up-hdr.");
+ "Div should have set class rf-ico-chevron-up-hdr.");
assertTrue(selenium.getStyle(icon, CssProperty.BACKGROUND_IMAGE).contains("chevronUp.png"),
- "Icon should contain a chevron up.");
+ "Icon should contain a chevron up.");
+ selenium.select(input, optionLabel("transparent"));
+ selenium.waitForPageToLoad();
+ assertTrue(selenium.belongsClass(icon, "rf-ico-transparent-hdr"),
+ "Div should have set class rf-ico-transparent-hdr.");
+ assertTrue(selenium.getStyle(icon, CssProperty.BACKGROUND_IMAGE).equals("none"),
+ "Icon should not contain any image.");
+
selenium.select(input, optionLabel("disc"));
selenium.waitForPageToLoad();
assertTrue(selenium.belongsClass(icon, "rf-ico-disc-hdr"), "Div should have set class rf-ico-disc-hdr.");
assertTrue(selenium.getStyle(icon, CssProperty.BACKGROUND_IMAGE).contains("disc.png"),
- "Icon should contain a disc.");
+ "Icon should contain a disc.");
selenium.select(input, optionLabel("grid"));
selenium.waitForPageToLoad();
assertTrue(selenium.belongsClass(icon, "rf-ico-grid-hdr"), "Div should have set class rf-ico-grid-hdr.");
assertTrue(selenium.getStyle(icon, CssProperty.BACKGROUND_IMAGE).contains("grid.png"),
- "Icon should contain a grid.");
+ "Icon should contain a grid.");
selenium.select(input, optionLabel("triangle"));
selenium.waitForPageToLoad();
assertTrue(selenium.belongsClass(icon, "rf-ico-triangle-hdr"), "Div should have set class rf-ico-triangle-hdr.");
assertTrue(selenium.getStyle(icon, CssProperty.BACKGROUND_IMAGE).contains("triangle.png"),
- "Icon should contain a triangle.");
+ "Icon should contain a triangle.");
selenium.select(input, optionLabel("triangleDown"));
selenium.waitForPageToLoad();
assertTrue(selenium.belongsClass(icon, "rf-ico-triangle-down-hdr"),
- "Div should have set class rf-ico-triangle-down-hdr.");
+ "Div should have set class rf-ico-triangle-down-hdr.");
assertTrue(selenium.getStyle(icon, CssProperty.BACKGROUND_IMAGE).contains("triangleDown.png"),
- "Icon should contain a triangle down.");
+ "Icon should contain a triangle down.");
selenium.select(input, optionLabel("triangleUp"));
selenium.waitForPageToLoad();
assertTrue(selenium.belongsClass(icon, "rf-ico-triangle-up-hdr"),
- "Div should have set class rf-ico-triangle-up-hdr.");
+ "Div should have set class rf-ico-triangle-up-hdr.");
assertTrue(selenium.getStyle(icon, CssProperty.BACKGROUND_IMAGE).contains("triangleUp.png"),
- "Icon should contain a triangle up.");
+ "Icon should contain a triangle up.");
selenium.select(input, optionLabel("none"));
selenium.waitForPageToLoad();
@@ -432,13 +438,13 @@
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.");
+ "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.");
+ "Icon's src attribute should contain nonexisting.");
}
}