Author: vrockai
Date: 2009-03-20 12:16:17 -0400 (Fri, 20 Mar 2009)
New Revision: 13058
Modified:
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/EndToEndBeaPortlet.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/JBossPortalSeleniumTestCase.java
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/portal/PageCoordinationTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/testng.xml
Log:
coordination screenshoting
Modified:
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/EndToEndBeaPortlet.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/EndToEndBeaPortlet.java 2009-03-20
12:29:45 UTC (rev 13057)
+++
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/EndToEndBeaPortlet.java 2009-03-20
16:16:17 UTC (rev 13058)
@@ -183,7 +183,7 @@
selenium.click(MessageFormat.format(T_LINK_CREATE,r-1));
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.setSpeed("5555");
+ //selenium.setSpeed("5555");
selenium.type(INPUT_INSTANCE_NAME, insName);
selenium.click(SUBMIT_CREATE_INST);
selenium.waitForPageToLoad(PAGE_LOAD);
Modified:
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/JBossPortalSeleniumTestCase.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/JBossPortalSeleniumTestCase.java 2009-03-20
12:29:45 UTC (rev 13057)
+++
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/JBossPortalSeleniumTestCase.java 2009-03-20
16:16:17 UTC (rev 13058)
@@ -38,9 +38,13 @@
protected Selenium selenium;
// Generic timeout in miliseconds
- protected static final String PAGE_LOAD = "2400000";
- protected static final long AJAX_LOAD = 3000;
+ //protected static final String PAGE_LOAD = "2400000";
+ //protected static final long AJAX_LOAD = 3000;
+ protected static final String PAGE_LOAD = "60000";
+ protected static final long AJAX_LOAD = 2000;
+
+
// Element timeout in seconds
protected static final int ELEM_TIMEOUT = 220;
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-03-20
12:29:45 UTC (rev 13057)
+++
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/locator.properties 2009-03-20
16:16:17 UTC (rev 13058)
@@ -485,7 +485,7 @@
samples.js.lab.c=label=C
samples.js.lab.b=label=B
samples.js.lab.a=label=A
-samples.js.sel.letter=//select[@onclick=\"document.getElementById('jbpnsFormAutoSubmitPortletWindowsnpbj_the_form').submit()\"]
+samples.js.sel.letter=//div[2]/div/div/div[2]/div[2]/div/table/tbody/tr[2]/td[2]/div/form/select
samples.js.lnk=link=Javascript test
samples.head.inp.content=Introducing-HeaderContentInput
samples.head.div.content=Introducing-HeaderContent
@@ -580,7 +580,7 @@
samples.ajax.js.lab.c=label=C
samples.ajax.js.lab.b=label=B
samples.ajax.js.lab.a=label=A
-samples.ajax.js.sel.letter=//select[@onclick=\"document.getElementById('jbpnsFormAutoSubmitPortletWindowsnpbj_the_form').submit()\"]
+samples.ajax.js.sel.letter=//body/div[2]/div/div/div[2]/div[2]/div/div/div/div/table/tbody/tr[2]/td[2]/div/div/form/select
samples.ajax.js.lnk=//ul[@id='tabsHeader']/li[4]/ul/li[7]/a
samples.ajax.head.inp.content=Introducing-HeaderContentInput
samples.ajax.head.div.content=Introducing-HeaderContent
Modified:
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/PageCoordinationTestCase.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/PageCoordinationTestCase.java 2009-03-20
12:29:45 UTC (rev 13057)
+++
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/PageCoordinationTestCase.java 2009-03-20
16:16:17 UTC (rev 13058)
@@ -25,73 +25,14 @@
private final String LIS_RENDER_PAR =
"//select[contains(@id,'create-alias-form:alias')]";
public final String casePfx = "portal.admin.";
-
- private final String LNK_PP_PROP_DELETE =
getProp(casePfx+"lnk.pp.prop.delete","//a[contains(@id,''common-manage-prop-form:prop-data-table:{0}:delete'')]");
- private final String SUB_PP_PROPVAL_UPDATE =
getProp(casePfx+"sub.pp.propval.update","//input[contains(@id,'common-manage-prop-form:update')]");
- private final String INP_PP_PROP_VAL =
getProp(casePfx+"inp.pp.prop.val","//input[contains(@id,''common-manage-prop-form:prop-data-table:{0}:prop-value-input'')]");
- private final String SUB_PPA_FORM_UPDATE =
getProp(casePfx+"sub.ppa.form.update","//input[contains(@id,'common-edit-page-error-form:update')]");
- private final String INP_PPA_RES_SELECT =
getProp(casePfx+"inp.ppa.res.select","//input[contains(@id,'common-edit-page-error-form:page-res-select')]");
- private final String SEL_PPA_NF_SELECT =
getProp(casePfx+"sel.ppa.nf.select","//select[contains(@id,'common-edit-page-error-form:page-not-found-select')]");
- private final String SEL_PPA_INTERNAL_SELECT =
getProp(casePfx+"sel.ppa.internal.select","//select[contains(@id,'common-edit-page-error-form:page-internal-select')]");
- private final String SEL_PPA_ERROR_SELECT =
getProp(casePfx+"sel.ppa.error.select","//select[contains(@id,'common-edit-page-error-form:page-error-select')]");
- private final String SEL_PPA_CONTROL_SELECT =
getProp(casePfx+"sel.ppa.control.select","//select[contains(@id,'common-edit-page-error-form:page-control-select')]");
- private final String SEL_PPA_ACCESS_SELECT =
getProp(casePfx+"sel.ppa.access.select","//select[contains(@id,'common-edit-page-error-form:page-access-select')]");
- private final String CHK_PPA_RES_CHECK =
getProp(casePfx+"chk.ppa.res.check","//input[contains(@id,'common-edit-page-error-form:page-res-check')]");
- private final String CHK_PPA_NF_CHECK =
getProp(casePfx+"chk.ppa.nf.check","//input[contains(@id,'common-edit-page-error-form:page-not-found-check')]");
- private final String CHK_PPA_INTERNAL_CHECK =
getProp(casePfx+"chk.ppa.internal.check","//input[contains(@id,'common-edit-page-error-form:page-internal-check')]");
- private final String CHK_PPA_ERROR_CHECK =
getProp(casePfx+"chk.ppa.error.check","//input[contains(@id,'common-edit-page-error-form:page-error-check')]");
- private final String CHK_PPA_CONTROL_CHECK =
getProp(casePfx+"chk.ppa.control.check","//input[contains(@id,'common-edit-page-error-form:page-control-check')]");
- private final String CHK_PPA_ACCESS_CHECK =
getProp(casePfx+"chk.ppa.access.check","//input[contains(@id,'common-edit-page-error-form:page-access-check')]");
- private final String SUB_PP_ERROR_FORM_UPDATE =
getProp(casePfx+"sub.pp.error.form.update","//input[contains(@id,'common-edit-portal-error-form:update')]");
- private final String INP_PP_RES_INPUT =
getProp(casePfx+"inp.pp.res.input","//input[contains(@id,'common-edit-portal-error-form:portal-res-input')]");
- private final String SEL_PP_NF_SELECT =
getProp(casePfx+"sel.pp.nf.select","//select[contains(@id,'common-edit-portal-error-form:portal-not-found-select')]");
- private final String SEL_PP_INTERNAL_SELECT =
getProp(casePfx+"sel.pp.internal.select","//select[contains(@id,'common-edit-portal-error-form:portal-internal-select')]");
- private final String SEL_PP_ERROR_SELECT =
getProp(casePfx+"sel.pp.error.select","//select[contains(@id,'common-edit-portal-error-form:portal-error-select')]");
- private final String SEL_PP_UNAVAIL_SELECT =
getProp(casePfx+"sel.pp.unavail.select","//select[contains(@id,'common-edit-portal-error-form:portal-unavail-select')]");
- private final String SEL_PP_ACCESS_SELECT =
getProp(casePfx+"sel.pp.access.select","//select[contains(@id,'common-edit-portal-error-form:portal-access-select')]");
- private final String CHK_PP_RES_CHECK =
getProp(casePfx+"chk.pp.res.check","//input[contains(@id,'common-edit-portal-error-form:portal-res-check')]");
- private final String CHK_PP_NF_CHECK =
getProp(casePfx+"chk.pp.nf.check","//input[contains(@id,'common-edit-portal-error-form:portal-not-found-check')]");
- private final String CHK_PP_INTERNAL_CHECK =
getProp(casePfx+"chk.pp.internal.check","//input[contains(@id,'common-edit-portal-error-form:portal-internal-check')]");
- private final String CHK_PP_ERROR_CHECK =
getProp(casePfx+"chk.pp.error.check","//input[contains(@id,'common-edit-portal-error-form:portal-error-check')]");
- private final String CHK_PP_ACCESS_CHECK =
getProp(casePfx+"chk.pp.access.check","//input[contains(@id,'common-edit-portal-error-form:portal-access-check')]");
- private final String CHK_PP_UNAVAIL_CHECK =
getProp(casePfx+"chk.pp.unavail.check","//input[contains(@id,'common-edit-portal-error-form:portal-unavail-check')]");
- private final String SUB_PP_PROPADD =
getProp(casePfx+"sub.pp.propadd","//input[contains(@id,'common-edit-prop-form:add-property')]");
- private final String INP_PP_PROPNAME =
getProp(casePfx+"inp.pp.propname","//input[contains(@id,'common-edit-prop-form:property')]");
- private final String SUB_PP_LISTENER =
getProp(casePfx+"sub.pp.listener","//input[contains(@id,'edit-prop-form:update')]");
- private final String SEL_PP_LISTENER =
getProp(casePfx+"sel.pp.listener","//select[contains(@id,'edit-prop-form:listener')]");
- private final String TBL_PP_PROPS =
getProp(casePfx+"tbl.pp.props","//table[contains(@id,'common-manage-prop-form:prop-data-table')]");
-
- private final String SUB_LAYOUT_ADD_CENTER = getProp(casePfx +
"sub.layout.add.center",
"//input[contains(@id,'layoutForm:a_center')]");
- private final String INP_WINDOW_NAME = getProp(casePfx + "inp.window.name",
"//input[contains(@id,'windowForm:windowName')]");
- private final String SUBMIT_RENAME_PORTAL = getProp(casePfx +
"submit.rename.portal",
"//input[contains(@id,'renameForm:rename')]");
- private final String INPUT_RENAME_PORTAL = getProp(casePfx +
"input.rename.portal",
"//input[contains(@id,'renameForm:newName')]");
- private final String SUBMIT_DELETE_PORTAL_CONF = getProp(casePfx +
"submit.delete.portal.conf",
"//input[contains(@id,'delete-view:confirm-form:delete')]");
- private final String INPUT_SUBMIT_PAGECREATE = getProp(casePfx +
"input.submit.pagecreate",
"//input[contains(@id,'create-page-form:create-page')]");
- private final String INPUT_PAGENAME = getProp(casePfx + "input.pagename",
"//input[contains(@id,'create-page-form:pageName')]");
- private final String INPUT_PORTALNAME = getProp(casePfx + "input.portalname",
"//input[contains(@id,'create-portal-form:name')]");
- private final String INPUT_SUBMIT_CREATEPORTAL = getProp(casePfx +
"input.submit.createportal",
"//input[contains(@id,'create-portal-form:create-portal')]");
+
private final String TAB_PORTALOBJ_ID = getProp(casePfx + "tab.portalobj.id",
"Link=Admin");
private final String LINK_PORTALS_ID = getProp(casePfx + "link.portals.id",
"link=*Portal Objects*");
private final String LINK_PORTAL_HOME = getProp(casePfx + "link.portal.home",
"//a[contains(@id,'obj-temp-form:object-link-0')]");
private final String TABLE_PORTAL_ADMIN = getProp(casePfx +
"table.portal.admin",
"//table[contains(@id,'obj-nav-form:portal-datatable')]");
private final String POR_TL_MAIN = getProp(casePfx + "por.tl.main",
"//a[contains(@id,''obj-nav-form:portal-datatable:{0}:object-iid-link'')]");
- private final String POR_TL_SECURITY = getProp(casePfx + "por.tl.security",
"//a[contains(@id,''obj-nav-form:portal-datatable:{0}:security-link'')]");
- private final String POR_TL_PROPERTIES = getProp(casePfx +
"por.tl.properties",
"//a[contains(@id,''obj-nav-form:portal-datatable:{0}:prop-link'')]");
- private final String POR_TL_THEME = getProp(casePfx + "por.tl.theme",
"//a[contains(@id,''obj-nav-form:portal-datatable:{0}:theme-link'')]");
- private final String POR_TL_RENAME = getProp(casePfx + "por.tl.rename",
"//a[contains(@id,''obj-nav-form:portal-datatable:{0}:rename'')]");
- private final String POR_TL_DELETE = getProp(casePfx + "por.tl.delete",
"//a[contains(@id,''obj-nav-form:portal-datatable:{0}:delete'')]");
- private final String POR_TL_MAKEDEF = getProp(casePfx + "por.tl.makedef",
"//a[contains(@id,''obj-nav-form:portal-datatable:{0}:default-link'')]");
private final String TABLE_PORTALPAGE_ADMIN = getProp(casePfx +
"table.portalpage.admin",
"//table[contains(@id,'obj-nav-form:pages-datatable')]");
- private final String PAG_TL_MAIN = getProp(casePfx + "pag.tl.main",
"//a[contains(@id,''obj-nav-form:pages-datatable:{0}:object-link'')]");
- private final String PAG_TL_LAYOUT = getProp(casePfx + "pag.tl.layout",
"//a[contains(@id,''obj-nav-form:pages-datatable:{0}:edit-page-layout'')]");
- private final String PAG_TL_SECURITY = getProp(casePfx + "pag.tl.security",
"//a[contains(@id,''obj-nav-form:pages-datatable:{0}:security-link'')]");
- private final String PAG_TL_PROPERTIES = getProp(casePfx +
"pag.tl.properties",
"//a[contains(@id,''obj-nav-form:pages-datatable:{0}:prop-link'')]");
private final String PAG_TL_COORDINATION = getProp(casePfx + "pag.tl.coord",
"//a[contains(@id,''pages-datatable:{0}:edit-coord'')]");
- private final String PAG_TL_THEME = getProp(casePfx + "pag.tl.theme",
"//a[contains(@id,''obj-nav-form:pages-datatable:{0}:theme-link'')]");
- private final String PAG_TL_RENAME = getProp(casePfx + "pag.tl.rename",
"//a[contains(@id,''obj-nav-form:pages-datatable:{0}:rename-link'')]");
- private final String PAG_TL_DISPLAY = getProp(casePfx + "pag.tl.display",
"//a[contains(@id,''obj-nav-form:pages-datatable:{0}:rename-display'')]");
- private final String PAG_TL_DELETE = getProp(casePfx + "pag.tl.delete",
"//a[contains(@id,''obj-nav-form:pages-datatable:{0}:delete-link'')]");
- private final String PAG_TL_MAKEDEF = getProp(casePfx + "pag.tl.makedef",
"//a[contains(@id,''obj-nav-form:pages-datatable:{0}:default-link'')]");
@BeforeMethod(groups = { "log" })
public void loginBeforeTest() {
@@ -164,52 +105,64 @@
@Test(enabled = true, dependsOnMethods ={"testDefaultPageCoordination"})
public void testDeleteAlias(){
+ int count = 0;
String portalName = "default";
String pageName = "Coordination Samples";
openAndWait("/portal");
clickAndWait("link=Admin");
-
+ selenium.captureScreenshot(++count + ".jpg");
clickIfVisible(TAB_PORTALOBJ_ID);
+ selenium.captureScreenshot(++count + ".jpg");
clickIfVisible(LINK_PORTALS_ID);
+ selenium.captureScreenshot(++count + ".jpg");
clickIfVisible(LINK_PORTAL_HOME);
+ selenium.captureScreenshot(++count + ".jpg");
Assert.assertTrue(selenium.isTextPresent("Create a portal named:"));
int r = findTableRow(TABLE_PORTAL_ADMIN, portalName, 0) - 1;
clickAndWait(MessageFormat.format(POR_TL_MAIN, r));
-
+ selenium.captureScreenshot(++count + ".jpg");
r = findTableRow(TABLE_PORTALPAGE_ADMIN, pageName, 0) - 1;
clickAndWait(MessageFormat.format(PAG_TL_COORDINATION, r));
+ selenium.captureScreenshot(++count + ".jpg");
// selenium.setSpeed("5000");
// create delete alias
selenium.addSelection(LIS_RENDER_PAR,
"label={urn:jboss:portal:samples:coor}zipcode");
+
selenium.waitForPageToLoad(PAGE_LOAD);
+ selenium.captureScreenshot(++count + ".jpg");
selenium.type(INP_ALIAS_NAME, "aliasBindDelete");
selenium.click(SUB_CREATE_ALIAS);
selenium.waitForPageToLoad(PAGE_LOAD);
-
+ selenium.captureScreenshot(++count + ".jpg");
// delete alias
r = findTableRow(TBL_ALIASES, "aliasBindDelete", 0);
selenium.click(MessageFormat.format(LNK_T_ALIAS_DELETE,r));
+
selenium.waitForPageToLoad(PAGE_LOAD);
+ selenium.captureScreenshot(++count + ".jpg");
selenium.click(SUB_ALIAS_DEL_CANCEL);
selenium.waitForPageToLoad(PAGE_LOAD);
-
+ selenium.captureScreenshot(++count + ".jpg");
r = findTableRow(TBL_ALIASES, "aliasBindDelete", 0);
selenium.click(MessageFormat.format(LNK_T_ALIAS_DELETE,r));
selenium.waitForPageToLoad(PAGE_LOAD);
+ selenium.captureScreenshot(++count + ".jpg");
selenium.click(SUB_ALIAS_DEL_SUBMIT);
selenium.waitForPageToLoad(PAGE_LOAD);
-
+ selenium.captureScreenshot(++count + ".jpg");
openAndWait("/portal/auth/portal/default/Coordination+Samples?zip=222333");
+ selenium.captureScreenshot(++count + ".jpg");
Assert.assertTrue(selenium.isTextPresent("Weather for
(my_zipcode):222333"));
Assert.assertTrue(selenium.isTextPresent("Map for (your_zipcode):222333"));
openAndWait("/portal/auth/portal/default/Coordination+Samples?aliasBindDelete=222334");
+ selenium.captureScreenshot(++count + ".jpg");
Assert.assertTrue(selenium.isTextPresent("Weather for (my_zipcode):null"));
Assert.assertTrue(selenium.isTextPresent("Map for (your_zipcode):null"));
}
@@ -283,6 +236,7 @@
clickIfVisible(TAB_PORTALOBJ_ID);
clickIfVisible(LINK_PORTALS_ID);
clickIfVisible(LINK_PORTAL_HOME);
+
Assert.assertTrue(selenium.isTextPresent("Create a portal named:"));
int r = findTableRow(TABLE_PORTAL_ADMIN, portalName, 0) - 1;
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/testng.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/testng.xml 2009-03-20 12:29:45 UTC
(rev 13057)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/testng.xml 2009-03-20 16:16:17 UTC
(rev 13058)
@@ -82,12 +82,6 @@
<class
name="org.jboss.portal.test.selenium.cms.CMSFileUploadTestCase"></class></classes>
</test>
- <test name="org.jboss.portal.test.selenium.cms.CMSArchiveUploadTestCase"
- verbose="2" annotations="JDK">
- <classes>
- <class
name="org.jboss.portal.test.selenium.cms.CMSArchiveUploadTestCase"></class></classes>
- </test>
-
<test name="org.jboss.portal.test.selenium.CoordinationSamplesTestCase"
verbose="2" annotations="JDK">
<classes>
@@ -118,6 +112,12 @@
<class
name="org.jboss.portal.test.selenium.portal.EndtoEndPortalAdminTestCase"></class></classes>
</test>
+ <test name="org.jboss.portal.test.selenium.cms.CMSArchiveUploadTestCase"
+ verbose="2" annotations="JDK">
+ <classes>
+ <class
name="org.jboss.portal.test.selenium.cms.CMSArchiveUploadTestCase"></class></classes>
+ </test>
+
<listeners>
<!-- <listener
class-name="org.testng.reporters.JUnitXMLReporter"></listener> -->
<listener
class-name="org.jboss.portal.test.selenium.JBossSeleniumTestListener"/>