Author: vrockai
Date: 2008-10-31 09:30:18 -0400 (Fri, 31 Oct 2008)
New Revision: 12222
Modified:
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSSecureTestCase.java
Log:
cms secure fix
Modified:
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSSecureTestCase.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSSecureTestCase.java 2008-10-31
12:22:33 UTC (rev 12221)
+++
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSSecureTestCase.java 2008-10-31
13:30:18 UTC (rev 12222)
@@ -17,7 +17,9 @@
public class CMSSecureTestCase extends JBossPortalSeleniumTestCase {
private static final String LNK_EXPLORE =
"//area[(a)href='/portal/content/default/epp.html']";
+ private static final String LNK_CMS_EXPLORE = "Link=epp.html";
private static final String LNK_SUPPORT_HTML =
"//area[(a)href='/portal/content/default/project.html']";
+ private static final String LNK_CMS_SUPPORT_HTML = "Link=project.html";
private static final String LNK_MEMBERS = "link=Members";
private static final String SUB_SECURITY_SET =
"//input[contains(@name,'submit')]";
private static final String SEL_SECUREUSERS_MANAGE =
"//select[contains(@name,'secureusers:manage')]";
@@ -98,7 +100,7 @@
public void testSetAdminReadPer() {
login("admin", "admin");
- Assert.assertFalse(selenium.isTextPresent("Access Denied"), "Non secured
resource is not visible.#1");
+ Assert.assertFalse(selenium.isTextPresent("Access to this resource is
denied"), "Non secured resource is not visible.#1");
Assert.assertFalse(selenium.isTextPresent("You are not allowed to access the
following resource - /default/index.html"),
"Non secured resource is not visible.#2");
@@ -122,10 +124,10 @@
logout();
- Assert.assertTrue(selenium.isTextPresent("Access Denied"), "Secured
resource is visible.#1");
+ Assert.assertTrue(selenium.isTextPresent("Access to this resource is
denied"), "Secured resource is visible.#1");
login("user", "user");
- Assert.assertTrue(selenium.isTextPresent("Access Denied"), "Secured
resource is visible.#2");
+ Assert.assertTrue(selenium.isTextPresent("Access to this resource is
denied"), "Secured resource is visible.#2");
logout();
}
@@ -137,7 +139,7 @@
login("admin", "admin");
- Assert.assertFalse(selenium.isTextPresent("Access Denied"), "Non secured
resource is not visible.#1");
+ Assert.assertFalse(selenium.isTextPresent("Access to this resource is
denied"), "Non secured resource is not visible.#1");
Assert.assertFalse(selenium.isTextPresent("You are not allowed to access the
following resource - /default/index.html"),
"Non secured resource is not visible.#2");
@@ -162,9 +164,9 @@
login("admin", "admin");
- Assert.assertFalse(selenium.isTextPresent("Access Denied"), "Non secured
resource is not visible.#1");
- Assert.assertFalse(selenium.isTextPresent("You are not allowed to access the
following resource - /default/index.html"),
- "Non secured resource is not visible.#2");
+ Assert.assertFalse(selenium.isTextPresent("Access to this resource is denied
"), "Non secured resource is not visible.#1");
+ //Assert.assertFalse(selenium.isTextPresent("You are not allowed to access the
following resource - /default/index.html"),
+ // "Non secured resource is not visible.#2");
selenium.click(LNK_ADMIN);
selenium.waitForPageToLoad(PAGE_LOAD);
@@ -183,10 +185,10 @@
logout();
- Assert.assertTrue(selenium.isTextPresent("Access Denied"), "Secured
resource is visible.#1");
+ Assert.assertTrue(selenium.isTextPresent("Access to this resource is denied
"), "Secured resource is visible.#1");
login("user", "user");
- Assert.assertFalse(selenium.isTextPresent("Access Denied"), "Secured
resource is visible.#2");
+ Assert.assertFalse(selenium.isTextPresent("Access to this resource is denied
"), "Secured resource is visible.#2");
logout();
}
@@ -197,7 +199,7 @@
assignRole("user", "user(a)portal.com", "secRole",
"secRoleDisp");
- Assert.assertFalse(selenium.isTextPresent("Access Denied"), "Non secured
resource is not visible.#1");
+ Assert.assertFalse(selenium.isTextPresent("Access to this resource is
denied"), "Non secured resource is not visible.#1");
Assert.assertFalse(selenium.isTextPresent("You are not allowed to access the
following resource - /default/index.html"),
"Non secured resource is not visible.#2");
@@ -218,10 +220,10 @@
logout();
- Assert.assertTrue(selenium.isTextPresent("Access Denied"), "Secured
resource is visible after logout.");
+ Assert.assertTrue(selenium.isTextPresent("Access to this resource is
denied"), "Secured resource is visible after logout.");
login("user", "user");
- Assert.assertFalse(selenium.isTextPresent("Access Denied"), "Non secured
resource is not visible for the \"user\".");
+ Assert.assertFalse(selenium.isTextPresent("Access to this resource is
denied"), "Non secured resource is not visible for the
\"user\".");
logout();
}
@@ -232,7 +234,7 @@
deassignRole("user", "user(a)portal.com", "secRole",
"secRoleDisp");
- Assert.assertFalse(selenium.isTextPresent("Access Denied"));
+ Assert.assertFalse(selenium.isTextPresent("Access to this resource is
denied"));
Assert.assertFalse(selenium.isTextPresent("You are not allowed to access the
following resource - /default/index.html"));
selenium.click(LNK_ADMIN);
@@ -252,11 +254,11 @@
logout();
- Assert.assertTrue(selenium.isTextPresent("Access Denied"));
+ Assert.assertTrue(selenium.isTextPresent("Access to this resource is
denied"));
login("user", "user");
- Assert.assertTrue(selenium.isTextPresent("Access Denied"));
+ Assert.assertTrue(selenium.isTextPresent("Access to this resource is
denied"));
logout();
}
@@ -305,7 +307,7 @@
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click(LNK_DEFAULT);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click(LNK_SUPPORT_HTML);
+ selenium.click(LNK_CMS_EXPLORE);
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.select(SEL_CMS_ACTION, "label=Secure");
selenium.waitForPageToLoad(PAGE_LOAD);