[portal-commits] JBoss Portal SVN: r12931 - in branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium: portal and 1 other directory.

portal-commits at lists.jboss.org portal-commits at lists.jboss.org
Tue Mar 3 08:35:25 EST 2009


Author: vrockai
Date: 2009-03-03 08:35:24 -0500 (Tue, 03 Mar 2009)
New Revision: 12931

Modified:
   branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/EndToEndBeaPortlet.java
   branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/EndtoEndPortalAdminTestCase.java
Log:
end2end testcaszes fix

Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/EndToEndBeaPortlet.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/EndToEndBeaPortlet.java	2009-03-03 13:00:30 UTC (rev 12930)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/EndToEndBeaPortlet.java	2009-03-03 13:35:24 UTC (rev 12931)
@@ -13,12 +13,14 @@
 @Test(groups = {"end2end"}, enabled = true, description = "Creating of new portal with content.")
 public class EndToEndBeaPortlet extends JBossPortalSeleniumTestCase {
 
+
 	private static final String SUB_VIEW_PORTLETS = "//input[contains(@id,'definition-form:view-portlets')]";
 
 	private static final String SEL_CONS_TYPE = "//select[contains(@id,'definition-form:menu')]";
 
 	public static String casePfx = "e2e.wsrp.";
 	
+	private  final String ADR_HOME = getProp(casePfx+"adr.home","portal/auth/portal/default");
 	private  final String INP_CONSUMER_NAME = getProp(casePfx+"inp.consumer.name","//input[contains(@id,'edit-cons-form:id')]");
 	private  final String SUBMIT_REFRESH_CANCEL = getProp(casePfx+"submit.refresh.cancel","//a[contains(@id,'edit-cons-form:list-cons-link')]");
 	private  final String SUBMIT_PROD_SAVE = getProp(casePfx+"submit.prod.save","//input[contains(@id,'producer-form:save-producer')]");
@@ -127,23 +129,23 @@
 		createInstance(defName, consName, insName);
 		addPortlet(portalName, pageName, insName, "portlet");
 		
-		selenium.open("/portal/");
+		selenium.open(ADR_HOME);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		
-		//Assert.assertTrue(selenium.isTextPresent("1BeaPorWindow"));
+		Assert.assertTrue(selenium.isTextPresent("1BeaPorWindow"));
 		Assert.assertTrue(selenium.isTextPresent("Welcome to WebLogic Portal WSRP Demo."));
 		
 	}
 	
 	private void createConsumer(String consumerName){
-		selenium.open("/portal/");
+		selenium.open(ADR_HOME);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		selenium.click("link=Admin");
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		selenium.click("link=WSRP");
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		clickIfVisible(ID_LINK_CONSCONF);
-
+		
 		selenium.type(INPUT_CREATECONS, consumerName);
 		
 		selenium.click(SUBMIT_CREATECONS);
@@ -166,7 +168,7 @@
 	}
 	
 	private void createInstance(String defName, String type, String insName){
-		selenium.open("/portal/");
+		selenium.open(ADR_HOME);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		
 		clickIfVisible(LINK_ADMIN);
@@ -182,7 +184,7 @@
 		
 		selenium.click(MessageFormat.format(T_LINK_CREATE,r-1));
 		selenium.waitForPageToLoad(PAGE_LOAD);
-
+		selenium.setSpeed("5555");
 		selenium.type(INPUT_INSTANCE_NAME, insName);
 		selenium.click(SUBMIT_CREATE_INST);
 		selenium.waitForPageToLoad(PAGE_LOAD);
@@ -190,7 +192,7 @@
 	}
 	
 	private void addPortlet(String portalName, String pageName, String portletName, String type) {
-        selenium.open("/portal/");
+        selenium.open(ADR_HOME);
         selenium.waitForPageToLoad(PAGE_LOAD);
 
         selenium.click("link=Admin");

Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/EndtoEndPortalAdminTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/EndtoEndPortalAdminTestCase.java	2009-03-03 13:00:30 UTC (rev 12930)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/EndtoEndPortalAdminTestCase.java	2009-03-03 13:35:24 UTC (rev 12931)
@@ -17,8 +17,10 @@
 @Test(groups = { "end2end" }, enabled = true, description = "Creating of new portal with content.")
 public class EndtoEndPortalAdminTestCase extends JBossPortalSeleniumTestCase {
 
+
 	public static String casePfx = "portal.e2e.";
 
+	private final String ADR_PORTAL = getProp(casePfx + "adr.home","/portal");
 	public final String SEL_PORTLET_TYPE = getProp(casePfx + "sel.portlet.type","//select[contains(@id,'windowForm:instanceId')]");												   
 	private final String SUB_LAYOUT_ADD_CENTER = getProp(casePfx + "sub.layout.add.center", "//input[contains(@id,'layoutForm:a_center')]");
 	private final String INP_WINDOW_NAME = getProp(casePfx + "inp.window.name", "//input[contains(@id,'windowForm:windowName')]");
@@ -109,7 +111,7 @@
 		makeDefaultPortal(portalName);
 
 		// Assert the portal is default
-		selenium.open("/portal/");
+		selenium.open(ADR_PORTAL);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		Assert.assertEquals("", selenium.getText(DIV_PORT_CONTENT));
 		Assert.assertTrue(selenium.isElementPresent("link=" + page1Name));
@@ -132,7 +134,7 @@
 	}
 
 	private void assertPageContains(String pageName, String awaitStr) {
-		selenium.open("/portal/");
+		selenium.open(ADR_PORTAL);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 
 		selenium.click("link=" + pageName);
@@ -142,7 +144,7 @@
 	}
 
 	private void createPortal(String portalName) {
-		selenium.open("/portal/");
+		selenium.open(ADR_PORTAL);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 
 		selenium.click("link=Admin");
@@ -162,7 +164,7 @@
 	}
 
 	private void addPage(String pageName) {
-		selenium.open("/portal/");
+		selenium.open(ADR_PORTAL);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 
 		selenium.click("link=Admin");
@@ -191,7 +193,7 @@
 	}
 
 	private void addPortlet(String portalName, String pageName, String portletName, String type) {
-		selenium.open("/portal/");
+		selenium.open(ADR_PORTAL);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 
 		selenium.click("link=Admin");
@@ -262,7 +264,7 @@
 	}
 
 	private void makeDefaultPortal(String portalName) {
-		selenium.open("/portal/");
+		selenium.open(ADR_PORTAL);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 
 		selenium.click("link=Admin");




More information about the portal-commits mailing list