Author: nbelaevski
Date: 2009-09-20 12:44:07 -0400 (Sun, 20 Sep 2009)
New Revision: 15636
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/testng/hudson/testng-def-def-none-parser.xml
Log:
Modified resizeWindowToScrenSize() method
Switched from all tests to a single TooltipTest
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-20
12:34:49 UTC (rev 15635)
+++
branches/community/3.3.X/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/SeleniumTestBase.java 2009-09-20
16:44:07 UTC (rev 15636)
@@ -32,6 +32,8 @@
import org.ajax4jsf.bean.Configurator;
import org.ajax4jsf.javascript.ScriptUtils;
import org.ajax4jsf.template.Template;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.openqa.selenium.server.RemoteControlConfiguration;
import org.openqa.selenium.server.SeleniumServer;
import org.testng.Assert;
@@ -54,6 +56,8 @@
*/
public abstract class SeleniumTestBase implements RichSeleniumTest {
+ private static final Log LOG = LogFactory.getLog(SeleniumTestBase.class);
+
/** Specifies the time to wait for page rendering */
private static final Integer pageRenderTime = 10000;
@@ -1548,8 +1552,23 @@
}
public void resizeWindowToScrenSize() {
+ Integer screenWidth = Integer.parseInt(selenium.getEval("screen.width"));
+ Integer screenHeight =
Integer.parseInt(selenium.getEval("screen.height"));
+
+ LOG.info(String.format("Screen size is %1$s x %2$s",
+ screenWidth, screenHeight));
+
selenium.getEval("(window.top || window).moveTo(0, 0);");
- selenium.getEval("(window.top || window).resizeTo(screen.width,
screen.height);");
+
+ if (screenWidth < 1280) {
+ screenWidth = 1280;
+ }
+
+ if (screenHeight < 1024) {
+ screenHeight = 1024;
+ }
+
+ selenium.getEval(String.format("(window.top || window).resizeTo(%1$s,
%2$s);",
+ screenWidth, screenHeight));
}
-
}
Modified:
branches/community/3.3.X/test-applications/seleniumTest/richfaces/src/test/testng/hudson/testng-def-def-none-parser.xml
===================================================================
---
branches/community/3.3.X/test-applications/seleniumTest/richfaces/src/test/testng/hudson/testng-def-def-none-parser.xml 2009-09-20
12:34:49 UTC (rev 15635)
+++
branches/community/3.3.X/test-applications/seleniumTest/richfaces/src/test/testng/hudson/testng-def-def-none-parser.xml 2009-09-20
16:44:07 UTC (rev 15636)
@@ -12,8 +12,12 @@
</run>
</groups>
- <packages>
+ <classes>
+ <class name="org.richfaces.testng.TooltipTest" />
+ </classes>
+
+ <!-- packages>
<package name="org.richfaces.testng" />
- </packages>
+ </packages -->
</test>
</suite>
Show replies by date