Author: vrockai
Date: 2009-04-02 06:26:05 -0400 (Thu, 02 Apr 2009)
New Revision: 13112
Modified:
branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/EndtoEndPortalAdminTestCase.java
Log:
[selenium] debug into e2e portal
Modified:
branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/EndtoEndPortalAdminTestCase.java
===================================================================
---
branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/EndtoEndPortalAdminTestCase.java 2009-04-02
07:11:06 UTC (rev 13111)
+++
branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/EndtoEndPortalAdminTestCase.java 2009-04-02
10:26:05 UTC (rev 13112)
@@ -17,11 +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 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')]");
private final String SUB_RENAME_PORTAL = getProp(casePfx +
"sub.rename.portal",
"//input[contains(@id,'renameForm:rename')]");
@@ -105,7 +104,7 @@
addPortlet(portalName, page1Name, PORTLET1, "portlet");
addPortlet(portalName, page2Name, PORTLET2, "widget/google");
addPortlet(portalName, page3Name, PORTLET3, "widget/netvibes");
- //addPortlet(portalName, page4Name, PORTLET4, "filesystem");
+ // addPortlet(portalName, page4Name, PORTLET4, "filesystem");
addPortlet(portalName, page5Name, PORTLET5, "cms");
makeDefaultPortal(portalName);
@@ -117,27 +116,32 @@
Assert.assertTrue(selenium.isElementPresent("link=" + page1Name));
Assert.assertTrue(selenium.isElementPresent("link=" + page2Name));
Assert.assertTrue(selenium.isElementPresent("link=" + page3Name));
- //Assert.assertTrue(selenium.isElementPresent("link=" + page4Name));
+ // Assert.assertTrue(selenium.isElementPresent("link=" + page4Name));
Assert.assertTrue(selenium.isElementPresent("link=" + page5Name));
// Assert pages contain what they should
assertPageContains(page1Name, por1str);
assertPageContains(page2Name, por2str);
assertPageContains(page3Name, por3str);
- //assertPageContains(page4Name, por4str);
+ // assertPageContains(page4Name, por4str);
assertPageContains(page5Name, por5str);
}
-
- public void testManagePortal(){
-
+
+ public void testManagePortal() {
+
}
private void assertPageContains(String pageName, String awaitStr) {
selenium.open(ADR_PORTAL);
selenium.waitForPageToLoad(PAGE_LOAD);
-
+ if (selenium.isAlertPresent()) {
+ debugPrint("[selenium] debug alert before link: "+selenium.getAlert());
+ }
selenium.click("link=" + pageName);
+ if (selenium.isAlertPresent()) {
+ debugPrint("[selenium] debug alert before link: "+selenium.getAlert());
+ }
selenium.waitForPageToLoad(PAGE_LOAD);
Assert.assertTrue(selenium.isTextPresent(awaitStr));
@@ -245,21 +249,20 @@
selenium.waitForPageToLoad(PAGE_LOAD);
} else if ("cms".equals(type)) {
String[] links = portletName.split("/");
- selenium.click("link="+links[0]);
+ selenium.click("link=" + links[0]);
selenium.waitForPageToLoad(PAGE_LOAD);
portletName = links[1];
} else if ("filesystem".equals(type)) {
String[] links = portletName.split("/");
- selenium.click("link="+links[0]);
+ selenium.click("link=" + links[0]);
selenium.waitForPageToLoad(PAGE_LOAD);
portletName = links[1];
}
-
- selenium.click("link=*" + portletName+"*");
+
+ selenium.click("link=*" + portletName + "*");
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click(SUB_LAYOUT_ADD_CENTER);
selenium.waitForPageToLoad(PAGE_LOAD);
-
}