Author: andrei_exadel
Date: 2008-09-30 09:36:30 -0400 (Tue, 30 Sep 2008)
New Revision: 10623
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/modalPanel/modalPanelTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ModalPanelTest.java
Log:
Modal Panel: Test minWidth and minHeight attributes
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/modalPanel/modalPanelTest.xhtml
===================================================================
(Binary files differ)
Modified:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ModalPanelTest.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ModalPanelTest.java 2008-09-30
13:15:08 UTC (rev 10622)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ModalPanelTest.java 2008-09-30
13:36:30 UTC (rev 10623)
@@ -149,7 +149,37 @@
Assert.assertTrue(((Integer)getTopById(cIdvId)).equals(top), "Modal Panel drag
failured");
}
+
+ @Test
+ public void testMinWidthAndMinHeight(Template template) {
+ renderPage(template);
+
+ clickShow();
+
+ String resizerId = getParentId() + FORM_ID + PANEL_ID + "ResizerSEL";
+ String contentId = getParentId() + FORM_ID + PANEL_CONTENT_DIV_ID;
+
+ selenium.dragAndDrop(resizerId, "-100,-100");
+
+ String width = getWidth(contentId);
+ String height = getHeight(contentId);
+
+ Assert.assertTrue(width.equals("70px"), "Modal Panel width
["+width+"] does not equal to min width");
+ Assert.assertTrue(height.equals("70px"), "Modal Panel height
["+height+"] does not equal to min height");
+
+ }
+
+ private String getWidth(String id) {
+ String w = runScript("$('"+id+"').style.width", false);
+ return w;
+ }
+
+ private String getHeight(String id) {
+ String h = runScript("$('"+id+"').style.height",
false);
+ return h;
+ }
+
private void clickReset() {
String buttonId = getParentId() + FORM_ID + RESET_ID;
writeStatus("Click reset button");
Show replies by date