Author: mageshbk(a)jboss.com
Date: 2009-05-13 03:57:39 -0400 (Wed, 13 May 2009)
New Revision: 13351
Modified:
branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/build.xml
branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/IdentityAdminTestCase.java
branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSArchiveUploadTestCase.java
branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileUploadTestCase.java
Log:
[JBEPP-80] - Fix Test case failures when run locally and in other platform other than
linux
Modified: branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/build.xml
===================================================================
--- branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/build.xml 2009-05-13
07:40:57 UTC (rev 13350)
+++ branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/build.xml 2009-05-13
07:57:39 UTC (rev 13351)
@@ -3,7 +3,7 @@
<property environment="env" />
- <property name="workspace" location="build.xml" />
+ <property name="workspace" location="${basedir}" />
<property name="java.home" location="${env.JAVA_HOME}" />
<property name="suitename" location="testng-files" />
Modified:
branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/IdentityAdminTestCase.java
===================================================================
---
branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/IdentityAdminTestCase.java 2009-05-13
07:40:57 UTC (rev 13350)
+++
branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/IdentityAdminTestCase.java 2009-05-13
07:57:39 UTC (rev 13351)
@@ -444,9 +444,11 @@
}
searchSimple("man", "10");
+ selenium.waitForPageToLoad(PAGE_LOAD);
Assert.assertEquals(countTableRows(TBL_USERLIST) - 1, 10, "Wrong number of row in
user table #1.");
searchSimple("man", "50");
+ selenium.waitForPageToLoad(PAGE_LOAD);
Assert.assertEquals(countTableRows(TBL_USERLIST) - 1, 50, "Wrong number of row in
user table #2.");
selenium.click(INP_USER_SEARCH_NEXT);
selenium.waitForPageToLoad(PAGE_LOAD);
@@ -456,6 +458,7 @@
Assert.assertEquals(countTableRows(TBL_USERLIST) - 1, 50, "Wrong number of row in
user table #2.");
searchSimple("man", "100");
+ selenium.waitForPageToLoad(PAGE_LOAD);
//selenium.setSpeed("60000");
Assert.assertEquals(countTableRows(TBL_USERLIST) - 1, 95, "Wrong number of row in
user table #4.");
//selenium.setSpeed("0");
Modified:
branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSArchiveUploadTestCase.java
===================================================================
---
branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSArchiveUploadTestCase.java 2009-05-13
07:40:57 UTC (rev 13350)
+++
branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSArchiveUploadTestCase.java 2009-05-13
07:57:39 UTC (rev 13351)
@@ -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;
@@ -28,15 +30,16 @@
*/
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 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 TEST_FILES_DIR = WORKSPACE + File.separatorChar +
"test_files" + File.separatorChar;
@BeforeMethod(groups = { "log" })
public void loginBeforeTest() {
@@ -62,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);
@@ -84,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);
@@ -125,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);
@@ -167,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);
Modified:
branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileUploadTestCase.java
===================================================================
---
branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileUploadTestCase.java 2009-05-13
07:40:57 UTC (rev 13350)
+++
branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileUploadTestCase.java 2009-05-13
07:57:39 UTC (rev 13351)
@@ -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;
@@ -23,6 +25,7 @@
private final String CMS_FILE_TABLE =
getProp(casePfx+"cms.file.table","//div[@id='center']/div/div/div[3]/table");
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() {
@@ -91,7 +94,7 @@
selenium.type("title", "file to upload");
selenium.select("language", "label=Afar");
- selenium.type("response", WORKSPACE + "/test_files/testFile.txt");
+ selenium.type("response", TEST_FILES_DIR + "testFile.txt");
selenium.click("submit");
selenium.waitForPageToLoad(PAGE_LOAD);
/*