JBoss Portal SVN: r12940 - branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-server-war.
by portal-commits@lists.jboss.org
Author: wesleyhales
Date: 2009-03-04 10:31:13 -0500 (Wed, 04 Mar 2009)
New Revision: 12940
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-server-war/login.jsp
Log:
JBPORTAL-2227 - browser credential fix
Modified: branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-server-war/login.jsp
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-server-war/login.jsp 2009-03-04 12:54:06 UTC (rev 12939)
+++ branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-server-war/login.jsp 2009-03-04 15:31:13 UTC (rev 12940)
@@ -39,7 +39,7 @@
<link rel="stylesheet" href="/portal-core/css/login.css" type="text/css"/>
</head>
-<body onload="JBossPortal.login.setFocusOnLoginForm();JBossPortal.login.displayStatus();JBossPortal.login.validate();">
+<body onload="JBossPortal.login.setFocusOnLoginForm();JBossPortal.login.displayStatus();">
<div class="login-container">
@@ -91,5 +91,9 @@
</div>
</div>
+<script type="text/javascript">
+ //for browser saved credentials
+ setTimeout('JBossPortal.login.validate()',10);
+</script>
</body>
</html>
17 years, 2 months
JBoss Portal SVN: r12939 - in branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium: cms and 1 other directory.
by portal-commits@lists.jboss.org
Author: vrockai
Date: 2009-03-04 07:54:06 -0500 (Wed, 04 Mar 2009)
New Revision: 12939
Modified:
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileWorkflowTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/locator.properties
Log:
[JBPORTAL-2311] cms with workflow
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileWorkflowTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileWorkflowTestCase.java 2009-03-04 12:25:26 UTC (rev 12938)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileWorkflowTestCase.java 2009-03-04 12:54:06 UTC (rev 12939)
@@ -1,5 +1,7 @@
package org.jboss.portal.test.selenium.cms;
+import java.text.MessageFormat;
+
import org.jboss.portal.test.selenium.JBossPortalSeleniumTestCase;
import org.testng.Assert;
import org.testng.annotations.AfterMethod;
@@ -12,14 +14,35 @@
@Test(groups = { "cms_file_workflow" }, enabled = true)
public class CMSFileWorkflowTestCase extends JBossPortalSeleniumTestCase {
+
+ private static final String SUB_MOVE = "submit";
+
public final String casePfx = "cms.file.work.";
+ private final String LAB_LANG_CZECH = getProp(casePfx+"lab.lang.czech","label=Czech");
+ private final String LNK_DENY = getProp(casePfx+"lnk.deny","link=Deny");
+ private final String LNK_PREVIEW = getProp(casePfx+"lnk.preview","link=Preview");
+ private final String LNK_APPROVE = getProp(casePfx+"lnk.approve","link=Approve");
+ private final String SUB_FILE_CREATE = getProp(casePfx+"sub.file.create","save");
+ private final String SUB_FILE_CREATE_CANCEL = getProp(casePfx+"sub.file.create.cancel","cancel");
+ private final String SEL_LANG = getProp(casePfx+"sel.lang","language");
+ private final String INP_TITLE = getProp(casePfx+"inp.title","title");
+ private final String INP_DESC = getProp(casePfx+"inp.desc","description");
+ private final String INP_FILENAME = getProp(casePfx+"inp.filename","filename");
+ private final String LAB_CREATE_FILE = getProp(casePfx+"lab.create.file","label=Create File");
+ private final String LNK_CMS = getProp(casePfx+"lnk.cms","link=CMS");
+ private final String LNK_ADMIN = getProp(casePfx+"lnk.admin","link=Admin");
+
public final String SELECT_CMS_MAIN = getProp(casePfx+"select.cms.main","//div[@id='center']/div/div/div[1]/div/select");
public final String CMS_FILE_TABLE = getProp(casePfx+"cms.file.table","//div[@id='center']/div/div/div[3]/table");
+
+ public final String CMS_T_SELECT = getProp(casePfx+"cms.t.select","//div[@id=''center'']/div/div/div[3]/table/tbody/tr[{0}]/td[2]/form/select");
+ public final String CMS_T_SUBMIT = getProp(casePfx+"cms.t.submit","//div[@id=''center'']/div/div/div[3]/table/tbody/tr[{0}]/td[2]/form/input");
+
public final String CMS_WF_TABLE = getProp(casePfx+"cms.wf.table","//div[@id='center']/div/div/table[2]");
public final String CMS_FV_TABLE = getProp(casePfx+"cms.fv.table","//div[@id='center']/div/div/table");
+ public final String CMS_T_VER = getProp(casePfx+"cms.t.ver","//div[@id=''center'']/div/div/table/tbody/tr[{0}]/td[1]/a");
public final String WYSIWYG_EDITOR_LOCATOR = getProp(casePfx+"wysiwyg.editor.locator","mce_editor_0");
-
@BeforeMethod(groups = { "log" })
public void loginBeforeTest() {
@@ -37,50 +60,50 @@
// canceling first
- selenium.click("link=Admin");
+ selenium.click(LNK_ADMIN);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=CMS");
+ selenium.click(LNK_CMS);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.select(SELECT_CMS_MAIN, "label=Create File");
+ selenium.select(SELECT_CMS_MAIN, LAB_CREATE_FILE);
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.waitForPopUp("_top", PAGE_LOAD);
- selenium.type("filename", "newFile");
- selenium.type("description", "newFile description");
- selenium.type("title", "newFile title");
- selenium.select("language", "label=Czech");
+ selenium.type(INP_FILENAME, "newFile");
+ selenium.type(INP_DESC, "newFile description");
+ selenium.type(INP_TITLE, "newFile title");
+ selenium.select(SEL_LANG, LAB_LANG_CZECH);
- selenium.click("cancel");
+ selenium.click(SUB_FILE_CREATE_CANCEL);
selenium.waitForPageToLoad(PAGE_LOAD);
// saving
selenium.open(ADDR_PORTAL);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=Admin");
+ selenium.click(LNK_ADMIN);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=CMS");
+ selenium.click(LNK_CMS);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.select(SELECT_CMS_MAIN, "label=Create File");
+ selenium.select(SELECT_CMS_MAIN, LAB_CREATE_FILE);
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.waitForPopUp("_top", PAGE_LOAD);
- selenium.type("filename", "newFile");
- selenium.type("description", "newFile description");
- selenium.type("title", "newFile title");
- selenium.select("language", "label=Czech");
+ selenium.type(INP_FILENAME, "newFile");
+ selenium.type(INP_DESC, "newFile description");
+ selenium.type(INP_TITLE, "newFile title");
+ selenium.select(SEL_LANG, LAB_LANG_CZECH);
- selenium.click("save");
+ selenium.click(SUB_FILE_CREATE);
selenium.waitForPageToLoad(PAGE_LOAD);
int row = countTableRows(CMS_WF_TABLE) - 1;
Assert.assertEquals(row, 1, "More instances of newly created document exists.");
Assert.assertTrue(selenium.isTextPresent("Pending Approval Queue"));
- Assert.assertTrue(selenium.isElementPresent("link=Preview"));
- Assert.assertTrue(selenium.isElementPresent("link=Approve"));
- Assert.assertTrue(selenium.isElementPresent("link=Deny"));
+ Assert.assertTrue(selenium.isElementPresent(LNK_PREVIEW));
+ Assert.assertTrue(selenium.isElementPresent(LNK_APPROVE));
+ Assert.assertTrue(selenium.isElementPresent(LNK_DENY));
- selenium.click("link=Approve");
+ selenium.click(LNK_APPROVE);
selenium.waitForPageToLoad(PAGE_LOAD);
row = countTableRows(CMS_FV_TABLE) - 1;
@@ -90,29 +113,29 @@
@Test(enabled = true, description = "Simple file creation.")
public void testCreateFileDeny() {
- selenium.click("link=Admin");
+ selenium.click(LNK_ADMIN);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=CMS");
+ selenium.click(LNK_CMS);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.select(SELECT_CMS_MAIN, "label=Create File");
+ selenium.select(SELECT_CMS_MAIN, LAB_CREATE_FILE);
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.waitForPopUp("_top", PAGE_LOAD);
- selenium.type("filename", "newFileDeny");
- selenium.type("description", "newFileDeny description");
- selenium.type("title", "newFileDeny title");
- selenium.select("language", "label=Czech");
- selenium.click("save");
+ selenium.type(INP_FILENAME, "newFileDeny");
+ selenium.type(INP_DESC, "newFileDeny description");
+ selenium.type(INP_TITLE, "newFileDeny title");
+ selenium.select(SEL_LANG, LAB_LANG_CZECH);
+ selenium.click(SUB_FILE_CREATE);
selenium.waitForPageToLoad(PAGE_LOAD);
int row = countTableRows(CMS_WF_TABLE) - 1;
Assert.assertEquals(row, 1, "More instances of newly created document exists.");
Assert.assertTrue(selenium.isTextPresent("Pending Approval Queue"));
- Assert.assertTrue(selenium.isElementPresent("link=Preview"));
- Assert.assertTrue(selenium.isElementPresent("link=Approve"));
- Assert.assertTrue(selenium.isElementPresent("link=Deny"));
+ Assert.assertTrue(selenium.isElementPresent(LNK_PREVIEW));
+ Assert.assertTrue(selenium.isElementPresent(LNK_APPROVE));
+ Assert.assertTrue(selenium.isElementPresent(LNK_DENY));
- selenium.click("link=Deny");
+ selenium.click(LNK_DENY);
selenium.waitForPageToLoad(PAGE_LOAD);
Assert.assertFalse(selenium.isTextPresent("newFileDeny"));
@@ -124,24 +147,24 @@
selenium.open(ADDR_PORTAL);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=Admin");
+ selenium.click(LNK_ADMIN);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=CMS");
+ selenium.click(LNK_CMS);
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click("link=Home");
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.select(SELECT_CMS_MAIN, "label=Create File");
+ selenium.select(SELECT_CMS_MAIN, LAB_CREATE_FILE);
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.waitForPopUp("_top", PAGE_LOAD);
- selenium.type("filename", name);
- selenium.type("description", name + " description");
- selenium.type("title", "existingFile title");
- selenium.select("language", "label=Czech");
+ selenium.type(INP_FILENAME, name);
+ selenium.type(INP_DESC, name + " description");
+ selenium.type(INP_TITLE, "existingFile title");
+ selenium.select(SEL_LANG, LAB_LANG_CZECH);
fillInEditor("vivat!");
- selenium.click("save");
+ selenium.click(SUB_FILE_CREATE);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=Preview");
+ selenium.click(LNK_PREVIEW);
selenium.waitForPageToLoad(PAGE_LOAD);
Assert.assertTrue(selenium.isTextPresent("Pending Approval Queue"));
@@ -151,36 +174,35 @@
@Test(enabled = true, dependsOnMethods = "testCreateFileApprove", description = "Simple file delete Cancel in first step, and then delete.")
public void testDeleteFile() {
- selenium.click("link=Admin");
+ selenium.click(LNK_ADMIN);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=CMS");
+ selenium.click(LNK_CMS);
selenium.waitForPageToLoad(PAGE_LOAD);
int row = findTableRow(CMS_FILE_TABLE, "newFile", 0) + 1;
- selenium.select("//div[@id='center']/div/div/div[3]/table/tbody/tr["+row+"]/td[2]/form/select", "label=Delete");
- selenium.click("//div[@id='center']/div/div/div[3]/table/tbody/tr["+row+"]/td[2]/form/select/option[4]");
- selenium.click("//div[@id='center']/div/div/div[3]/table/tbody/tr["+row+"]/td[2]/form/input");
+ selenium.select(MessageFormat.format(CMS_T_SELECT,row), "label=Delete");
+ selenium.click(MessageFormat.format(CMS_T_SUBMIT,row));
selenium.waitForPageToLoad(PAGE_LOAD);
Assert.assertTrue(selenium.isTextPresent("Confirm Deletion of /newFile"));
Assert.assertTrue(selenium.isTextPresent("WARNING! You will not be able to undo these change!"));
Assert.assertTrue(selenium.isTextPresent("Are you sure you want to delete this resource?"));
- selenium.click("cancel");
+ selenium.click(SUB_FILE_CREATE_CANCEL);
selenium.waitForPageToLoad(PAGE_LOAD);
row = findTableRow(CMS_FILE_TABLE, "newFile", 0) + 1;
- selenium.select(CMS_FILE_TABLE + "/tbody/tr["+row+"]/td[2]/form/select", "label=Delete");
- selenium.click(CMS_FILE_TABLE + "/tbody/tr["+row+"]/td[2]/form/select/option[4]");
- selenium.click(CMS_FILE_TABLE + "/tbody/tr["+row+"]/td[2]/form/input");
+ selenium.select(MessageFormat.format(CMS_T_SELECT,row), "label=Delete");
+ selenium.click(MessageFormat.format(CMS_T_SUBMIT,row));
+
selenium.waitForPageToLoad(PAGE_LOAD);
Assert.assertTrue(selenium.isTextPresent("Confirm Deletion of /newFile"));
Assert.assertTrue(selenium.isTextPresent("WARNING! You will not be able to undo these change!"));
Assert.assertTrue(selenium.isTextPresent("Are you sure you want to delete this resource?"));
- selenium.click("submit");
+ selenium.click(SUB_MOVE);
selenium.waitForPageToLoad(PAGE_LOAD);
}
@@ -190,18 +212,17 @@
//canceling first
- selenium.click("link=Admin");
+ selenium.click(LNK_ADMIN);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=CMS");
+ selenium.click(LNK_CMS);
selenium.waitForPageToLoad(PAGE_LOAD);
int row = findTableRow(CMS_FILE_TABLE, "fileToMove", 0) + 1;
-
- selenium.select(CMS_FILE_TABLE + "/tbody/tr[" + row + "]/td[2]/form/select", "label=Move");
- selenium.click(CMS_FILE_TABLE + "/tbody/tr[" + row + "]/td[2]/form/select/option[3]");
- selenium.click(CMS_FILE_TABLE + "/tbody/tr[" + row + "]/td[2]/form/input");
+ ;
+ selenium.select(MessageFormat.format(CMS_T_SELECT,row), "label=Move");
+ selenium.click(MessageFormat.format(CMS_T_SUBMIT,row));
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click("link=default");
- selenium.click("cancel");
+ selenium.click(SUB_FILE_CREATE_CANCEL);
selenium.waitForPageToLoad(PAGE_LOAD);
// assuming file is not moved
@@ -219,18 +240,17 @@
// really moving file
selenium.open(ADDR_PORTAL);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=Admin");
+ selenium.click(LNK_ADMIN);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=CMS");
+ selenium.click(LNK_CMS);
selenium.waitForPageToLoad(PAGE_LOAD);
row = findTableRow(CMS_FILE_TABLE, "fileToMove", 0) + 1;
- selenium.select(CMS_FILE_TABLE + "/tbody/tr[" + row + "]/td[2]/form/select", "label=Move");
- selenium.click(CMS_FILE_TABLE + "/tbody/tr[" + row + "]/td[2]/form/select/option[3]");
- selenium.click(CMS_FILE_TABLE + "/tbody/tr[" + row + "]/td[2]/form/input");
+ selenium.select(MessageFormat.format(CMS_T_SELECT,row), "label=Move");
+ selenium.click(MessageFormat.format(CMS_T_SUBMIT,row));
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click("link=default");
- selenium.click("submit");
+ selenium.click(SUB_MOVE);
selenium.waitForPageToLoad(PAGE_LOAD);
// assuming file is moved
@@ -249,18 +269,17 @@
@Test(enabled = true, dependsOnMethods = "testCreateFileApprove", description = "File creation and copying to default directory.")
public void testCopyFile() {
createFile("file2copy","");
- selenium.click("link=Admin");
+ selenium.click(LNK_ADMIN);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=CMS");
+ selenium.click(LNK_CMS);
selenium.waitForPageToLoad(PAGE_LOAD);
int row = findTableRow(CMS_FILE_TABLE, "file2copy", 0) + 1;
- selenium.select(CMS_FILE_TABLE + "/tbody/tr[" + row + "]/td[2]/form/select", "label=Copy");
- selenium.click(CMS_FILE_TABLE + "/tbody/tr[" + row + "]/td[2]/form/select/option[3]");
- selenium.click(CMS_FILE_TABLE + "/tbody/tr[" + row + "]/td[2]/form/input");
+ selenium.select(MessageFormat.format(CMS_T_SELECT,row), "label=Copy");
+ selenium.click(MessageFormat.format(CMS_T_SUBMIT,row));
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click("link=default");
- selenium.click("submit");
+ selenium.click(SUB_MOVE);
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click("link=default");
selenium.waitForPageToLoad(PAGE_LOAD);
@@ -283,27 +302,27 @@
// canceling for the first time
- selenium.click("link=Admin");
+ selenium.click(LNK_ADMIN);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=CMS");
+ selenium.click(LNK_CMS);
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click("link="+file);
selenium.waitForPageToLoad(PAGE_LOAD);
row = findTableRow(CMS_FV_TABLE, "1.1", 2) + 1;
- selenium.click(CMS_FV_TABLE + "/tbody/tr["+row+"]/td[1]/a");
+ selenium.click(MessageFormat.format(CMS_T_VER, row));
selenium.waitForPageToLoad(PAGE_LOAD);
fillInEditor("contentstring2");
- selenium.click("cancel");
+ selenium.click(SUB_FILE_CREATE_CANCEL);
selenium.waitForPageToLoad(PAGE_LOAD);
// really creating and approving
selenium.open(ADDR_PORTAL);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=Admin");
+ selenium.click(LNK_ADMIN);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=CMS");
+ selenium.click(LNK_CMS);
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click("link=Home");
selenium.waitForPageToLoad(PAGE_LOAD);
@@ -312,29 +331,29 @@
selenium.waitForPageToLoad(PAGE_LOAD);
row = findTableRow(CMS_FV_TABLE, "1.1", 2) + 1;
- selenium.click(CMS_FV_TABLE + "/tbody/tr["+row+"]/td[1]/a");
+ selenium.click(MessageFormat.format(CMS_T_VER, row));
selenium.waitForPageToLoad(PAGE_LOAD);
fillInEditor("contentstring2");
- selenium.click("save");
+ selenium.click(SUB_FILE_CREATE);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=Approve");
+ selenium.click(LNK_APPROVE);
selenium.waitForPageToLoad(PAGE_LOAD);
row = findTableRow(CMS_FV_TABLE, "1.3", 2) + 1;
- selenium.click(CMS_FV_TABLE + "/tbody/tr["+row+"]/td[1]/a");
+ selenium.click(MessageFormat.format(CMS_T_VER, row));
selenium.waitForPageToLoad(PAGE_LOAD);
fillInEditor("contentstring3");
- selenium.click("save");
+ selenium.click(SUB_FILE_CREATE);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=Deny");
+ selenium.click(LNK_DENY);
selenium.waitForPageToLoad(PAGE_LOAD);
Assert.assertFalse(selenium.isTextPresent("1.5"));
row = findTableRow(CMS_FV_TABLE, "1.3", 2) + 1;
- selenium.click(CMS_FV_TABLE + "/tbody/tr["+row+"]/td[1]/a");
+ selenium.click(MessageFormat.format(CMS_T_VER, row));
selenium.waitForPageToLoad(PAGE_LOAD);
Assert.assertTrue(selenium.isTextPresent("contentstring2"));
@@ -346,24 +365,24 @@
// save and approve
selenium.open(ADDR_PORTAL);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=Admin");
+ selenium.click(LNK_ADMIN);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=CMS");
+ selenium.click(LNK_CMS);
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click("link=Home");
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.select(SELECT_CMS_MAIN, "label=Create File");
+ selenium.select(SELECT_CMS_MAIN, LAB_CREATE_FILE);
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.waitForPopUp("_top", PAGE_LOAD);
- selenium.type("filename", name);
- selenium.type("description", name + " description");
- selenium.type("title", "existingFile title");
- selenium.select("language", "label=Czech");
+ selenium.type(INP_FILENAME, name);
+ selenium.type(INP_DESC, name + " description");
+ selenium.type(INP_TITLE, "existingFile title");
+ selenium.select(SEL_LANG, LAB_LANG_CZECH);
- selenium.click("save");
+ selenium.click(SUB_FILE_CREATE);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=Approve");
+ selenium.click(LNK_APPROVE);
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click("link=Home");
selenium.waitForPageToLoad(PAGE_LOAD);
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-04 12:25:26 UTC (rev 12938)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/locator.properties 2009-03-04 12:54:06 UTC (rev 12939)
@@ -173,10 +173,26 @@
# CMSFileWorkflowTestCase
+cms.file.work.lab.lang.czech=label=Czech
+cms.file.work.lnk.deny=link=Deny
+cms.file.work.lnk.preview=link=Preview
+cms.file.work.lnk.approve=link=Approve
+cms.file.work.sub.file.create=save
+cms.file.work.sub.file.create.cancel=cancel
+cms.file.work.sel.lang=language
+cms.file.work.inp.title=title
+cms.file.work.inp.desc=description
+cms.file.work.inp.filename=filename
+cms.file.work.lab.create.file=label=Create File
+cms.file.work.lnk.cms=link=CMS
+cms.file.work.lnk.admin=link=Admin
cms.file.work.select.cms.main=//div[@id='center']/div/div/div[1]/div/select
cms.file.work.cms.file.table=//div[@id='center']/div/div/div[3]/table
+cms.file.work.cms.t.select=//div[@id=''center'']/div/div/div[3]/table/tbody/tr[{0}]/td[2]/form/select
+cms.file.work.cms.t.submit=//div[@id=''center'']/div/div/div[3]/table/tbody/tr[{0}]/td[2]/form/input
cms.file.work.cms.wf.table=//div[@id='center']/div/div/table[2]
cms.file.work.cms.fv.table=//div[@id='center']/div/div/table
+cms.file.work.cms.t.ver=//div[@id=''center'']/div/div/table/tbody/tr[{0}]/td[1]/a
cms.file.work.wysiwyg.editor.locator=mce_editor_0
# CMSSecureTestCase
17 years, 2 months
JBoss Portal SVN: r12938 - in tags/JBoss_Portal_2_7_2/core/src: bin/portal-core-war/js and 3 other directories.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2009-03-04 07:25:26 -0500 (Wed, 04 Mar 2009)
New Revision: 12938
Added:
tags/JBoss_Portal_2_7_2/core/src/bin/portal-core-war/js/login.js
Modified:
tags/JBoss_Portal_2_7_2/core/src/bin/portal-core-war/css/login.css
tags/JBoss_Portal_2_7_2/core/src/main/org/jboss/portal/core/controller/ajax/AjaxResponseHandler.java
tags/JBoss_Portal_2_7_2/core/src/main/org/jboss/portal/core/model/portal/PortalObjectPath.java
tags/JBoss_Portal_2_7_2/core/src/resources/portal-server-war/login.jsp
Log:
Modified: tags/JBoss_Portal_2_7_2/core/src/bin/portal-core-war/css/login.css
===================================================================
--- tags/JBoss_Portal_2_7_2/core/src/bin/portal-core-war/css/login.css 2009-03-04 11:37:55 UTC (rev 12937)
+++ tags/JBoss_Portal_2_7_2/core/src/bin/portal-core-war/css/login.css 2009-03-04 12:25:26 UTC (rev 12938)
@@ -20,6 +20,17 @@
position: absolute;
}
+input.disabled-button {
+ background-color: #9db3cf;
+ border-color: #c5d7df #8598ab #8598ab #c5d7df;
+ border-style: solid;
+ border-width: 1px;
+ color: #FFFFFF;
+ font-size: 10px;
+ font-weight: bold;
+ position: absolute;
+}
+
input.login-button {
bottom: 25px;
right: 90px;
@@ -53,12 +64,12 @@
}
div.login-container div.login-content {
- background-image: url( ../images/modal/login-content-bg.gif );
- background-position: top left;
- background-repeat: repeat-x;
+ background: url(../images/modal/login-content-bg.gif) repeat-x top left;
width: 255px;
font-weight: bold;
text-align: right;
+ padding: 0;
+
}
div.login-container div.login-content div.form-field {
@@ -79,4 +90,8 @@
div.button-container{
height: 50px;
position: relative;
+}
+
+div.form-field .highlight {
+ border: 2px solid #6a9cd4;
}
\ No newline at end of file
Copied: tags/JBoss_Portal_2_7_2/core/src/bin/portal-core-war/js/login.js (from rev 12932, branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/js/login.js)
===================================================================
--- tags/JBoss_Portal_2_7_2/core/src/bin/portal-core-war/js/login.js (rev 0)
+++ tags/JBoss_Portal_2_7_2/core/src/bin/portal-core-war/js/login.js 2009-03-04 12:25:26 UTC (rev 12938)
@@ -0,0 +1,131 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+
+if (typeof JBossPortal == 'undefined') {
+ var JBossPortal = {
+ login : { }
+ };
+}
+
+JBossPortal.login = function() {
+
+ //namespace login functions and variables
+ var isModal = true;
+
+ return{
+ /**
+ * Gets the current display status of the login box (modal or page) sets global variable and
+ * performs dynamic rendering options for login box
+ *
+ * @public
+ * @type Function
+ * @name displayStatus
+ * @return {void}
+ */
+ displayStatus : function() {
+ if (window.parent.frames.length >= 1)
+ {
+ //loaded as modal
+ }
+ else
+ {
+ isModal = false;
+ try
+ {
+ if (document.getElementById('login-content').scrollHeight > 0)
+ {
+ document.body.style.paddingTop = ((document.documentElement.clientHeight / 2) - document.getElementById('login-content').scrollHeight) + 'px';
+ }
+ }
+ catch(e)
+ {
+ //swallow
+ }
+ //give the cancel button back button functionality (hackish) but there is no other way
+ //to get returning page
+ document.getElementById('login-cancel').onclick = function()
+ {
+ self.history.go(-1);
+ };
+ document.getElementById('login-submit').style.right = '';
+ }
+ },
+
+ /**
+ * set focus on username
+ *
+ * @public
+ * @type Function
+ * @name setFocusOnLoginForm
+ * @return {void}
+ */
+ setFocusOnLoginForm : function() {
+ try
+ {
+ document.loginform.j_username.focus();
+ highlightField(document.getElementById('j_username'));
+ }
+ catch (e)
+ {
+ }
+
+ },
+
+ /**
+ * simple validate login fields and disable submit
+ *
+ * @public
+ * @type Function
+ * @name validate
+ * @return {void}
+ */
+ validate : function() {
+ try
+ {
+
+ if (document.getElementById('j_username').value.length < 1 || document.getElementById('j_password').value.length < 1){
+ document.getElementById('login-submit').disabled = true;
+ document.getElementById('login-submit').className = 'login-button disabled-button';
+ }else{
+ document.getElementById('login-submit').disabled = false;
+ document.getElementById('login-submit').className = 'login-button';
+ }
+ }
+ catch (e)
+ {
+ }
+
+ },
+
+ highlight : function(id) {
+ var el = document.getElementById(id);
+ if ( el.className != 'highlight' ) {
+ el.className = 'highlight';
+ }
+ else {
+ el.className = '';
+ }
+ }
+ };
+
+}();
Modified: tags/JBoss_Portal_2_7_2/core/src/main/org/jboss/portal/core/controller/ajax/AjaxResponseHandler.java
===================================================================
--- tags/JBoss_Portal_2_7_2/core/src/main/org/jboss/portal/core/controller/ajax/AjaxResponseHandler.java 2009-03-04 11:37:55 UTC (rev 12937)
+++ tags/JBoss_Portal_2_7_2/core/src/main/org/jboss/portal/core/controller/ajax/AjaxResponseHandler.java 2009-03-04 12:25:26 UTC (rev 12938)
@@ -20,6 +20,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
* 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
******************************************************************************/
+
package org.jboss.portal.core.controller.ajax;
import org.apache.log4j.Logger;
@@ -49,6 +50,7 @@
import org.jboss.portal.core.model.portal.command.response.UpdatePageResponse;
import org.jboss.portal.core.model.portal.command.view.ViewPageCommand;
import org.jboss.portal.core.model.portal.content.WindowRendition;
+import org.jboss.portal.core.model.portal.navstate.PageNavigationalState;
import org.jboss.portal.core.model.portal.navstate.WindowNavigationalState;
import org.jboss.portal.core.navstate.NavigationalStateChange;
import org.jboss.portal.core.navstate.NavigationalStateContext;
@@ -85,36 +87,6 @@
*/
public class AjaxResponseHandler implements ResponseHandler
{
-
- // Detect any change that would require a total refresh
-// HttpServletRequest req = invocation.getServerContext().getClientRequest();
-// String clientViewId = req.getHeader("view_id");
-// if (clientViewId != null)
-// {
-// PortalObjectNavigationalStateContext ctx = (PortalObjectNavigationalStateContext)controllerContext.getAttributeResolver(ControllerCommand.NAVIGATIONAL_STATE_SCOPE);
-// String serverViewId = ctx.getViewId();
-// if (!clientViewId.equals(serverViewId))
-// {
-// // todo : that will not work for FORMS submissions, we need a response for the client
-// // to tell to do the request the normal way
-// try
-// {
-// UpdatePageLocationResponse dresp = new UpdatePageLocationResponse(req.getRequestURL().toString());
-// AjaxResponse aresp = new AjaxResponse(dresp);
-// aresp.sendResponse(invocation.getServerContext());
-// }
-// catch (IOException e)
-// {
-// e.printStackTrace();
-// }
-// catch (ServletException e)
-// {
-// e.printStackTrace();
-// }
-// return;
-// }
-// }
-
/** . */
private static final Logger log = Logger.getLogger(AjaxResponseHandler.class);
@@ -173,10 +145,9 @@
{
UpdatePageResponse upw = (UpdatePageResponse)controllerResponse;
- // Obtain page and portal
+ // Obtain page
final Page page = (Page)portalObjectContainer.getObject(upw.getPageId());
-
//
NavigationalStateContext ctx = (NavigationalStateContext)controllerContext.getAttributeResolver(ControllerCommand.NAVIGATIONAL_STATE_SCOPE);
@@ -211,7 +182,8 @@
NavigationalStateKey key = update.getKey();
// We consider only portal object types
- if (key.getType() == WindowNavigationalState.class)
+ Class type = key.getType();
+ if (type == WindowNavigationalState.class)
{
// Get old window state
WindowNavigationalState oldNS = (WindowNavigationalState)update.getOldValue();
@@ -239,6 +211,23 @@
// Collect the dirty window id
dirtyWindowIds.add(key.getId());
}
+ else if (type == PageNavigationalState.class)
+ {
+ // force full refresh for now...
+ fullRefresh = true;
+
+ // TODO: implement proper propagation of PRPs and events
+ /*PageNavigationalState pns = (PageNavigationalState)update.getNewValue();
+
+ if (pns != null)
+ {
+ CoordinationManager coordinationManager = controllerContext.getController().getCoordinationManager();
+ for (QName qName : pns.getParameters().keySet())
+ {
+ //
+ }
+ }*/
+ }
}
}
@@ -249,10 +238,13 @@
if (!fullRefresh)
{
ArrayList<PortalObject> refreshedWindows = new ArrayList<PortalObject>();
- for (PortalObject child : page.getChildren(PortalObject.WINDOW_MASK))
+
+ for (Object dirtyWindowId : dirtyWindowIds)
{
- PortalObjectId childId = child.getId();
- if (dirtyWindowIds.contains(childId))
+ PortalObjectId poid = (PortalObjectId)dirtyWindowId;
+ String windowName = poid.getPath().getLastComponentName();
+ PortalObject child = page.getChild(windowName, Window.class);
+ if (child != null)
{
refreshedWindows.add(child);
}
Modified: tags/JBoss_Portal_2_7_2/core/src/main/org/jboss/portal/core/model/portal/PortalObjectPath.java
===================================================================
--- tags/JBoss_Portal_2_7_2/core/src/main/org/jboss/portal/core/model/portal/PortalObjectPath.java 2009-03-04 11:37:55 UTC (rev 12937)
+++ tags/JBoss_Portal_2_7_2/core/src/main/org/jboss/portal/core/model/portal/PortalObjectPath.java 2009-03-04 12:25:26 UTC (rev 12938)
@@ -1,6 +1,6 @@
/******************************************************************************
* JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
* contributors as indicated by the @authors tag. See the *
* copyright.txt in the distribution for a full listing of *
* individual contributors. *
@@ -181,6 +181,11 @@
return names[index - from];
}
+ public String getLastComponentName()
+ {
+ return names[names.length - 1];
+ }
+
public boolean equals(Object obj)
{
if (obj == this)
Modified: tags/JBoss_Portal_2_7_2/core/src/resources/portal-server-war/login.jsp
===================================================================
--- tags/JBoss_Portal_2_7_2/core/src/resources/portal-server-war/login.jsp 2009-03-04 11:37:55 UTC (rev 12937)
+++ tags/JBoss_Portal_2_7_2/core/src/resources/portal-server-war/login.jsp 2009-03-04 12:25:26 UTC (rev 12938)
@@ -25,105 +25,71 @@
<%@page import="java.util.ResourceBundle" %>
<%
- ResourceBundle rb = ResourceBundle.getBundle("Resource", request.getLocale());
+ ResourceBundle rb = ResourceBundle.getBundle("Resource", request.getLocale());
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
- <title><%= rb.getString("LOGIN_TITLE")%></title>
+ <title><%= rb.getString("LOGIN_TITLE")%>
+ </title>
- <script>
- var isModal = true;
- function displayStatus(){
- if(window.parent.frames.length > 0){
- //loaded as modal
- }else{
- try{
- //normal page
- isModal = false;
- document.body.style.paddingTop = ((window.innerHeight / 2) - document.getElementById('login-content').offsetHeight) + 'px';
- //document.getElementById('login-cancel').value = "<< Back";
- document.getElementById('login-cancel').onclick = function(){self.history.go(-1)};
- document.getElementById('login-submit').style.right = '';
- }catch(e){
- //swallow
- }
- }
- }
- function setFocusOnLoginForm()
- {
- try
- {
- document.loginform.j_username.focus();
- }
- catch (e)
- {
- }
- }
+ <script type="text/javascript" src="/portal-core/js/login.js"></script>
- </script>
-
- <link rel="stylesheet" href="/portal-core/css/login.css" type="text/css"/>
+ <link rel="stylesheet" href="/portal-core/css/login.css" type="text/css"/>
</head>
-<body onload="displayStatus();setFocusOnLoginForm();">
+<body onload="JBossPortal.login.setFocusOnLoginForm();JBossPortal.login.displayStatus();JBossPortal.login.validate();">
<div class="login-container">
- <div class="login-header">
- <%--text title--%>
- <%--<h2><%= rb.getString("LOGIN_TITLE") %></h2>--%>
- <%--img title--%>
- <img src="/portal-core/images/logo-small-blue.gif" width="118px" height="17px"alt=""/>
- </div>
- <div class="login-content" id="login-content">
- <div class="error-message"
- style="<%=(request.getAttribute(!UserStatus.OK.equals("org.jboss.portal.userStatus") ? "" : "display:none"))%>;">
- <%
+ <div class="login-header">
+ <%--text title--%>
+ <%--<h2><%= rb.getString("LOGIN_TITLE") %></h2>--%>
+ <%--img title--%>
+ <img src="/portal-core/images/logo-small-blue.gif" width="118px" height="17px" alt=""/>
+ </div>
+ <div class="login-content" id="login-content">
+ <div class="error-message" id="login-error-message"
+ style="<%=(request.getAttribute(!UserStatus.OK.equals("org.jboss.portal.userStatus") ? "" : "display:none"))%>;">
+ <%
- if (UserStatus.DISABLE.equals(request.getAttribute("org.jboss.portal.userStatus")))
- {
- out.println(rb.getString("ACCOUNT_DISABLED"));
- }
- else if (UserStatus.WRONGPASSWORD.equals(request.getAttribute("org.jboss.portal.userStatus")) || UserStatus.UNEXISTING.equals(request.getAttribute("org.jboss.portal.userStatus")))
- {
- out.println(rb.getString("ACCOUNT_INEXISTING_OR_WRONG_PASSWORD"));
- }
- else if (UserStatus.NOTASSIGNEDTOROLE.equals(request.getAttribute("org.jboss.portal.userStatus")))
- {
- out.println(rb.getString("ACCOUNT_NOTASSIGNEDTOROLE"));
- }
- %>
- </div>
- <form method="post" action="<%= response.encodeURL("j_security_check") %>" name="loginform" id="loginForm"
- target="_parent">
- <div class="form-field">
- <label for="j_username"><%= rb.getString("LOGIN_USERNAME") %>
- </label>
- <input type="text" name="j_username" id="j_username" value=""/>
- </div>
- <div class="form-field">
- <label for="j_password"><%= rb.getString("LOGIN_PASSWORD") %>
- </label>
- <input type="password" name="j_password" id="j_password" value=""/>
- </div>
- <br class="clear"/>
-
- <div class="button-container">
+ if (UserStatus.DISABLE.equals(request.getAttribute("org.jboss.portal.userStatus"))) {
+ out.println(rb.getString("ACCOUNT_DISABLED"));
+ } else if (UserStatus.WRONGPASSWORD.equals(request.getAttribute("org.jboss.portal.userStatus")) || UserStatus.UNEXISTING.equals(request.getAttribute("org.jboss.portal.userStatus"))) {
+ out.println(rb.getString("ACCOUNT_INEXISTING_OR_WRONG_PASSWORD"));
+ } else if (UserStatus.NOTASSIGNEDTOROLE.equals(request.getAttribute("org.jboss.portal.userStatus"))) {
+ out.println(rb.getString("ACCOUNT_NOTASSIGNEDTOROLE"));
+ }
+ %>
+ </div>
+ <form method="post" action="<%= response.encodeURL("j_security_check") %>" name="loginform" id="loginForm"
+ target="_parent" style="margin:0;padding:0">
+ <div class="form-field">
+ <label for="j_username"><%= rb.getString("LOGIN_USERNAME") %>
+ </label>
+ <input type="text" style="width:155px;" name="j_username" id="j_username" value="" onkeyup="JBossPortal.login.validate();" onFocus="JBossPortal.login.highlight('j_username');" onblur="JBossPortal.login.highlight('j_username');"/>
+ </div>
+ <div class="form-field">
+ <label for="j_password"><%= rb.getString("LOGIN_PASSWORD") %>
+ </label>
+ <input type="password" style="width:155px;" name="j_password" id="j_password" value="" onkeyup="JBossPortal.login.validate();" onFocus="JBossPortal.login.highlight('j_password');" onblur="JBossPortal.login.highlight('j_password');"/>
+ </div>
<br class="clear"/>
- <input type="button" name="cancel" id="login-cancel"
- value="<%= rb.getString("LOGIN_CANCEL") %>" class="cancel-button"
- onclick="window.parent.hideContentModal('login-modal');"/>
- <br class="clear"/>
- <input type="submit" name="login" id="login-submit"
- value="<%= rb.getString("LOGIN_SUBMIT") %>" class="login-button"/>
- </div>
- <br class="clear"/>
- </form>
- </div>
+ <div class="button-container">
+ <br class="clear"/>
+ <input type="button" name="cancel" id="login-cancel"
+ value="<%= rb.getString("LOGIN_CANCEL") %>" class="cancel-button"
+ onclick="window.parent.hideContentModal('login-modal');"/>
+ <br class="clear"/>
+ <input type="submit" name="login" id="login-submit"
+ value="<%= rb.getString("LOGIN_SUBMIT") %>" class="login-button"/>
+ </div>
+ </form>
+
+ </div>
</div>
</body>
</html>
17 years, 2 months
JBoss Portal SVN: r12937 - branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2009-03-04 06:37:55 -0500 (Wed, 04 Mar 2009)
New Revision: 12937
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/PortalObjectPath.java
Log:
- Added getLastComponentName method to return the object name.
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/PortalObjectPath.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/PortalObjectPath.java 2009-03-03 23:11:13 UTC (rev 12936)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/PortalObjectPath.java 2009-03-04 11:37:55 UTC (rev 12937)
@@ -1,6 +1,6 @@
/******************************************************************************
* JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
* contributors as indicated by the @authors tag. See the *
* copyright.txt in the distribution for a full listing of *
* individual contributors. *
@@ -181,6 +181,11 @@
return names[index - from];
}
+ public String getLastComponentName()
+ {
+ return names[names.length - 1];
+ }
+
public boolean equals(Object obj)
{
if (obj == this)
17 years, 2 months
JBoss Portal SVN: r12936 - branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/ajax.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2009-03-03 18:11:13 -0500 (Tue, 03 Mar 2009)
New Revision: 12936
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/ajax/AjaxResponseHandler.java
Log:
- JBPORTAL-2328: if we have a page NS, force a full refresh for now... :(
- Minor optimization: do not loop over children but rather over dirty windows (which should be less) thus
avoiding to use getChildren which is costly...
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/ajax/AjaxResponseHandler.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/ajax/AjaxResponseHandler.java 2009-03-03 21:30:40 UTC (rev 12935)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/ajax/AjaxResponseHandler.java 2009-03-03 23:11:13 UTC (rev 12936)
@@ -20,6 +20,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
* 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
******************************************************************************/
+
package org.jboss.portal.core.controller.ajax;
import org.apache.log4j.Logger;
@@ -49,6 +50,7 @@
import org.jboss.portal.core.model.portal.command.response.UpdatePageResponse;
import org.jboss.portal.core.model.portal.command.view.ViewPageCommand;
import org.jboss.portal.core.model.portal.content.WindowRendition;
+import org.jboss.portal.core.model.portal.navstate.PageNavigationalState;
import org.jboss.portal.core.model.portal.navstate.WindowNavigationalState;
import org.jboss.portal.core.navstate.NavigationalStateChange;
import org.jboss.portal.core.navstate.NavigationalStateContext;
@@ -85,36 +87,6 @@
*/
public class AjaxResponseHandler implements ResponseHandler
{
-
- // Detect any change that would require a total refresh
-// HttpServletRequest req = invocation.getServerContext().getClientRequest();
-// String clientViewId = req.getHeader("view_id");
-// if (clientViewId != null)
-// {
-// PortalObjectNavigationalStateContext ctx = (PortalObjectNavigationalStateContext)controllerContext.getAttributeResolver(ControllerCommand.NAVIGATIONAL_STATE_SCOPE);
-// String serverViewId = ctx.getViewId();
-// if (!clientViewId.equals(serverViewId))
-// {
-// // todo : that will not work for FORMS submissions, we need a response for the client
-// // to tell to do the request the normal way
-// try
-// {
-// UpdatePageLocationResponse dresp = new UpdatePageLocationResponse(req.getRequestURL().toString());
-// AjaxResponse aresp = new AjaxResponse(dresp);
-// aresp.sendResponse(invocation.getServerContext());
-// }
-// catch (IOException e)
-// {
-// e.printStackTrace();
-// }
-// catch (ServletException e)
-// {
-// e.printStackTrace();
-// }
-// return;
-// }
-// }
-
/** . */
private static final Logger log = Logger.getLogger(AjaxResponseHandler.class);
@@ -173,10 +145,9 @@
{
UpdatePageResponse upw = (UpdatePageResponse)controllerResponse;
- // Obtain page and portal
+ // Obtain page
final Page page = (Page)portalObjectContainer.getObject(upw.getPageId());
-
//
NavigationalStateContext ctx = (NavigationalStateContext)controllerContext.getAttributeResolver(ControllerCommand.NAVIGATIONAL_STATE_SCOPE);
@@ -211,7 +182,8 @@
NavigationalStateKey key = update.getKey();
// We consider only portal object types
- if (key.getType() == WindowNavigationalState.class)
+ Class type = key.getType();
+ if (type == WindowNavigationalState.class)
{
// Get old window state
WindowNavigationalState oldNS = (WindowNavigationalState)update.getOldValue();
@@ -239,6 +211,23 @@
// Collect the dirty window id
dirtyWindowIds.add(key.getId());
}
+ else if (type == PageNavigationalState.class)
+ {
+ // force full refresh for now...
+ fullRefresh = true;
+
+ // TODO: implement proper propagation of PRPs and events
+ /*PageNavigationalState pns = (PageNavigationalState)update.getNewValue();
+
+ if (pns != null)
+ {
+ CoordinationManager coordinationManager = controllerContext.getController().getCoordinationManager();
+ for (QName qName : pns.getParameters().keySet())
+ {
+ //
+ }
+ }*/
+ }
}
}
@@ -249,10 +238,13 @@
if (!fullRefresh)
{
ArrayList<PortalObject> refreshedWindows = new ArrayList<PortalObject>();
- for (PortalObject child : page.getChildren(PortalObject.WINDOW_MASK))
+
+ for (Object dirtyWindowId : dirtyWindowIds)
{
- PortalObjectId childId = child.getId();
- if (dirtyWindowIds.contains(childId))
+ PortalObjectId poid = (PortalObjectId)dirtyWindowId;
+ String windowName = poid.getPath().getLastComponentName();
+ PortalObject child = page.getChild(windowName, Window.class);
+ if (child != null)
{
refreshedWindows.add(child);
}
17 years, 2 months
JBoss Portal SVN: r12935 - in branches/JBoss_Portal_Branch_2_7/core/src: bin/portal-core-war/js and 1 other directories.
by portal-commits@lists.jboss.org
Author: wesleyhales
Date: 2009-03-03 16:30:40 -0500 (Tue, 03 Mar 2009)
New Revision: 12935
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/css/login.css
branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/js/login.js
branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-server-war/login.jsp
Log:
JBPORTAL-2227
Modified: branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/css/login.css
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/css/login.css 2009-03-03 19:26:22 UTC (rev 12934)
+++ branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/css/login.css 2009-03-03 21:30:40 UTC (rev 12935)
@@ -20,6 +20,17 @@
position: absolute;
}
+input.disabled-button {
+ background-color: #9db3cf;
+ border-color: #c5d7df #8598ab #8598ab #c5d7df;
+ border-style: solid;
+ border-width: 1px;
+ color: #FFFFFF;
+ font-size: 10px;
+ font-weight: bold;
+ position: absolute;
+}
+
input.login-button {
bottom: 25px;
right: 90px;
@@ -53,9 +64,7 @@
}
div.login-container div.login-content {
- background-image: url( ../images/modal/login-content-bg.gif );
- background-position: top left;
- background-repeat: repeat-x;
+ background: url(../images/modal/login-content-bg.gif) repeat-x top left;
width: 255px;
font-weight: bold;
text-align: right;
@@ -81,4 +90,8 @@
div.button-container{
height: 50px;
position: relative;
+}
+
+div.form-field .highlight {
+ border: 2px solid #6a9cd4;
}
\ No newline at end of file
Modified: branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/js/login.js
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/js/login.js 2009-03-03 19:26:22 UTC (rev 12934)
+++ branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/js/login.js 2009-03-03 21:30:40 UTC (rev 12935)
@@ -59,7 +59,7 @@
}
catch(e)
{
- //swallow
+ //swallow
}
//give the cancel button back button functionality (hackish) but there is no other way
//to get returning page
@@ -83,11 +83,48 @@
try
{
document.loginform.j_username.focus();
+ highlightField(document.getElementById('j_username'));
}
catch (e)
{
}
+ },
+
+ /**
+ * simple validate login fields and disable submit
+ *
+ * @public
+ * @type Function
+ * @name validate
+ * @return {void}
+ */
+ validate : function() {
+ try
+ {
+
+ if (document.getElementById('j_username').value.length < 1 || document.getElementById('j_password').value.length < 1){
+ document.getElementById('login-submit').disabled = true;
+ document.getElementById('login-submit').className = 'login-button disabled-button';
+ }else{
+ document.getElementById('login-submit').disabled = false;
+ document.getElementById('login-submit').className = 'login-button';
+ }
+ }
+ catch (e)
+ {
+ }
+
+ },
+
+ highlight : function(id) {
+ var el = document.getElementById(id);
+ if ( el.className != 'highlight' ) {
+ el.className = 'highlight';
+ }
+ else {
+ el.className = '';
+ }
}
};
Modified: branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-server-war/login.jsp
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-server-war/login.jsp 2009-03-03 19:26:22 UTC (rev 12934)
+++ branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-server-war/login.jsp 2009-03-03 21:30:40 UTC (rev 12935)
@@ -39,7 +39,7 @@
<link rel="stylesheet" href="/portal-core/css/login.css" type="text/css"/>
</head>
-<body onload="JBossPortal.login.setFocusOnLoginForm();JBossPortal.login.displayStatus();">
+<body onload="JBossPortal.login.setFocusOnLoginForm();JBossPortal.login.displayStatus();JBossPortal.login.validate();">
<div class="login-container">
@@ -69,12 +69,12 @@
<div class="form-field">
<label for="j_username"><%= rb.getString("LOGIN_USERNAME") %>
</label>
- <input type="text" style="width:155px;" name="j_username" id="j_username" value=""/>
+ <input type="text" style="width:155px;" name="j_username" id="j_username" value="" onkeyup="JBossPortal.login.validate();" onFocus="JBossPortal.login.highlight('j_username');" onblur="JBossPortal.login.highlight('j_username');"/>
</div>
<div class="form-field">
<label for="j_password"><%= rb.getString("LOGIN_PASSWORD") %>
</label>
- <input type="password" style="width:155px;" name="j_password" id="j_password" value=""/>
+ <input type="password" style="width:155px;" name="j_password" id="j_password" value="" onkeyup="JBossPortal.login.validate();" onFocus="JBossPortal.login.highlight('j_password');" onblur="JBossPortal.login.highlight('j_password');"/>
</div>
<br class="clear"/>
17 years, 2 months
JBoss Portal SVN: r12934 - branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/js.
by portal-commits@lists.jboss.org
Author: wesleyhales
Date: 2009-03-03 14:26:22 -0500 (Tue, 03 Mar 2009)
New Revision: 12934
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/js/login.js
Log:
remove debug
Modified: branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/js/login.js
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/js/login.js 2009-03-03 17:46:12 UTC (rev 12933)
+++ branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/js/login.js 2009-03-03 19:26:22 UTC (rev 12934)
@@ -29,9 +29,7 @@
JBossPortal.login = function() {
-
//namespace login functions and variables
-
var isModal = true;
return{
@@ -45,13 +43,9 @@
* @return {void}
*/
displayStatus : function() {
- alert(window.parent.frames.length);
if (window.parent.frames.length >= 1)
{
//loaded as modal
- //hide the error messages bix, because you will not get them in modal
- //document.getElementById('login-error-message').style.display = 'none';
- //document.getElementById('login-error-message').style.visibility = 'hidden';
}
else
{
@@ -62,12 +56,6 @@
{
document.body.style.paddingTop = ((document.documentElement.clientHeight / 2) - document.getElementById('login-content').scrollHeight) + 'px';
}
-// else
-// {
-// //for ie7
-// alert((document.getElementById('login-content').offsetHeight - (document.body.clientHeight / 2)) + 'px');
-// document.body.style.paddingTop = ((document.getElementById('login-content').offsetHeight - (document.body.clientHeight / 2)) + 'px');
-// }
}
catch(e)
{
17 years, 2 months
JBoss Portal SVN: r12933 - branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/js.
by portal-commits@lists.jboss.org
Author: wesleyhales
Date: 2009-03-03 12:46:12 -0500 (Tue, 03 Mar 2009)
New Revision: 12933
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/js/login.js
Log:
oops
Modified: branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/js/login.js
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/js/login.js 2009-03-03 17:45:11 UTC (rev 12932)
+++ branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/js/login.js 2009-03-03 17:46:12 UTC (rev 12933)
@@ -58,7 +58,6 @@
isModal = false;
try
{
-\\
if (document.getElementById('login-content').scrollHeight > 0)
{
document.body.style.paddingTop = ((document.documentElement.clientHeight / 2) - document.getElementById('login-content').scrollHeight) + 'px';
17 years, 2 months
JBoss Portal SVN: r12932 - in branches/JBoss_Portal_Branch_2_7/core/src: bin/portal-core-war/js and 1 other directories.
by portal-commits@lists.jboss.org
Author: wesleyhales
Date: 2009-03-03 12:45:11 -0500 (Tue, 03 Mar 2009)
New Revision: 12932
Added:
branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/js/login.js
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/css/login.css
branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-server-war/login.jsp
Log:
JBPORTAL-2320
Modified: branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/css/login.css
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/css/login.css 2009-03-03 13:35:24 UTC (rev 12931)
+++ branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/css/login.css 2009-03-03 17:45:11 UTC (rev 12932)
@@ -59,6 +59,8 @@
width: 255px;
font-weight: bold;
text-align: right;
+ padding: 0;
+
}
div.login-container div.login-content div.form-field {
Added: branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/js/login.js
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/js/login.js (rev 0)
+++ branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/js/login.js 2009-03-03 17:45:11 UTC (rev 12932)
@@ -0,0 +1,107 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+
+if (typeof JBossPortal == 'undefined') {
+ var JBossPortal = {
+ login : { }
+ };
+}
+
+JBossPortal.login = function() {
+
+
+ //namespace login functions and variables
+
+ var isModal = true;
+
+ return{
+ /**
+ * Gets the current display status of the login box (modal or page) sets global variable and
+ * performs dynamic rendering options for login box
+ *
+ * @public
+ * @type Function
+ * @name displayStatus
+ * @return {void}
+ */
+ displayStatus : function() {
+ alert(window.parent.frames.length);
+ if (window.parent.frames.length >= 1)
+ {
+ //loaded as modal
+ //hide the error messages bix, because you will not get them in modal
+ //document.getElementById('login-error-message').style.display = 'none';
+ //document.getElementById('login-error-message').style.visibility = 'hidden';
+ }
+ else
+ {
+ isModal = false;
+ try
+ {
+\\
+ if (document.getElementById('login-content').scrollHeight > 0)
+ {
+ document.body.style.paddingTop = ((document.documentElement.clientHeight / 2) - document.getElementById('login-content').scrollHeight) + 'px';
+ }
+// else
+// {
+// //for ie7
+// alert((document.getElementById('login-content').offsetHeight - (document.body.clientHeight / 2)) + 'px');
+// document.body.style.paddingTop = ((document.getElementById('login-content').offsetHeight - (document.body.clientHeight / 2)) + 'px');
+// }
+ }
+ catch(e)
+ {
+ //swallow
+ }
+ //give the cancel button back button functionality (hackish) but there is no other way
+ //to get returning page
+ document.getElementById('login-cancel').onclick = function()
+ {
+ self.history.go(-1);
+ };
+ document.getElementById('login-submit').style.right = '';
+ }
+ },
+
+ /**
+ * set focus on username
+ *
+ * @public
+ * @type Function
+ * @name setFocusOnLoginForm
+ * @return {void}
+ */
+ setFocusOnLoginForm : function() {
+ try
+ {
+ document.loginform.j_username.focus();
+ }
+ catch (e)
+ {
+ }
+
+ }
+ };
+
+}();
Modified: branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-server-war/login.jsp
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-server-war/login.jsp 2009-03-03 13:35:24 UTC (rev 12931)
+++ branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-server-war/login.jsp 2009-03-03 17:45:11 UTC (rev 12932)
@@ -25,105 +25,71 @@
<%@page import="java.util.ResourceBundle" %>
<%
- ResourceBundle rb = ResourceBundle.getBundle("Resource", request.getLocale());
+ ResourceBundle rb = ResourceBundle.getBundle("Resource", request.getLocale());
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
- <title><%= rb.getString("LOGIN_TITLE")%></title>
+ <title><%= rb.getString("LOGIN_TITLE")%>
+ </title>
- <script>
- var isModal = true;
- function displayStatus(){
- if(window.parent.frames.length > 0){
- //loaded as modal
- }else{
- try{
- //normal page
- isModal = false;
- document.body.style.paddingTop = ((window.innerHeight / 2) - document.getElementById('login-content').offsetHeight) + 'px';
- //document.getElementById('login-cancel').value = "<< Back";
- document.getElementById('login-cancel').onclick = function(){self.history.go(-1)};
- document.getElementById('login-submit').style.right = '';
- }catch(e){
- //swallow
- }
- }
- }
- function setFocusOnLoginForm()
- {
- try
- {
- document.loginform.j_username.focus();
- }
- catch (e)
- {
- }
- }
+ <script type="text/javascript" src="/portal-core/js/login.js"></script>
- </script>
-
- <link rel="stylesheet" href="/portal-core/css/login.css" type="text/css"/>
+ <link rel="stylesheet" href="/portal-core/css/login.css" type="text/css"/>
</head>
-<body onload="displayStatus();setFocusOnLoginForm();">
+<body onload="JBossPortal.login.setFocusOnLoginForm();JBossPortal.login.displayStatus();">
<div class="login-container">
- <div class="login-header">
- <%--text title--%>
- <%--<h2><%= rb.getString("LOGIN_TITLE") %></h2>--%>
- <%--img title--%>
- <img src="/portal-core/images/logo-small-blue.gif" width="118px" height="17px"alt=""/>
- </div>
- <div class="login-content" id="login-content">
- <div class="error-message"
- style="<%=(request.getAttribute(!UserStatus.OK.equals("org.jboss.portal.userStatus") ? "" : "display:none"))%>;">
- <%
+ <div class="login-header">
+ <%--text title--%>
+ <%--<h2><%= rb.getString("LOGIN_TITLE") %></h2>--%>
+ <%--img title--%>
+ <img src="/portal-core/images/logo-small-blue.gif" width="118px" height="17px" alt=""/>
+ </div>
+ <div class="login-content" id="login-content">
+ <div class="error-message" id="login-error-message"
+ style="<%=(request.getAttribute(!UserStatus.OK.equals("org.jboss.portal.userStatus") ? "" : "display:none"))%>;">
+ <%
- if (UserStatus.DISABLE.equals(request.getAttribute("org.jboss.portal.userStatus")))
- {
- out.println(rb.getString("ACCOUNT_DISABLED"));
- }
- else if (UserStatus.WRONGPASSWORD.equals(request.getAttribute("org.jboss.portal.userStatus")) || UserStatus.UNEXISTING.equals(request.getAttribute("org.jboss.portal.userStatus")))
- {
- out.println(rb.getString("ACCOUNT_INEXISTING_OR_WRONG_PASSWORD"));
- }
- else if (UserStatus.NOTASSIGNEDTOROLE.equals(request.getAttribute("org.jboss.portal.userStatus")))
- {
- out.println(rb.getString("ACCOUNT_NOTASSIGNEDTOROLE"));
- }
- %>
- </div>
- <form method="post" action="<%= response.encodeURL("j_security_check") %>" name="loginform" id="loginForm"
- target="_parent">
- <div class="form-field">
- <label for="j_username"><%= rb.getString("LOGIN_USERNAME") %>
- </label>
- <input type="text" name="j_username" id="j_username" value=""/>
- </div>
- <div class="form-field">
- <label for="j_password"><%= rb.getString("LOGIN_PASSWORD") %>
- </label>
- <input type="password" name="j_password" id="j_password" value=""/>
- </div>
- <br class="clear"/>
-
- <div class="button-container">
+ if (UserStatus.DISABLE.equals(request.getAttribute("org.jboss.portal.userStatus"))) {
+ out.println(rb.getString("ACCOUNT_DISABLED"));
+ } else if (UserStatus.WRONGPASSWORD.equals(request.getAttribute("org.jboss.portal.userStatus")) || UserStatus.UNEXISTING.equals(request.getAttribute("org.jboss.portal.userStatus"))) {
+ out.println(rb.getString("ACCOUNT_INEXISTING_OR_WRONG_PASSWORD"));
+ } else if (UserStatus.NOTASSIGNEDTOROLE.equals(request.getAttribute("org.jboss.portal.userStatus"))) {
+ out.println(rb.getString("ACCOUNT_NOTASSIGNEDTOROLE"));
+ }
+ %>
+ </div>
+ <form method="post" action="<%= response.encodeURL("j_security_check") %>" name="loginform" id="loginForm"
+ target="_parent" style="margin:0;padding:0">
+ <div class="form-field">
+ <label for="j_username"><%= rb.getString("LOGIN_USERNAME") %>
+ </label>
+ <input type="text" style="width:155px;" name="j_username" id="j_username" value=""/>
+ </div>
+ <div class="form-field">
+ <label for="j_password"><%= rb.getString("LOGIN_PASSWORD") %>
+ </label>
+ <input type="password" style="width:155px;" name="j_password" id="j_password" value=""/>
+ </div>
<br class="clear"/>
- <input type="button" name="cancel" id="login-cancel"
- value="<%= rb.getString("LOGIN_CANCEL") %>" class="cancel-button"
- onclick="window.parent.hideContentModal('login-modal');"/>
- <br class="clear"/>
- <input type="submit" name="login" id="login-submit"
- value="<%= rb.getString("LOGIN_SUBMIT") %>" class="login-button"/>
- </div>
- <br class="clear"/>
- </form>
- </div>
+ <div class="button-container">
+ <br class="clear"/>
+ <input type="button" name="cancel" id="login-cancel"
+ value="<%= rb.getString("LOGIN_CANCEL") %>" class="cancel-button"
+ onclick="window.parent.hideContentModal('login-modal');"/>
+ <br class="clear"/>
+ <input type="submit" name="login" id="login-submit"
+ value="<%= rb.getString("LOGIN_SUBMIT") %>" class="login-button"/>
+ </div>
+ </form>
+
+ </div>
</div>
</body>
</html>
17 years, 2 months
JBoss Portal SVN: r12931 - in branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium: portal and 1 other directory.
by portal-commits@lists.jboss.org
Author: vrockai
Date: 2009-03-03 08:35:24 -0500 (Tue, 03 Mar 2009)
New Revision: 12931
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/portal/EndtoEndPortalAdminTestCase.java
Log:
end2end testcaszes fix
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-03 13:00:30 UTC (rev 12930)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/EndToEndBeaPortlet.java 2009-03-03 13:35:24 UTC (rev 12931)
@@ -13,12 +13,14 @@
@Test(groups = {"end2end"}, enabled = true, description = "Creating of new portal with content.")
public class EndToEndBeaPortlet extends JBossPortalSeleniumTestCase {
+
private static final String SUB_VIEW_PORTLETS = "//input[contains(@id,'definition-form:view-portlets')]";
private static final String SEL_CONS_TYPE = "//select[contains(@id,'definition-form:menu')]";
public static String casePfx = "e2e.wsrp.";
+ private final String ADR_HOME = getProp(casePfx+"adr.home","portal/auth/portal/default");
private final String INP_CONSUMER_NAME = getProp(casePfx+"inp.consumer.name","//input[contains(@id,'edit-cons-form:id')]");
private final String SUBMIT_REFRESH_CANCEL = getProp(casePfx+"submit.refresh.cancel","//a[contains(@id,'edit-cons-form:list-cons-link')]");
private final String SUBMIT_PROD_SAVE = getProp(casePfx+"submit.prod.save","//input[contains(@id,'producer-form:save-producer')]");
@@ -127,23 +129,23 @@
createInstance(defName, consName, insName);
addPortlet(portalName, pageName, insName, "portlet");
- selenium.open("/portal/");
+ selenium.open(ADR_HOME);
selenium.waitForPageToLoad(PAGE_LOAD);
- //Assert.assertTrue(selenium.isTextPresent("1BeaPorWindow"));
+ Assert.assertTrue(selenium.isTextPresent("1BeaPorWindow"));
Assert.assertTrue(selenium.isTextPresent("Welcome to WebLogic Portal WSRP Demo."));
}
private void createConsumer(String consumerName){
- selenium.open("/portal/");
+ selenium.open(ADR_HOME);
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click("link=Admin");
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click("link=WSRP");
selenium.waitForPageToLoad(PAGE_LOAD);
clickIfVisible(ID_LINK_CONSCONF);
-
+
selenium.type(INPUT_CREATECONS, consumerName);
selenium.click(SUBMIT_CREATECONS);
@@ -166,7 +168,7 @@
}
private void createInstance(String defName, String type, String insName){
- selenium.open("/portal/");
+ selenium.open(ADR_HOME);
selenium.waitForPageToLoad(PAGE_LOAD);
clickIfVisible(LINK_ADMIN);
@@ -182,7 +184,7 @@
selenium.click(MessageFormat.format(T_LINK_CREATE,r-1));
selenium.waitForPageToLoad(PAGE_LOAD);
-
+ selenium.setSpeed("5555");
selenium.type(INPUT_INSTANCE_NAME, insName);
selenium.click(SUBMIT_CREATE_INST);
selenium.waitForPageToLoad(PAGE_LOAD);
@@ -190,7 +192,7 @@
}
private void addPortlet(String portalName, String pageName, String portletName, String type) {
- selenium.open("/portal/");
+ selenium.open(ADR_HOME);
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click("link=Admin");
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/EndtoEndPortalAdminTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/EndtoEndPortalAdminTestCase.java 2009-03-03 13:00:30 UTC (rev 12930)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/EndtoEndPortalAdminTestCase.java 2009-03-03 13:35:24 UTC (rev 12931)
@@ -17,8 +17,10 @@
@Test(groups = { "end2end" }, enabled = true, description = "Creating of new portal with content.")
public class EndtoEndPortalAdminTestCase extends JBossPortalSeleniumTestCase {
+
public static String casePfx = "portal.e2e.";
+ private final String ADR_PORTAL = getProp(casePfx + "adr.home","/portal");
public final String SEL_PORTLET_TYPE = getProp(casePfx + "sel.portlet.type","//select[contains(@id,'windowForm:instanceId')]");
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')]");
@@ -109,7 +111,7 @@
makeDefaultPortal(portalName);
// Assert the portal is default
- selenium.open("/portal/");
+ selenium.open(ADR_PORTAL);
selenium.waitForPageToLoad(PAGE_LOAD);
Assert.assertEquals("", selenium.getText(DIV_PORT_CONTENT));
Assert.assertTrue(selenium.isElementPresent("link=" + page1Name));
@@ -132,7 +134,7 @@
}
private void assertPageContains(String pageName, String awaitStr) {
- selenium.open("/portal/");
+ selenium.open(ADR_PORTAL);
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click("link=" + pageName);
@@ -142,7 +144,7 @@
}
private void createPortal(String portalName) {
- selenium.open("/portal/");
+ selenium.open(ADR_PORTAL);
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click("link=Admin");
@@ -162,7 +164,7 @@
}
private void addPage(String pageName) {
- selenium.open("/portal/");
+ selenium.open(ADR_PORTAL);
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click("link=Admin");
@@ -191,7 +193,7 @@
}
private void addPortlet(String portalName, String pageName, String portletName, String type) {
- selenium.open("/portal/");
+ selenium.open(ADR_PORTAL);
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click("link=Admin");
@@ -262,7 +264,7 @@
}
private void makeDefaultPortal(String portalName) {
- selenium.open("/portal/");
+ selenium.open(ADR_PORTAL);
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click("link=Admin");
17 years, 2 months