JBoss Rich Faces SVN: r13934 - trunk/samples/richfaces-demo/src/main/webapp/richfaces/standardSkinning.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2009-04-30 05:50:59 -0400 (Thu, 30 Apr 2009)
New Revision: 13934
Modified:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/standardSkinning/usage.xhtml
Log:
Typo in parameter value corrected
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/standardSkinning/usage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/standardSkinning/usage.xhtml 2009-04-30 09:35:47 UTC (rev 13933)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/standardSkinning/usage.xhtml 2009-04-30 09:50:59 UTC (rev 13934)
@@ -80,7 +80,7 @@
and it means that all
standard elements on the page will be skinned. (CSS style classes for
elements based on their names and type attribute values will be applied).
- You may redefine it to <b>disabled</b> in order to turn it off.
+ You may redefine it to <b>disable</b> in order to turn it off.
</li>
<li>
By default <b>org.richfaces.CONTROL_SKINNING_CLASSES</b> context param is set to
15 years, 8 months
JBoss Rich Faces SVN: r13933 - trunk/samples/richfaces-demo/src/main/webapp/richfaces/layouts/page/includes.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2009-04-30 05:35:47 -0400 (Thu, 30 Apr 2009)
New Revision: 13933
Modified:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/layouts/page/includes/sidebar.xhtml
Log:
themes names in selector changed
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/layouts/page/includes/sidebar.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/layouts/page/includes/sidebar.xhtml 2009-04-30 09:03:45 UTC (rev 13932)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/layouts/page/includes/sidebar.xhtml 2009-04-30 09:35:47 UTC (rev 13933)
@@ -15,8 +15,8 @@
<f:selectItem itemValue="" itemLabel="Default" />
<f:selectItem itemValue="simple" itemLabel="Simple" />
<f:selectItem itemValue="violetRays" itemLabel="Violet Rays" />
- <f:selectItem itemValue="theme1" itemLabel="Theme One" />
- <f:selectItem itemValue="theme2" itemLabel="Theme Two" />
+ <f:selectItem itemValue="oldschool" itemLabel="Old School" />
+ <f:selectItem itemValue="smooth" itemLabel="Smooth" />
</h:selectOneMenu>
<h:outputLabel for="width" value="Page Width" />
<h:inputText id="width" value="#{layoutBean.width}" style="width:75px"/>
15 years, 8 months
JBoss Rich Faces SVN: r13932 - trunk/ui/treeModel/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: atsebro
Date: 2009-04-30 05:03:45 -0400 (Thu, 30 Apr 2009)
New Revision: 13932
Modified:
trunk/ui/treeModel/src/main/config/component/recursiveTreeNodesAdaptor.xml
Log:
https://jira.jboss.org/jira/browse/RF-6760: mention in the guide section that Tree Adaptors configurable recursion order is implemented
Modified: trunk/ui/treeModel/src/main/config/component/recursiveTreeNodesAdaptor.xml
===================================================================
--- trunk/ui/treeModel/src/main/config/component/recursiveTreeNodesAdaptor.xml 2009-04-30 08:44:37 UTC (rev 13931)
+++ trunk/ui/treeModel/src/main/config/component/recursiveTreeNodesAdaptor.xml 2009-04-30 09:03:45 UTC (rev 13932)
@@ -85,7 +85,7 @@
</property>
<property>
<name>recursionOrder</name>
- <description>The attribute is used to control recursion order. Possible values are ("first", "last", "id of adaptor") "first" and "last" are reserved values. Id of the adaptor component definition means that recursion occurs after these adaptor component nodes are processed. The default value is "last" </description>
+ <description>The attribute is used to control a recursion order. Possible values are "first", "last", "[id of adaptor]" ("first" and "last" are reserved values). When "[id of the adaptor]" is set it means that recursion occurs after these adaptor component nodes are processed. The default value is "last" </description>
<classname>java.lang.String</classname>
</property>
</component>
15 years, 8 months
JBoss Rich Faces SVN: r13931 - trunk/test-applications/richfaces-docs/web/src/main/java/org/docs/tree.
by richfaces-svn-commits@lists.jboss.org
Author: ochikvina
Date: 2009-04-30 04:44:37 -0400 (Thu, 30 Apr 2009)
New Revision: 13931
Added:
trunk/test-applications/richfaces-docs/web/src/main/java/org/docs/tree/TreeBean.java
Log:
Added: trunk/test-applications/richfaces-docs/web/src/main/java/org/docs/tree/TreeBean.java
===================================================================
--- trunk/test-applications/richfaces-docs/web/src/main/java/org/docs/tree/TreeBean.java (rev 0)
+++ trunk/test-applications/richfaces-docs/web/src/main/java/org/docs/tree/TreeBean.java 2009-04-30 08:44:37 UTC (rev 13931)
@@ -0,0 +1,150 @@
+package org.docs.tree;
+
+import java.util.Set;
+import java.util.TreeSet;
+
+import javax.faces.context.FacesContext;
+
+import org.richfaces.component.xml.XmlTreeDataBuilder;
+import org.richfaces.model.TreeNode;
+import org.richfaces.model.TreeNodeImpl;
+import org.xml.sax.InputSource;
+
+public class TreeBean {
+ private TreeNode<String> data;
+
+ public TreeBean() {
+
+ String[] components = {"< a4j:ajaxListener >", "< a4j:keepAlive >", "< a4j:actionparam >" };
+ String[][] attributes = {{"type"},
+ {"ajaxOnly", "beanName"},
+ {"actionListener", "assignTo", "binding", "converter", "id", "name", "noEscape", "value"}};
+
+ if (data == null) {
+ data = new TreeNodeImpl<String>();
+
+ for (int i = 0; i < components.length; i++) {
+ TreeNode<String> child = new TreeNodeImpl<String>();
+ child.setData(components[i]);
+ data.addChild(components[i], child);
+
+ for (int j = 0; j < attributes[i].length; j++) {
+ TreeNode<String> grandChild = new TreeNodeImpl<String>();
+ grandChild.setData(attributes[i][j]);
+ child.addChild(attributes[i][j], grandChild);
+ }
+ }
+ }
+ }
+
+ public TreeNode<String> getData() {
+ return data;
+ }
+
+ public static boolean[] checkNameChars() {
+ Set<Integer> result = new TreeSet<Integer>();
+ boolean[] chars = new boolean[0xFFFF + 1];
+
+ result.add(Character.getType(':'));
+ chars[':'] = true;
+ for (char i = 'A'; i <= 'Z'; i++) {
+ result.add(Character.getType(i));
+ chars[i] = true;
+ }
+ result.add(Character.getType('_'));
+ for (char i = 'a'; i <= 'z'; i++) {
+ result.add(Character.getType(i));
+ chars[i] = true;
+ }
+
+ for (char i = '\u00c0'; i <= '\u00d6'; i++) {
+ result.add(Character.getType(i));
+ chars[i] = true;
+ }
+ for (char i = '\u00d8'; i <= '\u00f6'; i++) {
+ result.add(Character.getType(i));
+ chars[i] = true;
+ }
+ for (char i = '\u00f8'; i <= '\u02ff'; i++) {
+ result.add(Character.getType(i));
+ chars[i] = true;
+ }
+ for (char i = '\u0370'; i <= '\u037d'; i++) {
+ result.add(Character.getType(i));
+ chars[i] = true;
+ }
+ for (char i = '\u037f'; i <= '\u1fff'; i++) {
+ result.add(Character.getType(i));
+ chars[i] = true;
+ }
+ for (char i = '\u200c'; i <= '\u200d'; i++) {
+ result.add(Character.getType(i));
+ chars[i] = true;
+ }
+ for (char i = '\u2070'; i <= '\u218f'; i++) {
+ result.add(Character.getType(i));
+ chars[i] = true;
+ }
+ for (char i = '\u2c00'; i <= '\u2fef'; i++) {
+ result.add(Character.getType(i));
+ chars[i] = true;
+ }
+ for (char i = '\u3001'; i <= '\ud7ff'; i++) {
+ result.add(Character.getType(i));
+ chars[i] = true;
+ }
+ for (char i = '\uf900'; i <= '\ufdcf'; i++) {
+ result.add(Character.getType(i));
+ chars[i] = true;
+ }
+ for (char i = '\ufdf0'; i <= '\ufffd'; i++) {
+ result.add(Character.getType(i));
+ chars[i] = true;
+ }
+ for (char i = '-'; i <= '-'; i++) {
+ result.add(Character.getType(i));
+ chars[i] = true;
+ }
+ for (char i = '.'; i <= '.'; i++) {
+ result.add(Character.getType(i));
+ chars[i] = true;
+ }
+ for (char i = '0'; i <= '9'; i++) {
+ result.add(Character.getType(i));
+ chars[i] = true;
+ }
+ for (char i = '\u00b7'; i <= '\u00b7'; i++) {
+ result.add(Character.getType(i));
+ chars[i] = true;
+ }
+ for (char i = '\u0300'; i <= '\u036f'; i++) {
+ result.add(Character.getType(i));
+ chars[i] = true;
+ }
+ for (char i = '\u203f'; i <= '\u2040'; i++) {
+ result.add(Character.getType(i));
+ chars[i] = true;
+ }
+
+ System.out.println(result);
+
+ return chars;
+ }
+
+ public static void checkChars(boolean[] skipSet) {
+ Set<Integer> result = new TreeSet<Integer>();
+ for (char c = '\u0000'; c < '\uffff'; c++) {
+ if (!skipSet[c]) {
+ result.add(Character.getType(c));
+ }
+ }
+ System.out.println(result);
+ }
+
+ public static void main(String[] args) {
+ boolean[] skipChars = checkNameChars();
+ System.out.println("Bean.main()");
+ checkChars(skipChars);
+ }
+
+}
15 years, 8 months
JBoss Rich Faces SVN: r13930 - trunk/test-applications/richfaces-docs/web/src/main/webapp.
by richfaces-svn-commits@lists.jboss.org
Author: ochikvina
Date: 2009-04-30 04:43:05 -0400 (Thu, 30 Apr 2009)
New Revision: 13930
Modified:
trunk/test-applications/richfaces-docs/web/src/main/webapp/tree.xhtml
Log:
Modified: trunk/test-applications/richfaces-docs/web/src/main/webapp/tree.xhtml
===================================================================
--- trunk/test-applications/richfaces-docs/web/src/main/webapp/tree.xhtml 2009-04-30 08:19:01 UTC (rev 13929)
+++ trunk/test-applications/richfaces-docs/web/src/main/webapp/tree.xhtml 2009-04-30 08:43:05 UTC (rev 13930)
@@ -11,8 +11,8 @@
<h:messages globalOnly="true" styleClass="message" />
<rich:panel>
<f:facet name="header">rich:tree</f:facet>
- <p>rich:tree is built from a simple org.richfaces.model.TreeNode
- model</p>
+ <h4>Case 1. rich:tree is built from a simple org.richfaces.model.TreeNode
+ model</h4>
<h:form>
<rich:tree value="#{tree.stationNodes}" var="station">
<rich:treeNode>
@@ -21,7 +21,7 @@
</rich:tree>
</h:form>
- <p>A simple rich:tree from a local XML file</p>
+ <h4>Case 2. A simple rich:tree from a local XML file</h4>
<h:form>
<rich:tree id="treeXML" value="#{tree.data}" var="vardata">
<rich:treeNode>
@@ -33,9 +33,9 @@
</rich:tree>
</h:form>
-
+
<br></br>
- <h2>Case 3. Tree built with treeNodesAdaptors</h2>
+ <h4>Case 3. Tree built with treeNodesAdaptors</h4>
<p>Using the <rich:treeNodesAdaptor> means that the typical tree hierarchy should be built directly in the component tree.<br></br>
</p>
<h:form>
@@ -59,7 +59,7 @@
</h:form>
<br></br>
- <h2>Case 4. Tree built from XML (simple example)</h2>
+ <h4>Case 4. Tree built from XML (simple example)</h4>
<p>The <code>org.richfaces.model.TreeNode</code> interface, which is used in following case, accepts data worked with <code>org.richfaces.component.xml.XmlTreeDataBuilder</code> class and renders it as tree nodes.</p>
<h:form>
<rich:tree id="tree"
@@ -69,8 +69,19 @@
<h:outputText value="#{vardata.text}" />
</rich:treeNode>
</rich:tree>
- </h:form>
+ </h:form>
+ <br></br>
+ <h4>Case 5. The tree with <code>org.richfaces.TreeRowKeyConverter</code> usage</h4>
+
+ <h:form>
+ <rich:tree value="#{treeBean.data}" var="node" switchType="ajax" rowKeyConverter="org.richfaces.TreeRowKeyConverter">
+ <rich:treeNode ajaxSingle="true">
+ <h:outputText value="#{node}"/>
+ </rich:treeNode>
+ </rich:tree>
+ </h:form>
+
</rich:panel>
</ui:define>
</ui:composition>
15 years, 8 months
JBoss Rich Faces SVN: r13929 - trunk/test-applications/richfaces-docs/web/src/main/java/org/docs/tree.
by richfaces-svn-commits@lists.jboss.org
Author: atsebro
Date: 2009-04-30 04:19:01 -0400 (Thu, 30 Apr 2009)
New Revision: 13929
Modified:
trunk/test-applications/richfaces-docs/web/src/main/java/org/docs/tree/Shelf.java
Log:
Modified: trunk/test-applications/richfaces-docs/web/src/main/java/org/docs/tree/Shelf.java
===================================================================
--- trunk/test-applications/richfaces-docs/web/src/main/java/org/docs/tree/Shelf.java 2009-04-29 19:28:48 UTC (rev 13928)
+++ trunk/test-applications/richfaces-docs/web/src/main/java/org/docs/tree/Shelf.java 2009-04-30 08:19:01 UTC (rev 13929)
@@ -8,7 +8,21 @@
*
*/
public class Shelf {
- public Shelf() {
+
+ String[] albSet = {"Vacations", "New Year"};
+ String[] imgSet = {"Start", "Middle", "Finish"};
+
+ public String[] getAlbSet() {
+ return albSet;
}
-
+ public void setAlbSet(String[] albSet) {
+ this.albSet = albSet;
+ }
+ public String[] getImgSet() {
+ return imgSet;
+ }
+ public void setImgSet(String[] imgSet) {
+ this.imgSet = imgSet;
+ }
+
}
15 years, 8 months
JBoss Rich Faces SVN: r13928 - in trunk/ui: pickList/src/main/resources/org/richfaces/renderkit/html/css and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2009-04-29 15:28:48 -0400 (Wed, 29 Apr 2009)
New Revision: 13928
Modified:
trunk/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/css/listShuttle.xcss
trunk/ui/pickList/src/main/resources/org/richfaces/renderkit/html/css/picklist.xcss
Log:
https://jira.jboss.org/jira/browse/RF-3365
Modified: trunk/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/css/listShuttle.xcss
===================================================================
--- trunk/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/css/listShuttle.xcss 2009-04-29 17:55:00 UTC (rev 13927)
+++ trunk/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/css/listShuttle.xcss 2009-04-29 19:28:48 UTC (rev 13928)
@@ -84,6 +84,7 @@
background : top left repeat-x;
border-style: solid;
padding : 2px 0px 0px 2px;
+ cursor: pointer;
}
.rich-list-shuttle-button-valign {
Modified: trunk/ui/pickList/src/main/resources/org/richfaces/renderkit/html/css/picklist.xcss
===================================================================
--- trunk/ui/pickList/src/main/resources/org/richfaces/renderkit/html/css/picklist.xcss 2009-04-29 17:55:00 UTC (rev 13927)
+++ trunk/ui/pickList/src/main/resources/org/richfaces/renderkit/html/css/picklist.xcss 2009-04-29 19:28:48 UTC (rev 13928)
@@ -69,6 +69,7 @@
background : top left repeat-x;
border-style: solid;
padding : 2px 0px 0px 2px;
+ cursor: pointer;
}
.rich-list-picklist-button-valign {
15 years, 8 months
JBoss Rich Faces SVN: r13927 - trunk/ui/listShuttle/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2009-04-29 13:55:00 -0400 (Wed, 29 Apr 2009)
New Revision: 13927
Modified:
trunk/ui/listShuttle/src/main/config/component/listShuttle.xml
Log:
https://jira.jboss.org/jira/browse/RF-6972
Modified: trunk/ui/listShuttle/src/main/config/component/listShuttle.xml
===================================================================
--- trunk/ui/listShuttle/src/main/config/component/listShuttle.xml 2009-04-29 17:51:26 UTC (rev 13926)
+++ trunk/ui/listShuttle/src/main/config/component/listShuttle.xml 2009-04-29 17:55:00 UTC (rev 13927)
@@ -120,9 +120,6 @@
<defaultvalue>true</defaultvalue>
</property>
<property hidden="true">
- <name>value</name>
- </property>
- <property hidden="true">
<name>required</name>
</property>
15 years, 8 months
JBoss Rich Faces SVN: r13926 - in trunk/ui: orderingList/src/main/config/component and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2009-04-29 13:51:26 -0400 (Wed, 29 Apr 2009)
New Revision: 13926
Modified:
trunk/ui/listShuttle/src/main/config/component/listShuttle.xml
trunk/ui/orderingList/src/main/config/component/orderinglist.xml
Log:
https://jira.jboss.org/jira/browse/RF-6972
Modified: trunk/ui/listShuttle/src/main/config/component/listShuttle.xml
===================================================================
--- trunk/ui/listShuttle/src/main/config/component/listShuttle.xml 2009-04-29 16:59:40 UTC (rev 13925)
+++ trunk/ui/listShuttle/src/main/config/component/listShuttle.xml 2009-04-29 17:51:26 UTC (rev 13926)
@@ -117,6 +117,7 @@
</property>
<property hidden="true" el="false">
<name>valid</name>
+ <defaultvalue>true</defaultvalue>
</property>
<property hidden="true">
<name>value</name>
Modified: trunk/ui/orderingList/src/main/config/component/orderinglist.xml
===================================================================
--- trunk/ui/orderingList/src/main/config/component/orderinglist.xml 2009-04-29 16:59:40 UTC (rev 13925)
+++ trunk/ui/orderingList/src/main/config/component/orderinglist.xml 2009-04-29 17:51:26 UTC (rev 13926)
@@ -215,6 +215,7 @@
</property>
<property hidden="true" el="false" existintag="true">
<name>valid</name>
+ <defaultvalue>true</defaultvalue>
</property>
<property>
15 years, 8 months
JBoss Rich Faces SVN: r13925 - in trunk/examples/photoalbum/tests/src/test/java/org/richfaces/photoalbum: testng and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2009-04-29 12:59:40 -0400 (Wed, 29 Apr 2009)
New Revision: 13925
Added:
trunk/examples/photoalbum/tests/src/test/java/org/richfaces/photoalbum/testng/DeleteUseCasesTest.java
Modified:
trunk/examples/photoalbum/tests/src/test/java/org/richfaces/photoalbum/RealWorldHelper.java
trunk/examples/photoalbum/tests/src/test/java/org/richfaces/photoalbum/testng/OpenAreasUseCasesTest.java
Log:
RF-6909
Modified: trunk/examples/photoalbum/tests/src/test/java/org/richfaces/photoalbum/RealWorldHelper.java
===================================================================
--- trunk/examples/photoalbum/tests/src/test/java/org/richfaces/photoalbum/RealWorldHelper.java 2009-04-29 16:18:09 UTC (rev 13924)
+++ trunk/examples/photoalbum/tests/src/test/java/org/richfaces/photoalbum/RealWorldHelper.java 2009-04-29 16:59:40 UTC (rev 13925)
@@ -56,19 +56,23 @@
String VIEW_SHELFS_PATH = PATH + "/div[2]";
String VIEW_ALBUMS_PATH = PATH + "/div[3]";
String VIEW_IMAGES_PATH = PATH + "/div[4]";
- String ADD_IMAGE_LINK_PATH = PATH + "/*[@id='menuform:add_icons_div_id']/a[3]";
+ String ADD_GROUP_PATH = PATH + "/*[@id='menuform:add_icons_div_id']";
+ String ADD_SHELF_LINK_PATH = ADD_GROUP_PATH + "/a[1]";
+ String ADD_ALBUM_LINK_PATH = ADD_GROUP_PATH + "/a[2]";
+ String ADD_IMAGE_LINK_PATH = ADD_GROUP_PATH + "/a[3]";
}
public static interface ShelfArea {
- String HEADER_PATH = "//*[@class='shelf-header-table']";
- String HEADER_NAME_PATH_SUFIX = "//h1";
- String HEADER_NAME_PATH = HEADER_PATH + HEADER_NAME_PATH_SUFIX;
+ String HEADER_PATH = "xpath=/descendant::*[@class='shelf-header-table']";
+ String HEADER_NAME_PATH_SUFFIX = "//h1//text()";
+ String HEADER_NAME_PATH = HEADER_PATH + HEADER_NAME_PATH_SUFFIX;
String DELETE_BUTTON_PATH = "//*[@class='shelf-header-table-col2']/a[2]";
}
public static interface AlbumArea {
String HEADER_PATH = "//*[@class='album-header-table']";
- String HEADER_NAME_PATH = HEADER_PATH + "//h1";
+ String HEADER_NAME_PATH_SUFFIX = "//h1//text()";
+ String HEADER_NAME_PATH = HEADER_PATH + HEADER_NAME_PATH_SUFFIX;
String PREVIEW_PATH = "//*[@class='preview_box_album_120']";
String PREVIEW_LINK_PATH_SUFFIX = "//a";
String PREVIEW_NAME_PATH_SUFFIX = "/*[@class='album_name']";
@@ -78,7 +82,8 @@
public static interface ImageArea {
String HEADER_PATH = "//*[@class='image-header-table']";
- String HEADER_NAME_PATH = HEADER_PATH + "//h1";
+ String HEADER_NAME_PATH_SUFFIX = "//h1//text()";
+ String HEADER_NAME_PATH = HEADER_PATH + HEADER_NAME_PATH_SUFFIX;
String PREVIEW_PATH = "//*[@class='preview_box_photo_120']";
String PREVIEW_LINK_PATH_SUFFIX = "//a";
String PREVIEW_NAME_PATH_SUFFIX = "/*[@class='photo_name']";
@@ -150,7 +155,7 @@
Assert.assertTrue(selenium.isVisible(HtmlConstants.ShelfArea.HEADER_PATH));
if (shelfName != null) {
String text = selenium.getText(RealWorldHelper.HtmlConstants.ShelfArea.HEADER_NAME_PATH);
- Assert.assertTrue(text.contains(shelfName), "Incorrect data was opened on shelf area.");
+ Assert.assertTrue(text.equals(shelfName), "Incorrect data was opened on shelf area.");
}
}
@@ -159,10 +164,10 @@
boolean presented = false;
if (shelfName != null) {
int xpathCount = selenium.getXpathCount(HtmlConstants.ShelfArea.HEADER_PATH).intValue();
- for (int i = 1; i <= xpathCount && !presented; i++) {
- presented = selenium.getText(HtmlConstants.ShelfArea.HEADER_PATH
- + "[" + i + "]" + HtmlConstants.ShelfArea.HEADER_NAME_PATH_SUFIX)
- .contains(shelfName);
+ for (int i = 2; i <= xpathCount && !presented; i++) {
+ presented = selenium.getText("(" + HtmlConstants.ShelfArea.HEADER_PATH
+ + ")[" + i + "]" + HtmlConstants.ShelfArea.HEADER_NAME_PATH_SUFFIX)
+ .equals(shelfName);
}
} else {
@@ -191,7 +196,7 @@
for (int i = 1; i <= xpathCount && !presented; i++) {
presented = selenium.getText(HtmlConstants.AlbumArea.PREVIEW_PATH
+ "[" + i + "]" + HtmlConstants.AlbumArea.PREVIEW_NAME_PATH_SUFFIX)
- .contains(albumName);
+ .equals(albumName);
if (presented) {
selenium.click(HtmlConstants.AlbumArea.PREVIEW_PATH + "[" + i + "]" + HtmlConstants.AlbumArea.PREVIEW_LINK_PATH_SUFFIX);
waitForAjaxCompletion(selenium);
@@ -213,7 +218,7 @@
Assert.assertTrue(selenium.isVisible(HtmlConstants.AlbumArea.HEADER_PATH));
if (albumName != null) {
String text = selenium.getText(RealWorldHelper.HtmlConstants.AlbumArea.HEADER_NAME_PATH);
- Assert.assertTrue(text.contains(albumName), "Incorrect data was opened on album area.");
+ Assert.assertTrue(text.equals(albumName), "Incorrect data was opened on album area.");
}
}
@@ -225,7 +230,7 @@
for (int i = 1; i <= xpathCount && !presented; i++) {
presented = selenium.getText(HtmlConstants.AlbumArea.PREVIEW_PATH
+ "[" + i + "]" + HtmlConstants.AlbumArea.PREVIEW_NAME_PATH_SUFFIX)
- .contains(albumName);
+ .equals(albumName);
}
} else {
@@ -254,7 +259,7 @@
for (int i = 1; i <= xpathCount && !presented; i++) {
presented = selenium.getText(HtmlConstants.ImageArea.PREVIEW_PATH
+ "[" + i + "]" + HtmlConstants.ImageArea.PREVIEW_NAME_PATH_SUFFIX)
- .contains(imageName);
+ .equals(imageName);
if (presented) {
selenium.click(HtmlConstants.ImageArea.PREVIEW_PATH + "[" + i + "]" + HtmlConstants.ImageArea.PREVIEW_LINK_PATH_SUFFIX);
waitForAjaxCompletion(selenium);
@@ -275,7 +280,7 @@
Assert.assertTrue(selenium.isVisible(HtmlConstants.ImageArea.HEADER_PATH));
if (imageName != null) {
String text = selenium.getText(RealWorldHelper.HtmlConstants.ImageArea.HEADER_NAME_PATH);
- Assert.assertTrue(text.contains(imageName), "Incorrect data was opened on image area.");
+ Assert.assertTrue(text.equals(imageName), "Incorrect data was opened on image area.");
}
}
@@ -287,7 +292,7 @@
for (int i = 1; i <= xpathCount && !presented; i++) {
presented = selenium.getText(HtmlConstants.ImageArea.PREVIEW_PATH
+ "[" + i + "]" + HtmlConstants.ImageArea.PREVIEW_NAME_PATH_SUFFIX)
- .contains(imageName);
+ .equals(imageName);
}
} else {
@@ -322,7 +327,7 @@
public static boolean isLogined(Selenium selenium, String name) {
boolean logined = !selenium.getXpathCount(HtmlConstants.LogInOutArea.USER_INFO_LINK_PATH).equals(0);
if (logined && name != null) {
- logined = selenium.getText(HtmlConstants.LogInOutArea.USER_INFO_LINK_PATH).contains(name);
+ logined = selenium.getText(HtmlConstants.LogInOutArea.USER_INFO_LINK_PATH).equals(name);
}
return logined;
}
Added: trunk/examples/photoalbum/tests/src/test/java/org/richfaces/photoalbum/testng/DeleteUseCasesTest.java
===================================================================
--- trunk/examples/photoalbum/tests/src/test/java/org/richfaces/photoalbum/testng/DeleteUseCasesTest.java (rev 0)
+++ trunk/examples/photoalbum/tests/src/test/java/org/richfaces/photoalbum/testng/DeleteUseCasesTest.java 2009-04-29 16:59:40 UTC (rev 13925)
@@ -0,0 +1,55 @@
+/**
+ *
+ */
+package org.richfaces.photoalbum.testng;
+
+import junit.framework.Assert;
+
+import org.richfaces.photoalbum.RealWorldHelper;
+import org.richfaces.photoalbum.SeleniumTestBase;
+import org.richfaces.photoalbum.RealWorldHelper.HtmlConstants;
+import org.testng.annotations.Test;
+
+/**
+ * @author Konstantin Mishin
+ *
+ */
+public class DeleteUseCasesTest extends SeleniumTestBase {
+
+ @Test
+ public void testDeleteImage() {
+ renderPage();
+ RealWorldHelper.login(selenium);
+ selenium.click(HtmlConstants.ToolBarArea.VIEW_IMAGES_PATH);
+ waitForAjaxCompletion();
+ String imageName = selenium.getText(HtmlConstants.ImageArea.PREVIEW_PATH + HtmlConstants.ImageArea.PREVIEW_NAME_PATH_SUFFIX);
+ RealWorldHelper.openImageFromPreview(selenium);
+ RealWorldHelper.deleteCurrentImage(selenium);
+ selenium.click(HtmlConstants.ToolBarArea.VIEW_IMAGES_PATH);
+ waitForAjaxCompletion();
+ Assert.assertFalse(RealWorldHelper.isImagePresentOnPage(selenium, imageName));
+ }
+
+ @Test
+ public void testDeleteAlbum() {
+ renderPage();
+ RealWorldHelper.login(selenium);
+ selenium.click(HtmlConstants.ToolBarArea.VIEW_ALBUMS_PATH);
+ waitForAjaxCompletion();
+ String albumName = selenium.getText(HtmlConstants.AlbumArea.PREVIEW_PATH + HtmlConstants.AlbumArea.PREVIEW_NAME_PATH_SUFFIX);
+ RealWorldHelper.openAlbumFromPreview(selenium);
+ RealWorldHelper.deleteCurrentAlbum(selenium);
+ selenium.click(HtmlConstants.ToolBarArea.VIEW_ALBUMS_PATH);
+ waitForAjaxCompletion();
+ Assert.assertFalse(RealWorldHelper.isAlbumPresentOnPage(selenium, albumName));
+ }
+
+ @Test
+ public void testDeleteShelf() {
+ renderPage();
+ RealWorldHelper.login(selenium);
+ String shelfName = selenium.getText(HtmlConstants.ShelfArea.HEADER_NAME_PATH);
+ RealWorldHelper.deleteCurrentShelf(selenium);
+ Assert.assertFalse(RealWorldHelper.isShelfPresentOnPage(selenium, shelfName));
+ }
+}
Modified: trunk/examples/photoalbum/tests/src/test/java/org/richfaces/photoalbum/testng/OpenAreasUseCasesTest.java
===================================================================
--- trunk/examples/photoalbum/tests/src/test/java/org/richfaces/photoalbum/testng/OpenAreasUseCasesTest.java 2009-04-29 16:18:09 UTC (rev 13924)
+++ trunk/examples/photoalbum/tests/src/test/java/org/richfaces/photoalbum/testng/OpenAreasUseCasesTest.java 2009-04-29 16:59:40 UTC (rev 13925)
@@ -3,8 +3,6 @@
*/
package org.richfaces.photoalbum.testng;
-import junit.framework.Assert;
-
import org.richfaces.photoalbum.RealWorldHelper;
import org.richfaces.photoalbum.SeleniumTestBase;
import org.richfaces.photoalbum.RealWorldHelper.HtmlConstants;
@@ -67,46 +65,4 @@
waitForAjaxCompletion();
RealWorldHelper.testImageArea(selenium);
}
-
- @Test
- public void testDeleteImage() {
- renderPage();
- RealWorldHelper.login(selenium);
- selenium.click(HtmlConstants.ToolBarArea.VIEW_IMAGES_PATH);
- waitForAjaxCompletion();
- String imageName = selenium.getText(HtmlConstants.ImageArea.PREVIEW_PATH + HtmlConstants.ImageArea.PREVIEW_NAME_PATH_SUFFIX);
- RealWorldHelper.openImageFromPreview(selenium);
- RealWorldHelper.deleteCurrentImage(selenium);
- selenium.click(HtmlConstants.ToolBarArea.VIEW_IMAGES_PATH);
- waitForAjaxCompletion();
- Assert.assertFalse(RealWorldHelper.isImagePresentOnPage(selenium, imageName));
- }
-
- @Test
- public void testDeleteAlbum() {
- renderPage();
- RealWorldHelper.login(selenium);
- selenium.click(HtmlConstants.ToolBarArea.VIEW_ALBUMS_PATH);
- waitForAjaxCompletion();
- String albumName = selenium.getText(HtmlConstants.AlbumArea.PREVIEW_PATH + HtmlConstants.AlbumArea.PREVIEW_NAME_PATH_SUFFIX);
- RealWorldHelper.openAlbumFromPreview(selenium);
- RealWorldHelper.deleteCurrentAlbum(selenium);
- selenium.click(HtmlConstants.ToolBarArea.VIEW_ALBUMS_PATH);
- waitForAjaxCompletion();
- Assert.assertFalse(RealWorldHelper.isAlbumPresentOnPage(selenium, albumName));
- }
-
- //TODO @Test
- public void testDeleteShelf() {
- renderPage();
- RealWorldHelper.login(selenium);
- selenium.click(HtmlConstants.ToolBarArea.VIEW_ALBUMS_PATH);
- waitForAjaxCompletion();
- String albumName = selenium.getText(HtmlConstants.AlbumArea.PREVIEW_PATH + HtmlConstants.AlbumArea.PREVIEW_NAME_PATH_SUFFIX);
- RealWorldHelper.openAlbumFromPreview(selenium);
- RealWorldHelper.deleteCurrentAlbum(selenium);
- selenium.click(HtmlConstants.ToolBarArea.VIEW_ALBUMS_PATH);
- waitForAjaxCompletion();
- Assert.assertFalse(RealWorldHelper.isAlbumPresentOnPage(selenium, albumName));
- }
}
15 years, 8 months