Author: ppitonak(a)redhat.com
Date: 2011-11-24 08:53:55 -0500 (Thu, 24 Nov 2011)
New Revision: 22998
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDropDownMenu/TestRichDropDownMenu.java
Log:
test for attribute popupWidth of rich:dropDownMenu fixed
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDropDownMenu/TestRichDropDownMenu.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDropDownMenu/TestRichDropDownMenu.java 2011-11-24
13:18:57 UTC (rev 22997)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDropDownMenu/TestRichDropDownMenu.java 2011-11-24
13:53:55 UTC (rev 22998)
@@ -111,7 +111,8 @@
assertTrue(selenium.belongsClass(fileMenu, "rf-ddm-dis"), "Menu
should have class \"rf-ddm-dis\".");
assertTrue(selenium.isElementPresent(icon), "Icon should be present on the
page.");
assertFalse(selenium.isElementPresent(fileMenuLabel), "File menu should have
a disabled label.");
- assertTrue(selenium.isElementPresent(pjq("div[id$=menu1]
div.rf-ddm-lbl-dis")), "File menu should have a disabled label.");
+ assertTrue(selenium.isElementPresent(pjq("div[id$=menu1]
div.rf-ddm-lbl-dis")),
+ "File menu should have a disabled label.");
}
@Test
@@ -183,10 +184,12 @@
selenium.mouseOver(fileMenuLabel);
selenium.getEval(new JavaScript("window.jQuery('" +
group.getRawLocator() + "').mouseenter()"));
- waitGui.interval(2000).withDelay(true).failWith("Menu group was not
opened.").until(isDisplayed.locator(groupList));
+ waitGui.interval(2000).withDelay(true).failWith("Menu group was not
opened.")
+ .until(isDisplayed.locator(groupList));
selenium.getEval(new JavaScript("window.jQuery('" +
group.getRawLocator() + "').mouseleave()"));
- waitGui.failWith("Attribute ongrouphide does not work
correctly").until(new EventFiredCondition(new Event("grouphide")));
+ waitGui.failWith("Attribute ongrouphide does not work
correctly").until(
+ new EventFiredCondition(new Event("grouphide")));
}
@Test
@@ -198,7 +201,8 @@
selenium.getEval(new JavaScript("window.jQuery('" +
group.getRawLocator() + "').mouseenter()"));
waitGui.interval(2000).withDelay(true).failWith("Menu group was not
opened.").until(isDisplayed.locator(group));
- waitGui.failWith("Attribute ongroupshow does not work
correctly").until(new EventFiredCondition(new Event("groupshow")));
+ waitGui.failWith("Attribute ongroupshow does not work
correctly").until(
+ new EventFiredCondition(new Event("groupshow")));
}
@Test
@@ -269,15 +273,16 @@
@Test
public void testPopupWidth() {
- assertEquals(selenium.getStyle(fileMenuList, CssProperty.WIDTH),
"250px", "Default width of menu");
+ final CssProperty minWidth = new CssProperty("min-width");
+ assertEquals(selenium.getStyle(fileMenuList, minWidth), "250px",
"Default width of menu");
selenium.type(pjq("input[id$=popupWidthInput]"), "150");
selenium.waitForPageToLoad();
- assertEquals(selenium.getStyle(fileMenuList, CssProperty.WIDTH),
"150px", "Width of menu");
+ assertEquals(selenium.getStyle(fileMenuList, minWidth), "150px",
"Width of menu");
selenium.type(pjq("input[id$=popupWidthInput]"), "423");
selenium.waitForPageToLoad();
- assertEquals(selenium.getStyle(fileMenuList, CssProperty.WIDTH),
"423px", "Width of menu");
+ assertEquals(selenium.getStyle(fileMenuList, minWidth), "423px",
"Width of menu");
}
@Test
@@ -296,7 +301,8 @@
selenium.mouseOver(fileMenuLabel);
assertFalse(selenium.isDisplayed(fileMenuList), "Menu should not be
expanded.");
- waitGui.interval(3000).withDelay(true).failWith("Menu was not
opened.").until(isDisplayed.locator(fileMenuList));
+ waitGui.interval(3000).withDelay(true).failWith("Menu was not
opened.")
+ .until(isDisplayed.locator(fileMenuList));
}
@Test
Show replies by date