Author: vrockai
Date: 2009-07-23 09:14:28 -0400 (Thu, 23 Jul 2009)
New Revision: 13597
Modified:
branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/WSRPTestCase.java
branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/assert.properties
branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/locator.properties
branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/EndtoEndPortalAdminTestCase.java
Log:
[selenium] - several fixes
Modified:
branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/WSRPTestCase.java
===================================================================
---
branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/WSRPTestCase.java 2009-07-23
09:25:11 UTC (rev 13596)
+++
branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/WSRPTestCase.java 2009-07-23
13:14:28 UTC (rev 13597)
@@ -441,32 +441,13 @@
}
/**
- * Tests the input validation properties of WSRP producers part of JBP. The
- * test is navigated into producers part of WSRP interface. The XSS string
- * is typed in registration policy input and after clicking save, is it
- * asserted, that the validation error message is present. The XSS string is
- * typed in "Registration property validator class name" input and after
- * clicking save, is it asserted, that the validation error message is
- * present. Valid inputs are saved to three inputs of
+ * Valid inputs are saved to three inputs of
* "registration properties" and they are saved. Then in three steps each of
* this input is filled with the XSS string and after clicking save it is
* asserted, that the validation error message is present.
*/
- @Test(enabled = true, groups = {"XSS"})
- public void testXssProducerManage() {
-
- goToProducers();
- selenium.type("//input[contains(@id,'producer-form:registrationPolicy')]",
XSS_STR1);
- selenium.click(SUB_PROD_SAVE);
- selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertTrue(selenium.isTextPresent(MSG_PROP_REGPOL_VALID),"validation error
message missing or other than expected.");
-
- goToProducers();
- selenium.type("//input[contains(@id,'producer-form:validator')]",
XSS_STR1);
- selenium.click(SUB_PROD_SAVE);
- selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertTrue(selenium.isTextPresent(MSG_PROP_REGPROP_VALID),"validation error
message missing or other than expected.");
-
+ @Test(enabled = true, dependsOnMethods={"testConfigureProducer"})
+ public void testXssProducerProperties() {
goToWSRP();
clickIfVisible(ID_LINK_PRODCONF);
@@ -506,6 +487,33 @@
selenium.click(SUB_PROD_SAVE);
selenium.waitForPageToLoad(PAGE_LOAD);
Assert.assertTrue(selenium.isTextPresent(MSG_PROD_HINT_VALID),"validation error
message missing or other than expected.");
+
+ }
+
+ /**
+ * Tests the input validation properties of WSRP producers part of JBP. The
+ * test is navigated into producers part of WSRP interface. The XSS string
+ * is typed in registration policy input and after clicking save, is it
+ * asserted, that the validation error message is present. The XSS string is
+ * typed in "Registration property validator class name" input and after
+ * clicking save, is it asserted, that the validation error message is
+ * present.
+ */
+ @Test(enabled = true, dependsOnMethods={"testConfigureProducer"})
+ public void testXssProducerClassNames() {
+
+ goToProducers();
+ selenium.type("//input[contains(@id,'producer-form:registrationPolicy')]",
XSS_STR1);
+ selenium.click(SUB_PROD_SAVE);
+ selenium.waitForPageToLoad(PAGE_LOAD);
+ Assert.assertTrue(selenium.isTextPresent(MSG_PROP_REGPOL_VALID),"validation error
message missing or other than expected.");
+
+ goToProducers();
+ selenium.type("//input[contains(@id,'producer-form:validator')]",
XSS_STR1);
+ selenium.click(SUB_PROD_SAVE);
+ selenium.waitForPageToLoad(PAGE_LOAD);
+ Assert.assertTrue(selenium.isTextPresent(MSG_PROP_REGPROP_VALID),"validation error
message missing or other than expected.");
+
}
Modified:
branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/assert.properties
===================================================================
---
branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/assert.properties 2009-07-23
09:25:11 UTC (rev 13596)
+++
branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/assert.properties 2009-07-23
13:14:28 UTC (rev 13597)
@@ -9,10 +9,10 @@
iden.man.chk.role=Create new role
cms.sec.denied=Access Denied
-cms.dir.msg.inv.desc=A value below is invalid
-cms.file.msg.val.invalid.filename=A value below is invalid
-cms.file.msg.val.invalid.title=A value below is invalid
-cms.file.msg.val.invalid.desc=A value below is invalid
+cms.dir.msg.inv.desc=A value below was invalid
+cms.file.msg.val.invalid.filename=A value below was invalid
+cms.file.msg.val.invalid.title=A value below was invalid
+cms.file.msg.val.invalid.desc=A value below was invalid
test.wsrp.msg.cons.add.valid=is not a valid URL
Modified:
branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/locator.properties
===================================================================
---
branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/locator.properties 2009-07-23
09:25:11 UTC (rev 13596)
+++
branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/locator.properties 2009-07-23
13:14:28 UTC (rev 13597)
@@ -356,13 +356,13 @@
portal.port.ins.link.20.page=link=20
portal.port.ins.link.pref.welcomeport=//a[contains(@id,'security-JSPPortletInstance')]
portal.port.ins.table.pref.key=//form[contains(@id,'common-edit-pref-form')]/table
-portal.port.ins.submit.pref.delete=//input[contains(@id,'common-edit-exisiting-form:row_0')]
+portal.port.ins.submit.pref.delete=//input[contains(@id,'common-edit-existing-form:row_0')]
portal.port.ins.link.pref.guestnum=//a[contains(@id,'common-edit-pref-form:pref-link-0')]
portal.port.ins.input.pref.newval=//input[contains(@id,'common-append-form:new_value')]
portal.port.ins.submit.pref.update=//input[contains(@id,'common-append-form:append-button')]
portal.port.ins.submit.pref.save=//input[contains(@id,':save')]
-portal.port.ins.input.pref.update=//input[contains(@id,'common-edit-exisiting-form:update')]
-portal.port.ins.input.pref.append=//input[contains(@id,'common-edit-exisiting-form:pref-input-0')]
+portal.port.ins.input.pref.update=//input[contains(@id,'common-edit-existing-form:update')]
+portal.port.ins.input.pref.append=//input[contains(@id,'common-edit-existing-form:pref-input-0')]
portal.port.ins.submit.pref.cancel=//input[contains(@id,':cancel')]
portal.port.ins.link.curuser.preferences=//a[contains(@id,'instances-form:preference-CurrentUsersPortletInstance')]
portal.port.ins.link.del.exceptport=//a[contains(@id,'instances-form:delete-GoogleMapPortletInstance')]
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-07-23
09:25:11 UTC (rev 13596)
+++
branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/EndtoEndPortalAdminTestCase.java 2009-07-23
13:14:28 UTC (rev 13597)
@@ -403,7 +403,7 @@
goToProperties();
// add original drag and drop
- selenium.setSpeed("5000");
+ //selenium.setSpeed("5000");
selectIfNotSelected(SEL_PREDEF_PROP, "Drag and drop");
selenium.click(SUB_POR_PROPERTY);
selenium.waitForPageToLoad(PAGE_LOAD);