Author: mageshbk(a)jboss.com
Date: 2009-05-13 03:16:46 -0400 (Wed, 13 May 2009)
New Revision: 13346
Modified:
branches/Enterprise_Portal_Platform_4_3_GA_CP01_JBEPP-78/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSArchiveUploadTestCase.java
Log:
[JBEPP-79] Made it multi-platform
Modified:
branches/Enterprise_Portal_Platform_4_3_GA_CP01_JBEPP-78/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSArchiveUploadTestCase.java
===================================================================
---
branches/Enterprise_Portal_Platform_4_3_GA_CP01_JBEPP-78/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSArchiveUploadTestCase.java 2009-05-13
06:08:26 UTC (rev 13345)
+++
branches/Enterprise_Portal_Platform_4_3_GA_CP01_JBEPP-78/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSArchiveUploadTestCase.java 2009-05-13
07:16:46 UTC (rev 13346)
@@ -1,5 +1,7 @@
package org.jboss.portal.test.selenium.cms;
+import java.io.File;
+
import org.jboss.portal.test.selenium.JBossPortalSeleniumTestCase;
import org.testng.Assert;
import org.testng.annotations.AfterMethod;
@@ -13,8 +15,10 @@
@Test(groups = { "cms_archive_upload" }, enabled = true)
public class CMSArchiveUploadTestCase extends JBossPortalSeleniumTestCase {
- private static final Integer ARCHIVE_WAITING = 5000;
- private static final int n = 50;
+ private static final Integer ARCHIVE_WAITING = 7000;
+ private static final int n = 70;
+ private static final String STEP = "20000";
+
/*
* uncomment following lines and set the right path to the workspace in the
* case you want to use this test case locally from eclipse
@@ -25,23 +29,24 @@
}
*/
- private final String casePfx = "cms.arch.";
- private final String SUB_CANCEL_ARCH_UPLOAD =
getProp(casePfx+"sub.cancel.arch.upload","cancel");
- private final String LNK_ADMIN =
getProp(casePfx+"lnk.admin","link=Admin");
- private final String LNK_CMS =
getProp(casePfx+"lnk.cms","link=CMS");
- private final String SUB_SEND_ARCHIVE =
getProp(casePfx+"sub.send.archive","submit");
- private final String INP_ARCHIVE_FILE =
getProp(casePfx+"inp.archive.file","response");
- private final String DIV_ARCHIVE_STATUS =
getProp(casePfx+"div.archive.status","//div[@id='center']/div/div/table/tbody/tr[2]/td/font");
- private final String SEL_ACTION =
getProp(casePfx+"sel.action","//div[@id='center']/div/div/div[1]/div/select");
+ private final String casePfx = "cms.arch.";
+ private final String SUB_CANCEL_ARCH_UPLOAD =
getProp(casePfx+"sub.cancel.arch.upload","cancel");
+ private final String LNK_ADMIN =
getProp(casePfx+"lnk.admin","link=Admin");
+ private final String LNK_CMS =
getProp(casePfx+"lnk.cms","link=CMS");
+ private final String SUB_SEND_ARCHIVE =
getProp(casePfx+"sub.send.archive","submit");
+ private final String INP_ARCHIVE_FILE =
getProp(casePfx+"inp.archive.file","response");
+ private final String DIV_ARCHIVE_STATUS =
getProp(casePfx+"div.archive.status","//div[@id='center']/div/div/table/tbody/tr[2]/td/font");
+ private final String SEL_ACTION =
getProp(casePfx+"sel.action","//div[@id='center']/div/div/div[1]/div/select");
- private final String WORKSPACE = System.getProperty("workspace");
+ private final String WORKSPACE = System.getProperty("workspace");
+ private final String TEST_FILES_DIR = WORKSPACE + File.separatorChar +
"test_files" + File.separatorChar;
@BeforeMethod(groups = { "log" })
public void loginBeforeTest() {
logoutIfPossible();
login("admin", "admin");
// timeout hack
- selenium.setSpeed("10000");
+ selenium.setSpeed(STEP);
}
@AfterMethod(groups = { "log" })
@@ -60,8 +65,8 @@
selenium.select(SEL_ACTION, "label=Upload Archive");
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.waitForPopUp("_top", PAGE_LOAD);
- selenium.type(INP_ARCHIVE_FILE, WORKSPACE + "/test_files/archive.zip");
- debugPrint("[selenium] : testArchiveUpload archive path: " + WORKSPACE +
"/test_files/archive.zip");
+ selenium.type(INP_ARCHIVE_FILE, TEST_FILES_DIR + "archive.zip");
+ debugPrint("[selenium] : testArchiveUpload archive path: " + TEST_FILES_DIR +
"archive.zip");
selenium.click(SUB_CANCEL_ARCH_UPLOAD);
selenium.waitForPageToLoad(PAGE_LOAD);
@@ -82,8 +87,8 @@
selenium.select(SEL_ACTION, "label=Upload Archive");
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.waitForPopUp("_top", PAGE_LOAD);
- selenium.type(INP_ARCHIVE_FILE, WORKSPACE + "/test_files/archive.zip");
- debugPrint("[selenium] : testArchiveUpload archive path2: " + WORKSPACE +
"/test_files/archive.zip");
+ selenium.type(INP_ARCHIVE_FILE, TEST_FILES_DIR + "archive.zip");
+ debugPrint("[selenium] : testArchiveUpload archive path2: " + TEST_FILES_DIR
+ "archive.zip");
selenium.click(SUB_SEND_ARCHIVE);
selenium.waitForPageToLoad(PAGE_LOAD);
@@ -123,8 +128,8 @@
selenium.select(SEL_ACTION, "label=Upload Archive");
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.waitForPopUp("_top", PAGE_LOAD);
- selenium.type(INP_ARCHIVE_FILE, WORKSPACE + "/test_files/many_files.zip");
- debugPrint("[selenium] : testManyFilesArchiveUpload archive path: " +
WORKSPACE + "/test_files/many_files.zip");
+ selenium.type(INP_ARCHIVE_FILE, TEST_FILES_DIR + "many_files.zip");
+ debugPrint("[selenium] : testManyFilesArchiveUpload archive path: " +
TEST_FILES_DIR + "many_files.zip");
selenium.click(SUB_SEND_ARCHIVE);
selenium.waitForPageToLoad(PAGE_LOAD);
@@ -165,8 +170,8 @@
selenium.select(SEL_ACTION, "label=Upload Archive");
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.waitForPopUp("_top", PAGE_LOAD);
- selenium.type(INP_ARCHIVE_FILE, WORKSPACE + "/test_files/big_archive.zip");
- debugPrint("[selenium] : testBigArchiveUpload archive path: " + WORKSPACE +
"/test_files/big_archive.zip");
+ selenium.type(INP_ARCHIVE_FILE, TEST_FILES_DIR + "big_archive.zip");
+ debugPrint("[selenium] : testBigArchiveUpload archive path: " +
TEST_FILES_DIR + "big_archive.zip");
selenium.click(SUB_SEND_ARCHIVE);
selenium.waitForPageToLoad(PAGE_LOAD);