Author: vrockai
Date: 2009-02-26 06:55:52 -0500 (Thu, 26 Feb 2009)
New Revision: 12895
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/locator.properties
Log:
search bar fix
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-02-25
15:05:56 UTC (rev 12894)
+++
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/IdentityAdminTestCase.java 2009-02-26
11:55:52 UTC (rev 12895)
@@ -14,13 +14,17 @@
@Test(groups = { "admin_ui" }, enabled = true)
public class IdentityAdminTestCase extends JBossPortalSeleniumTestCase {
+
public String casePfx = "iden.man.";
+ private final String INP_USER_SEARCH_PREV = getProp(casePfx +
"inp.user.search.prev",
"//input[contains(@id,'search-user-form1:prev-page')]");
+ private final String INP_USER_SEARCH_NEXT = getProp(casePfx +
"inp.user.search.next",
"//input[contains(@id,'search-user-form1:next-page')]");
+
private final String SEL_SEARCHUSER_LIMIT = getProp(casePfx +
"sel.searchuser.limit",
"//select[contains(@id,'search-user-form:limit')]");
private final String SUB_EDIT_PROF = getProp(casePfx + "sub.edit.prof",
"//input[contains(@id,'profile-form:submit')]");
- private final String SUB_PAGIN_LEFT = getProp(casePfx + "sub.pagin.left",
"//input[contains(@id,'search-user-form1:prev-page')]");
- private final String SUB_PAGIN_RIGHT = getProp(casePfx + "sub.pagin.right",
"//input[contains(@id,'search-user-form1:next-page')]");
+ private final String SUB_PAGIN_LEFT = getProp(casePfx + "sub.pagin.left",
INP_USER_SEARCH_PREV);
+ private final String SUB_PAGIN_RIGHT = getProp(casePfx + "sub.pagin.right",
INP_USER_SEARCH_NEXT);
private final String SUB_EDIT_USER_EMAIL_CANCEL = getProp(casePfx +
"sub.edit.user.email.cancel",
"//input[contains(@id,'profile-form:cancel')]");
private final String INP_EDIT_USER_EMAIL = getProp(casePfx +
"inp.edit.user.email",
"//input[contains(@id,'profile-form:email')]");
@@ -78,7 +82,7 @@
public final String CHK_ROLE = getProp(casePfx + "chk.role",
"//input[contains(@name,''assign-roles-form:roles'') and
@value=''{0}'']");
- public final long SEARCH_TIMEOUT = 5000;
+ public final long SEARCH_TIMEOUT = 10000;
private String butDelUsr_id(String userName) {
String table = TBL_USERLIST;
@@ -444,15 +448,17 @@
searchSimple("man", "50");
Assert.assertEquals(countTableRows(TBL_USERLIST) - 1, 50, "Wrong number of row in
user table #2.");
- selenium.click("//input[contains(@id,'search-user-form1:next-page')]");
+ selenium.click(INP_USER_SEARCH_NEXT);
selenium.waitForPageToLoad(PAGE_LOAD);
Assert.assertEquals(countTableRows(TBL_USERLIST) - 1, 45, "Wrong number of row in
user table #3.");
- selenium.click("//input[contains(@id,'search-user-form1:prev-page')]");
+ selenium.click(INP_USER_SEARCH_PREV);
selenium.waitForPageToLoad(PAGE_LOAD);
-
+ Assert.assertEquals(countTableRows(TBL_USERLIST) - 1, 50, "Wrong number of row in
user table #2.");
+
searchSimple("man", "100");
+ //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"); }
@@ -739,7 +745,7 @@
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.select(SEL_SEARCHUSER_LIMIT, "label=" + count);
- waitFor(SEARCH_TIMEOUT);
+ //waitFor(SEARCH_TIMEOUT);
selenium.type(INP_SEARCH_USER, name);
selenium.click(SUB_SEARCH_USER);
Modified:
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/locator.properties
===================================================================
---
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/locator.properties 2009-02-25
15:05:56 UTC (rev 12894)
+++
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/locator.properties 2009-02-26
11:55:52 UTC (rev 12895)
@@ -21,7 +21,8 @@
user.login.adr.portal=link=Login
# IdentityAdminTestCase
-
+inp.user.search.prev=//input[contains(@id,'search-user-form1:prev-page')]
+inp.user.search.next=//input[contains(@id,'search-user-form1:next-page')]
iden.man.sel.searchuser.limit=//select[contains(@id,'search-user-form:limit')]
iden.man.sub.edit.prof=//input[contains(@id,'profile-form:submit')]
iden.man.sub.pagin.left=//input[contains(@id,'search-user-form1:prev-page')]