Author: abelevich
Date: 2009-03-26 10:21:11 -0400 (Thu, 26 Mar 2009)
New Revision: 13218
Modified:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/InplacesTest.java
Log:
Modified:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/InplacesTest.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/InplacesTest.java 2009-03-26
14:20:36 UTC (rev 13217)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/InplacesTest.java 2009-03-26
14:21:11 UTC (rev 13218)
@@ -154,7 +154,7 @@
setTestUrl(CONTROLS_FACET_PAGE);
init(template);
- check((isPresentById(CONTROLS_FACET_BN_OK + CONTROLS_FACET_ID_PREFIX) ||
isPresentById(CONTROLS_FACET_BN_CANCEL + CONTROLS_FACET_ID_PREFIX)),
+ check((isPresent(CONTROLS_FACET_BN_OK + CONTROLS_FACET_ID_PREFIX) ||
isPresent(CONTROLS_FACET_BN_CANCEL + CONTROLS_FACET_ID_PREFIX)),
CommonUtils.getSuccessfulTestMessage(inplaceId + CONTROLS_FACET_ID_PREFIX),
CommonUtils.getFailedTestMessage(inplaceId + CONTROLS_FACET_ID_PREFIX));
}
@@ -172,21 +172,24 @@
String iid = inplaceId + SHOW_CONTROLS_ATTRIBUTE1_PAGE_ID_PREFIX;
clickById(iid);
- check(!isVisibleById(iid + SHOW_CONTROLS_ATTRIBUTE_BAR),
- CommonUtils.getSuccessfulTestMessage(iid),
- CommonUtils.getFailedTestMessage(iid));
-
- String clip = getStyleAttributeString(iid + iTempValuePx, "clip");
- check(("rect(auto, auto, auto, auto)".equals(clip)) || ("rect(auto
auto auto auto)".equals(clip)),
- CommonUtils.getSuccessfulTestMessage(iid),
- CommonUtils.getFailedTestMessage(iid));
- //selenium.fireEvent(iid + iTempValuePx, "blur");
- selenium.focus(buttonId + SHOW_CONTROLS_ATTRIBUTE1_PAGE_ID_PREFIX);
-
- clip = getStyleAttributeString(iid + iTempValuePx, "clip");
- check(("rect(0px, 0px, 0px, 0px)".equals(clip)) || ("rect(0px 0px 0px
0px)".equals(clip)),
- CommonUtils.getSuccessfulTestMessage(iid),
- CommonUtils.getFailedTestMessage(iid));
+ Assert.assertEquals(isVisible(iid + SHOW_CONTROLS_ATTRIBUTE_BAR), false,
"showControls='false' but controls are visible");
+// check(!isVisible(iid + SHOW_CONTROLS_ATTRIBUTE_BAR),
+// CommonUtils.getSuccessfulTestMessage(iid),
+// CommonUtils.getFailedTestMessage(iid));
+// delay(1000);
+// String clip = getStyleAttributeString(iid + iTempValuePx, "clip");
+// check(("rect(auto, auto, auto, auto)".equals(clip)) || ("rect(auto
auto auto auto)".equals(clip)),
+// CommonUtils.getSuccessfulTestMessage(iid),
+// CommonUtils.getFailedTestMessage(iid));
+// //selenium.fireEvent(iid + iTempValuePx, "blur");
+// selenium.focus(buttonId + SHOW_CONTROLS_ATTRIBUTE1_PAGE_ID_PREFIX);
+//
+// delay(1000);
+//
+// clip = getStyleAttributeString(iid + iTempValuePx, "clip");
+// check(("rect(0px, 0px, 0px, 0px)".equals(clip)) || ("rect(0px 0px
0px 0px)".equals(clip)),
+// CommonUtils.getSuccessfulTestMessage(iid),
+// CommonUtils.getFailedTestMessage(iid));
}
/**
@@ -202,19 +205,23 @@
String iid = inplaceId + SHOW_CONTROLS_ATTRIBUTE2_PAGE_ID_PREFIX;
clickById(iid);
- check(isVisibleById(iid + SHOW_CONTROLS_ATTRIBUTE_BAR),
- CommonUtils.getSuccessfulTestMessage(iid),
- CommonUtils.getFailedTestMessage(iid));
- String clip = getStyleAttributeString(iid + iTempValuePx, "clip");
- check(("rect(auto, auto, auto, auto)".equals(clip)) || ("rect(auto
auto auto auto)".equals(clip)),
- CommonUtils.getSuccessfulTestMessage(iid),
- CommonUtils.getFailedTestMessage(iid));
- selenium.focus(buttonId + SHOW_CONTROLS_ATTRIBUTE2_PAGE_ID_PREFIX);
- clip = getStyleAttributeString(iid + iTempValuePx, "clip");
- check(("rect(auto, auto, auto, auto)".equals(clip)) || ("rect(auto
auto auto auto)".equals(clip)),
- CommonUtils.getSuccessfulTestMessage(iid),
- CommonUtils.getFailedTestMessage(iid));
+ Assert.assertEquals(isVisible(iid + SHOW_CONTROLS_ATTRIBUTE_BAR), true,
"showControls='true' but controls are not visible");
+
+
+// check(isVisible(iid + SHOW_CONTROLS_ATTRIBUTE_BAR),
+// CommonUtils.getSuccessfulTestMessage(iid),
+// CommonUtils.getFailedTestMessage(iid));
+//
+// String clip = getStyleAttributeString(iid + iTempValuePx, "clip");
+// check(("rect(auto, auto, auto, auto)".equals(clip)) || ("rect(auto
auto auto auto)".equals(clip)),
+// CommonUtils.getSuccessfulTestMessage(iid),
+// CommonUtils.getFailedTestMessage(iid));
+// selenium.focus(buttonId + SHOW_CONTROLS_ATTRIBUTE2_PAGE_ID_PREFIX);
+// clip = getStyleAttributeString(iid + iTempValuePx, "clip");
+// check(("rect(auto, auto, auto, auto)".equals(clip)) || ("rect(auto
auto auto auto)".equals(clip)),
+// CommonUtils.getSuccessfulTestMessage(iid),
+// CommonUtils.getFailedTestMessage(iid));
}
/**
@@ -357,12 +364,12 @@
init(template);
String iid = inplaceId + PROCESSING_INVALID_VALUE_ID_PREFIX;
- String newVlaue = "Aspen";
- setValue(iid, newVlaue);
+ String newValue = "Aspen";
+ setValue(iid, newValue);
clickById(buttonId + PROCESSING_INVALID_VALUE_ID_PREFIX);
waitForAjaxCompletion();
String value = getTextById(iid);
- check(newVlaue.equals(value),
+ check(value.endsWith(newValue),
CommonUtils.getSuccessfulTestMessage(iid),
CommonUtils.getFailedTestMessage(iid));
}