Author: vrockai
Date: 2008-10-31 11:31:30 -0400 (Fri, 31 Oct 2008)
New Revision: 12223
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/CMSFileUploadTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/testng.xml
Log:
upload fixes
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 2008-10-31
13:30:18 UTC (rev 12222)
+++
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSArchiveUploadTestCase.java 2008-10-31
15:31:30 UTC (rev 12223)
@@ -13,15 +13,14 @@
@Test(groups = { "cms_archive_upload" }, enabled = true)
public class CMSArchiveUploadTestCase extends JBossPortalSeleniumTestCase {
+ private static final String ARCHIVE_WAITING = "90000";
/* uncomment following lines and set the right path to the workspace in the case
* you want to use this test case locally from eclipse */
-
/*
{
System.setProperty("workspace","/home/vrockai/workspace/selenium/selenium/");
}
*/
-
private static final String SUB_CANCEL_ARCH_UPLOAD = "cancel";
private static final String LNK_ADMIN = "link=Admin";
private static final String LNK_CMS = "link=CMS";
@@ -45,6 +44,7 @@
public void testArchiveUpload() {
//System.out.println("archive adress:" + WORKSPACE);
// canceling at the first stage
+
selenium.click(LNK_ADMIN);
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click(LNK_CMS);
@@ -85,7 +85,7 @@
Assert.assertEquals(selenium.getText(DIV_ARCHIVE_STATUS),
"Your archive has been accepted for processing. The resources will appear in
your Folder once the processing is finished");
- selenium.setSpeed("60000");
+ selenium.setSpeed(ARCHIVE_WAITING);
selenium.click("link=Home");
selenium.setSpeed("0");
selenium.waitForPageToLoad(PAGE_LOAD);
@@ -119,7 +119,7 @@
Assert.assertEquals(selenium.getText(DIV_ARCHIVE_STATUS),
"Your archive has been accepted for processing. The resources will appear in
your Folder once the processing is finished");
- selenium.setSpeed("60000");
+ selenium.setSpeed(ARCHIVE_WAITING);
selenium.click("link=Home");
selenium.setSpeed("0");
selenium.waitForPageToLoad(PAGE_LOAD);
@@ -154,7 +154,7 @@
Assert.assertEquals(selenium.getText(DIV_ARCHIVE_STATUS),
"Your archive has been accepted for processing. The resources will appear in
your Folder once the processing is finished");
- selenium.setSpeed("60000");
+ selenium.setSpeed(ARCHIVE_WAITING);
selenium.click("link=Home");
selenium.setSpeed("0");
selenium.waitForPageToLoad(PAGE_LOAD);
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 2008-10-31
13:30:18 UTC (rev 12222)
+++
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileUploadTestCase.java 2008-10-31
15:31:30 UTC (rev 12223)
@@ -12,6 +12,8 @@
@Test(groups = { "cms_file_upload" }, enabled = true)
public class CMSFileUploadTestCase extends JBossPortalSeleniumTestCase {
+ /* uncomment following lines and set the right path to the workspace in the case
+ * you want to use this test case locally from eclipse */
/*
{
System.setProperty("workspace","/home/vrockai/workspace/selenium/selenium/"
@@ -91,10 +93,10 @@
selenium.type("response", WORKSPACE + "/test_files/testFile.txt");
selenium.click("submit");
selenium.waitForPageToLoad(PAGE_LOAD);
-
+/*
selenium.click("link=Approve");
selenium.waitForPageToLoad(PAGE_LOAD);
-
+*/
Assert.assertEquals(selenium.getText("//div[@id='center']/div/div/ul/li[3]"),
"testFile.txt");
Assert.assertTrue(selenium.isElementPresent("link=text/plain"));
Assert.assertTrue(selenium.isElementPresent("//div[@id='center']/div/div/table/tbody/tr[4]/td[3]"));
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/testng.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/testng.xml 2008-10-31 13:30:18 UTC
(rev 12222)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/testng.xml 2008-10-31 15:31:30 UTC
(rev 12223)
@@ -1,5 +1,6 @@
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="SeleniumTest">
+
<test verbose="2"
name="org.jboss.portal.test.selenium.UserLoginTestCase"
annotations="JDK">
<classes>
<class name="org.jboss.portal.test.selenium.UserLoginTestCase"/>
@@ -14,13 +15,13 @@
<classes>
<class
name="org.jboss.portal.test.selenium.IdentityAdminTestCase"></class></classes>
</test>
- <!--
+
<test name="org.jboss.portal.test.selenium.PortletUserCreationTestCase"
verbose="2" annotations="JDK">
<classes>
<class
name="org.jboss.portal.test.selenium.PortletUserCreationTestCase"></class></classes>
</test>
- -->
+
<test name="org.jboss.portal.test.selenium.WSRPTestCase"
verbose="2" annotations="JDK">
<classes>
@@ -50,7 +51,7 @@
<classes>
<class
name="org.jboss.portal.test.selenium.cms.CMSDirectoryTestCase"></class></classes>
</test>
-
+ -->
<test name="org.jboss.portal.test.selenium.cms.CMSFileUploadTestCase"
verbose="2" annotations="JDK">
<classes>
Show replies by date