Author: vrockai
Date: 2009-05-13 07:21:01 -0400 (Wed, 13 May 2009)
New Revision: 13356
Modified:
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/build.xml
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/IdentityAdminTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSArchiveUploadTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileUploadTestCase.java
Log:
[selenium] - implementing fixes by magesh
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/build.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/build.xml 2009-05-13 11:17:11 UTC
(rev 13355)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/build.xml 2009-05-13 11:21:01 UTC
(rev 13356)
@@ -3,7 +3,7 @@
<property environment="env" />
- <property name="workspace" location="." />
+ <property name="workspace" location="${basedir}" />
<property name="java.home" location="${env.JAVA_HOME}" />
<property name="suitename" location="testng-files" />
Modified:
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/IdentityAdminTestCase.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/IdentityAdminTestCase.java 2009-05-13
11:17:11 UTC (rev 13355)
+++
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/IdentityAdminTestCase.java 2009-05-13
11:21:01 UTC (rev 13356)
@@ -502,9 +502,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);
@@ -514,6 +516,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/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSArchiveUploadTestCase.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSArchiveUploadTestCase.java 2009-05-13
11:17:11 UTC (rev 13355)
+++
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSArchiveUploadTestCase.java 2009-05-13
11:21:01 UTC (rev 13356)
@@ -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;
@@ -42,7 +44,8 @@
private final String SEL_ACTION =
getLoc(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" })
protected void loginBeforeTest() {
logoutIfPossible();
@@ -77,9 +80,8 @@
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.waitForPopUp("_top", PAGE_LOAD);
- debugPrint("CMSArchiveUploadTestCase archive location: "+WORKSPACE +
"/test_files/archive.zip");
-
- selenium.type(INP_ARCHIVE_FILE, 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_CANCEL_ARCH_UPLOAD);
selenium.waitForPageToLoad(PAGE_LOAD);
@@ -151,9 +153,8 @@
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.waitForPopUp("_top", PAGE_LOAD);
- debugPrint("CMSArchiveUploadTestCase archive location: "+WORKSPACE +
"/test_files/many_files.zip");
-
- selenium.type(INP_ARCHIVE_FILE, WORKSPACE + "/test_files/many_files.zip");
+ debugPrint("CMSArchiveUploadTestCase archive location: "+TEST_FILES_DIR);
+ selenium.type(INP_ARCHIVE_FILE, TEST_FILES_DIR + "many_files.zip");
selenium.click(SUB_SEND_ARCHIVE);
selenium.waitForPageToLoad(PAGE_LOAD);
@@ -205,7 +206,7 @@
selenium.waitForPopUp("_top", PAGE_LOAD);
debugPrint("CMSArchiveUploadTestCase archive location: "+ WORKSPACE +
"/test_files/big_archive.zip");
- selenium.type(INP_ARCHIVE_FILE, WORKSPACE + "/test_files/big_archive.zip");
+ selenium.type(INP_ARCHIVE_FILE, TEST_FILES_DIR + "big_archive.zip");
selenium.click(SUB_SEND_ARCHIVE);
Modified:
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileUploadTestCase.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileUploadTestCase.java 2009-05-13
11:17:11 UTC (rev 13355)
+++
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileUploadTestCase.java 2009-05-13
11:21:01 UTC (rev 13356)
@@ -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;
@@ -29,7 +31,8 @@
private final String CMS_FILE_TABLE = getLoc(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" })
protected void loginBeforeTest() {
logoutIfPossible();
@@ -112,7 +115,7 @@
selenium.type("description", "myFile");
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);
/*