Author: nbelaevski
Date: 2009-09-20 08:34:49 -0400 (Sun, 20 Sep 2009)
New Revision: 15635
Modified:
branches/community/3.3.X/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/SeleniumTestBase.java
branches/community/3.3.X/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java
branches/community/3.3.X/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/TooltipTest.java
Log:
Added window resizing for Calendar and Tooltip tests
Modified:
branches/community/3.3.X/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/SeleniumTestBase.java
===================================================================
---
branches/community/3.3.X/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/SeleniumTestBase.java 2009-09-19
15:30:22 UTC (rev 15634)
+++
branches/community/3.3.X/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/SeleniumTestBase.java 2009-09-20
12:34:49 UTC (rev 15635)
@@ -1547,5 +1547,9 @@
}
+ public void resizeWindowToScrenSize() {
+ selenium.getEval("(window.top || window).moveTo(0, 0);");
+ selenium.getEval("(window.top || window).resizeTo(screen.width,
screen.height);");
+ }
}
Modified:
branches/community/3.3.X/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java
===================================================================
---
branches/community/3.3.X/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java 2009-09-19
15:30:22 UTC (rev 15634)
+++
branches/community/3.3.X/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java 2009-09-20
12:34:49 UTC (rev 15635)
@@ -1780,6 +1780,9 @@
@Test
public void testJointPointAndDirectionAttributes(Template template) {
renderPage(JOINTPOINT_DIRECTION_TEST_URL, template, null);
+
+ resizeWindowToScrenSize();
+
initIds(getParentId());
String topLeftPointLeft = "$('" + inputDateId +
"').cumulativeOffset().left";
Modified:
branches/community/3.3.X/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/TooltipTest.java
===================================================================
---
branches/community/3.3.X/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/TooltipTest.java 2009-09-19
15:30:22 UTC (rev 15634)
+++
branches/community/3.3.X/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/TooltipTest.java 2009-09-20
12:34:49 UTC (rev 15635)
@@ -96,6 +96,9 @@
public void testCoreAjaxMode(Template template) {
AutoTester autoTester = getAutoTester(this);
autoTester.renderPage(template, RESET_METHOD);
+
+ resizeWindowToScrenSize();
+
writeStatus("Component retrieves data from server; 'defaultContent'
facet is handled; listeners fire");
String componentId = autoTester.getClientId(AutoTester.COMPONENT_ID);
String contentId = autoTester.getClientId(AutoTester.COMPONENT_ID +
"content");
@@ -123,6 +126,9 @@
public void testCoreClientMode(Template template) {
AutoTester autoTester = getAutoTester(this);
autoTester.renderPage(template, INIT_CLIENT_TEST);
+
+ resizeWindowToScrenSize();
+
writeStatus("Check component is activated by defined event(onclick); its
positioning and dimensions are ok");
String componentId = autoTester.getClientId(AutoTester.COMPONENT_ID);
@@ -221,7 +227,7 @@
@Test
public void testStylesAndClassesAndHtmlAttributes(Template template) {
- AutoTester autoTester = getAutoTester(this);
+ AutoTester autoTester = getAutoTester(this);
autoTester.renderPage(template, RESET_METHOD);
writeStatus("Check style and classes, standard HTML attributes are output to
client");