Author: vrockai
Date: 2008-10-24 10:39:14 -0400 (Fri, 24 Oct 2008)
New Revision: 12165
Modified:
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/AdminPortalTestCase.java
Log:
portal admin testcases fix
Modified:
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/AdminPortalTestCase.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/AdminPortalTestCase.java 2008-10-24
13:39:56 UTC (rev 12164)
+++
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/AdminPortalTestCase.java 2008-10-24
14:39:14 UTC (rev 12165)
@@ -14,6 +14,8 @@
@Test(groups = { "admin_portal" }, enabled = true, description = "Partal
administrating.")
public class AdminPortalTestCase extends JBossPortalSeleniumTestCase {
+ private static final String SUB_LAYOUT_ADD_CENTER =
"//input[contains(@id,'layoutForm:a_center')]";
+ private static final String INP_WINDOW_NAME =
"//input[contains(@id,'windowForm:windowName')]";
private static final String SUBMIT_RENAME_PORTAL =
"//input[contains(@id,'renameForm:rename')]";
private static final String INPUT_RENAME_PORTAL =
"//input[contains(@id,'renameForm:newName')]";
private static final String SUBMIT_DELETE_PORTAL_CONF =
"//input[contains(@id,'delete-view:confirm-form:delete')]";
@@ -22,10 +24,10 @@
private static final String INPUT_PORTALNAME =
"//input[contains(@id,'create-portal-form:name')]";
private static final String INPUT_SUBMIT_CREATEPORTAL =
"//input[contains(@id,'create-portal-form:create-portal')]";
- private final String TAB_PORTALOBJ_ID = "//div[@id='current']/a";
+ private final String TAB_PORTALOBJ_ID = "Link=Admin";
private final String LINK_PORTALS_ID = "link=*Portal Objects*";
- private final String LINK_PORTAL_HOME =
"//input[contains(@id,'obj-temp-form:object-link-0')]";
+ private final String LINK_PORTAL_HOME =
"//a[contains(@id,'obj-temp-form:object-link-0')]";
private final String TABLE_PORTAL_ADMIN =
"//table[contains(@id,'obj-nav-form:portal-datatable')]";
private final String POR_TL_MAIN =
"//a[contains(@id,''obj-nav-form:portal-datatable:{0}:object-iid-link'')]";
@@ -42,7 +44,7 @@
private final String PAG_TL_SECURITY =
"//a[contains(@id,''obj-nav-form:pages-datatable:{0}:security-link'')]";
private final String PAG_TL_PROPERTIES =
"//a[contains(@id,''obj-nav-form:pages-datatable:{0}:prop-link'')]";
private final String PAG_TL_THEME =
"//a[contains(@id,''obj-nav-form:pages-datatable:{0}:theme-link'')]";
- private final String PAG_TL_RENAME =
"//a[contains(@id,''obj-nav-form:pages-datatable:{0}:rename-link_1'')]";
+ private final String PAG_TL_RENAME =
"//a[contains(@id,''obj-nav-form:pages-datatable:{0}:rename-link'')]";
private final String PAG_TL_DISPLAY =
"//a[contains(@id,''obj-nav-form:pages-datatable:{0}:rename-display'')]";
private final String PAG_TL_DELETE =
"//a[contains(@id,''obj-nav-form:pages-datatable:{0}:delete-link'')]";
private final String PAG_TL_MAKEDEF =
"//a[contains(@id,''obj-nav-form:pages-datatable:{0}:default-link'')]";
@@ -227,10 +229,13 @@
selenium.click(MessageFormat.format(PAG_TL_LAYOUT, r));
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.type("windowForm:windowName", windowName);
+
selenium.click("link=Who's online portlet");
selenium.waitForPageToLoad("30000");
- selenium.click("layoutForm:a_center");
+
+ selenium.type(INP_WINDOW_NAME, windowName);
+
+ selenium.click(SUB_LAYOUT_ADD_CENTER);
selenium.waitForPageToLoad("30000");
Assert.assertTrue(selenium.isTextPresent(windowName));
@@ -251,6 +256,7 @@
clickIfVisible(TAB_PORTALOBJ_ID);
clickIfVisible(LINK_PORTALS_ID);
+ //selenium.setSpeed("8000");
clickIfVisible(LINK_PORTAL_HOME ,"Create a portal named:");
int r = findTableRow(TABLE_PORTAL_ADMIN, portalName, 0) - 1;
Show replies by date