Author: vrockai
Date: 2009-06-24 11:43:56 -0400 (Wed, 24 Jun 2009)
New Revision: 13497
Modified:
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/DashboardTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/IdentityAdminTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSDirectoryTestCase.java
Log:
[JBPORTAL-2407] - several new tests
Modified:
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/DashboardTestCase.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/DashboardTestCase.java 2009-06-24
11:20:46 UTC (rev 13496)
+++
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/DashboardTestCase.java 2009-06-24
15:43:56 UTC (rev 13497)
@@ -583,7 +583,9 @@
* Test window name input when no portlet is selected. Types XSS string into
* window name and without selecting any portlet it clicks on relevant
* submit button. Final assert is made - XSS string should not be the value
- * of window name input.
+ * of window name input. Types XSS string into window name and without
+ * selecting any portlet it presses enter on the input. Final assert is made
+ * - XSS string should not be the value of window name input.
*
* @jira(JBPORTAL-2418)
*/
@@ -603,6 +605,22 @@
Assert.assertFalse(selenium.getValue(INP_WINDOW_NAME).equals(XSS_STR1),
"XSS string found on the page in window name input.");
Assert.assertTrue(selenium.isTextPresent(MSG_NO_PORTLET),"Message about no portlet
selected missing or other then expected");
+
+ selenium.click(LNK_DASHBOARD);
+ selenium.waitForPageToLoad(PAGE_LOAD);
+
+ selenium.click(LNK_CONFIGURE_DASHBOARD);
+ waitFor(AJAX_LOAD);
+
+ selectIfNotSelected(SEL_PAGE, "DashTestPage");
+ selenium.type(INP_WINDOW_NAME, XSS_STR1);
+ selenium.keyPress(INP_WINDOW_NAME, "\\13");
+
+ selenium.waitForPageToLoad(PAGE_LOAD);
+
+ Assert.assertFalse(selenium.getValue(INP_WINDOW_NAME).equals(XSS_STR1),
+ "XSS string found on the page in window name input after pressing enter on
it.");
+ Assert.assertTrue(selenium.isTextPresent(MSG_NO_PORTLET),"Message about no portlet
selected missing or other then expected");
}
//
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=143023
Modified:
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/IdentityAdminTestCase.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/IdentityAdminTestCase.java 2009-06-24
11:20:46 UTC (rev 13496)
+++
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/IdentityAdminTestCase.java 2009-06-24
15:43:56 UTC (rev 13497)
@@ -743,7 +743,9 @@
* users.. The test creates 95 users named man0us - man94us. Then it tests
* the paginator of the search functions. It sets count of results to 10,50
* and 100, traverse through paginator and check, whether the amount of
- * returned results is correct.
+ * returned results is correct. The last action is searching for non
+ * existing user. It is asserted that table with usernames is not present on
+ * the screen.
*/
@Test(enabled = true, description = "Altering the number of rows in user
search")
public void testSearchUserCount() {
@@ -768,14 +770,12 @@
searchSimple("man", "100");
selenium.waitForPageToLoad(PAGE_LOAD);
- // selenium.setSpeed("60000");
Assert.assertEquals(countTableRows(TBL_USERLIST) - 1, 95, "Wrong number of row in
user table #4.");
- // selenium.setSpeed("0");
- /*
- * for(int i=0; i< 95; i++){ deleteUser("man"+i+"us",
- * "man"+i+"us"+"(a)redhatqa.com"); }
- */
+ searchSimple("ubmbobungo", "10");
+ selenium.waitForPageToLoad(PAGE_LOAD);
+ Assert.assertFalse(selenium.isElementPresent(TBL_USERLIST),"Table with users found
after searching for non-existing user.");
+
}
/**
Modified:
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSDirectoryTestCase.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSDirectoryTestCase.java 2009-06-24
11:20:46 UTC (rev 13496)
+++
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSDirectoryTestCase.java 2009-06-24
15:43:56 UTC (rev 13497)
@@ -275,8 +275,8 @@
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.waitForPopUp("_top", PAGE_LOAD);
- Assert.assertTrue(selenium.isElementPresent(INP_DIR_NAME));
- Assert.assertTrue(selenium.isElementPresent(INP_DIR_DESC));
+ Assert.assertTrue(selenium.isElementPresent(INP_DIR_NAME),"Directory name is
missing or other then expected.");
+ Assert.assertTrue(selenium.isElementPresent(INP_DIR_DESC),"Directory description
is missing or other then expected");
Assert.assertEquals("Confirm Directory Creation",
selenium.getText("//div[@id='center']/div/h3"));
selenium.type(INP_DIR_NAME, copyCancelDirName);
@@ -295,11 +295,11 @@
selenium.click(INP_DIR_CANCEL);
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertTrue(selenium.isElementPresent("link=" + copyCancelDirName));
+ Assert.assertTrue(selenium.isElementPresent("link=" +
copyCancelDirName),"Cancel directory name is missing.");
selenium.click("link=default");
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertFalse(selenium.isElementPresent("link=" + copyCancelDirName));
+ Assert.assertFalse(selenium.isElementPresent("link=" +
copyCancelDirName),"Cancel directory name is missing.");
}