JBoss Rich Faces SVN: r12743 - in trunk/test-applications/seleniumTest/richfaces/src: test/java/org/richfaces/testng and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: dsvyatobatsko
Date: 2009-02-25 11:41:27 -0500 (Wed, 25 Feb 2009)
New Revision: 12743
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/inputNumberSlider/styleAndClasseStandardHTMLAttributesTest.xhtml
Modified:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/InputNumberSliderTest.java
Log:
RF-5867
Added: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/inputNumberSlider/styleAndClasseStandardHTMLAttributesTest.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/inputNumberSlider/styleAndClasseStandardHTMLAttributesTest.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/InputNumberSliderTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/InputNumberSliderTest.java 2009-02-25 15:58:25 UTC (rev 12742)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/InputNumberSliderTest.java 2009-02-25 16:41:27 UTC (rev 12743)
@@ -20,8 +20,12 @@
*/
package org.richfaces.testng;
+import java.util.ArrayList;
+import java.util.List;
+
import org.ajax4jsf.template.Template;
import org.richfaces.AutoTester;
+import org.richfaces.SeleniumEvent;
import org.richfaces.SeleniumTestBase;
import org.testng.Assert;
import org.testng.annotations.Test;
@@ -32,6 +36,8 @@
private final static String RESET_METHOD = "#{sliderBean.reset}";
+ private final static String LOOK_AND_FEEL_TEST_URL = "pages/inputNumberSlider/styleAndClasseStandardHTMLAttributesTest.xhtml";
+
@Test
public void testInputNumberSlider(Template template) {
renderPage(template, RESET_METHOD);
@@ -187,6 +193,67 @@
Assert.assertEquals(getSliderValue(), "0", "Slider value has to be dropped to zero");
}
+ @Test
+ public void testStandardHTMLAttributesAreOutputToClient(Template template) {
+ renderPage(LOOK_AND_FEEL_TEST_URL, template, null);
+
+ String slider = getAutoTester(this).getClientId(AutoTester.COMPONENT_ID);
+ writeStatus("Check component's specific HTML attributes are output to client");
+
+ List<SeleniumEvent> events = new ArrayList<SeleniumEvent>();
+ events.add(SeleniumEvent.ONKEYDOWN);
+ events.add(SeleniumEvent.ONKEYUP);
+ events.add(SeleniumEvent.ONKEYPRESS);
+
+ assertEvents(slider + "Input", events);
+
+ writeStatus("Check standart HTML attributes");
+ assertEvents(slider, SeleniumEvent.STANDARD_HTML_EVENTS);
+ }
+
+ @Test
+ public void testStylesAndStyleClassesAreOutputToClient(Template template) {
+ renderPage(LOOK_AND_FEEL_TEST_URL, template, null);
+
+ writeStatus("Check styles and classes are output to client");
+
+ writeStatus("Check styleClass/style attributes");
+ String sliderId = getAutoTester(this).getClientId(AutoTester.COMPONENT_ID);
+ assertStyleAttributeContains(sliderId, "font-size: 17px", "Style attribute was not output to client");
+ assertClassAttributeContains(sliderId, "noclass", "Class attribute was not output to client");
+
+ writeStatus("Check inputClass/inputStyle attributes");
+ String inputId = sliderId + "Input";
+ assertStyleAttributeContains(inputId, "font-size: 16px", "inputStyle attribute was not output to client");
+ assertClassAttributeContains(inputId, "input-class", "inputClass attribute was not output to client");
+
+ writeStatus("Check decreaseClass/decreaseStyle/decreaseSelectedClass attributes");
+ String decreaseArrowId = sliderId + "ArrowDec";
+ assertStyleAttributeContains(decreaseArrowId, "font-size: 14px", "decreaseStyle attribute was not output to client");
+ assertClassAttributeContains(decreaseArrowId, "decrease-class", "decreaseClass attribute was not output to client");
+
+ writeStatus("Check increaseClass/increaseStyle/increaseSelectedClass attributes");
+ String increaseArrowId = sliderId + "ArrowInc";
+ assertStyleAttributeContains(increaseArrowId, "font-size: 15px", "increaseStyle attribute was not output to client");
+ assertClassAttributeContains(increaseArrowId, "increase-class", "increaseClass attribute was not output to client");
+
+ writeStatus("Check barClass/barStyle attributes");
+ String sliderTrackXpath = "//div[contains(@class, 'rich-inslider-track')]";
+ assertStyleAttributeContains(sliderTrackXpath, "font-size: 13px", "barStyle attribute was not output to client");
+ assertClassAttributeContains(sliderTrackXpath, "bar-class", "barClass attribute was not output to client");
+
+ writeStatus("Check handleClass/handleSelectedClass attributes");
+ String handleId = sliderId + "Handle";
+ assertClassAttributeContains(handleId, "handle-class", "handleClass attribute was not output to client");
+ selenium.mouseDownAt(handleId, "1,1");
+ assertClassAttributeContains(handleId, "handle-selected-class", "handleSelectedClass attribute was not output to client");
+
+ writeStatus("Check tipClass/tipStyle attributes");
+ String tipId = sliderId + "Tip";
+ assertStyleAttributeContains(tipId, "font-size: 18px", "tipStyle attribute was not output to client");
+ assertClassAttributeContains(tipId, "tip-class", "tipClass attribute was not output to client");
+ }
+
private String getSliderValue() {
return selenium.getValue("name=" + getAutoTester(this).getClientId(AutoTester.COMPONENT_ID));
}
15 years, 1 month
JBoss Rich Faces SVN: r12742 - in trunk/test-applications/seleniumTest/richfaces/src: main/webapp/pages/ajaxRepeat and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2009-02-25 10:58:25 -0500 (Wed, 25 Feb 2009)
New Revision: 12742
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JRepeatTestBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxRepeat/ajaxRepeatTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxRepeatTest.java
Log:
RF-6185
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JRepeatTestBean.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JRepeatTestBean.java 2009-02-25 14:55:13 UTC (rev 12741)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JRepeatTestBean.java 2009-02-25 15:58:25 UTC (rev 12742)
@@ -82,6 +82,7 @@
private int rows;
private String trace;
private Set<Integer> ajaxKeys;
+ private Boolean rendered;
public A4JRepeatTestBean() {
init();
@@ -100,6 +101,7 @@
ajaxKeys.add(i);
}
}
+ rendered = true;
}
public void submit(ActionEvent event) {
@@ -166,4 +168,12 @@
};
}
+
+ public void setRendered(Boolean rendered) {
+ this.rendered = rendered;
+ }
+
+ public Boolean getRendered() {
+ return rendered;
+ }
}
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxRepeat/ajaxRepeatTest.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxRepeatTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxRepeatTest.java 2009-02-25 14:55:13 UTC (rev 12741)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxRepeatTest.java 2009-02-25 15:58:25 UTC (rev 12742)
@@ -37,6 +37,8 @@
private String rows;
+ private String rendered;
+
private String panelGroup;
private String repeat;
@@ -51,6 +53,7 @@
renderPage(null, template, "#{a4jRepeatBean.init}");
String attrForm = getParentId() + "attrForm";
rows = attrForm + ":rows";
+ rendered = attrForm + ":rendered";
String mainForm = getParentId() + "mainForm";
panelGroup = mainForm + ":panelGroup";
repeat = mainForm + ":repeat";
@@ -162,6 +165,17 @@
}
}
+ /**
+ * component with rendered = false is not present on the page
+ */
+ @Test
+ public void testRendered(Template template) {
+ init(template);
+ Assert.assertFalse(selenium.getXpathCount("id('"+ panelGroup + "')/div").intValue() == 0);
+ clickAjaxCommandAndWait(rendered);
+ Assert.assertTrue(selenium.getXpathCount("id('"+ panelGroup + "')/div").intValue() == 0);
+ }
+
@Override
public String getTestUrl() {
return "pages/ajaxRepeat/ajaxRepeatTest.xhtml";
15 years, 1 month
JBoss Rich Faces SVN: r12741 - Plan and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: tkuprevich
Date: 2009-02-25 09:55:13 -0500 (Wed, 25 Feb 2009)
New Revision: 12741
Modified:
trunk/test-applications/qa/Test Plan/TestPlan-RF.doc
Log:
Modified: trunk/test-applications/qa/Test Plan/TestPlan-RF.doc
===================================================================
(Binary files differ)
15 years, 1 month
JBoss Rich Faces SVN: r12740 - in trunk/test-applications/seleniumTest/richfaces/src: test/java/org/richfaces/testng and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: dsvyatobatsko
Date: 2009-02-25 09:02:34 -0500 (Wed, 25 Feb 2009)
New Revision: 12740
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/inputNumberSlider/inputNumberSliderAutoTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/inputNumberSlider/inputNumberSliderTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/InputNumberSliderTest.java
Log:
RF-5860, RF-5861
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/inputNumberSlider/inputNumberSliderAutoTest.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/inputNumberSlider/inputNumberSliderTest.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/InputNumberSliderTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/InputNumberSliderTest.java 2009-02-25 13:26:46 UTC (rev 12739)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/InputNumberSliderTest.java 2009-02-25 14:02:34 UTC (rev 12740)
@@ -32,66 +32,64 @@
private final static String RESET_METHOD = "#{sliderBean.reset}";
- private final static String FORM_ID = "autoTestForm:";
-
@Test
public void testInputNumberSlider(Template template) {
renderPage(template, RESET_METHOD);
- String parentId = getParentId() + "_form:";
- String slider = parentId + "slider";
+ String slider = getAutoTester(this).getClientId(AutoTester.COMPONENT_ID);
String input = slider + "Input";
String tip = slider + "Tip";
String track = slider + "Track";
- String ajax = parentId + "ajax";
- String server = parentId + "server";
- String output = parentId + "output";
+ String ajax = getAutoTester(this).getClientId("ajax");
+ String server = getAutoTester(this).getClientId("server");
+ String output = getAutoTester(this).getClientId("output");
writeStatus("Checking initial rendering");
AssertNotVisible(tip);
- checkSliderVisualState(slider, 40);
+ checkSliderVisualState(40);
AssertTextEquals(output, "40");
writeStatus("Checking if tip is visible during click");
- selenium.mouseDownAt("id=" + track, "800,1");
+ selenium.mouseDownAt(track, "800,1");
AssertVisible(tip);
- selenium.mouseUpAt("id=" + track, "800,1");
+ selenium.mouseUpAt(track, "800,1");
AssertNotVisible(tip);
writeStatus("Checking if value is changed with previous click");
- checkSliderVisualState(slider, 80);
+ checkSliderVisualState(80);
writeStatus("Checking if value is changed with input field");
selenium.type(input, "22");
- checkSliderVisualState(slider, 22);
+ checkSliderVisualState(22);
writeStatus("Checking if slider is properly re-rendered and submitted with ajax");
clickAjaxCommandAndWait(ajax);
- checkSliderVisualState(slider, 32);
+ checkSliderVisualState(32);
AssertTextEquals(output, "32");
writeStatus("Checking if slider is properly submitted");
clickCommandAndWait(server);
- checkSliderVisualState(slider, 42);
+ checkSliderVisualState(42);
AssertTextEquals(output, "42");
writeStatus("Checking validation");
- selenium.mouseDownAt("id=" + track, "950,1");
- selenium.mouseUpAt("id=" + track, "950,1");
+ selenium.mouseDownAt(track, "950,1");
+ selenium.mouseUpAt(track, "950,1");
clickAjaxCommandAndWait(ajax);
- checkSliderVisualState(slider, 95);
+ checkSliderVisualState(95);
AssertTextEquals(output, "42");
- selenium.mouseDownAt("id=" + track, "300,1");
- selenium.mouseUpAt("id=" + track, "300,1");
+ selenium.mouseDownAt(track, "300,1");
+ selenium.mouseUpAt(track, "300,1");
clickAjaxCommandAndWait(ajax);
- checkSliderVisualState(slider, 40);
+ checkSliderVisualState(40);
AssertTextEquals(output, "40");
}
- private void checkSliderVisualState(String id, int value) {
+ private void checkSliderVisualState(int value) {
+ String id = getAutoTester(this).getClientId(AutoTester.COMPONENT_ID);
writeStatus("Checking value in input field");
AssertValueEquals(id + "Input", Integer.toString(value));
AssertTextEquals(id + "Tip", Integer.toString(value));
@@ -105,10 +103,17 @@
int actual = new Integer(actualTip.replace("px", "")).intValue();
int expected = BAR_SCALE * value;
- Assert.assertTrue(Math.abs(actual - expected) <= BAR_SCALE,
+ Assert.assertTrue(Math.abs(actual - expected) < BAR_SCALE,
"Handle position is not syncronized with slider value!");
}
+ private void clickSlider(int position) {
+ String track = getAutoTester(this).getClientId(AutoTester.COMPONENT_ID) + "Track";
+ String coords = "" + BAR_SCALE * position + ",1";
+ selenium.mouseDownAt(track, coords);
+ selenium.mouseUpAt(track, coords);
+ }
+
@Test
public void testValueChangeEventFiredAndModelUpdatedOnSubmit(Template template) {
AutoTester tester = getAutoTester(this);
@@ -156,12 +161,38 @@
Assert.assertFalse(selenium.isEditable(inputId), "Slider's input has to be read only");
}
+ @Test
+ public void testCorrectManualInputMovesSliderHandlerRespectively(Template template) {
+ AutoTester tester = getAutoTester(this);
+ tester.renderPage(template, RESET_METHOD);
+ writeStatus("Check correct manual input moves slider handler respectively");
+ String input = getAutoTester(this).getClientId(AutoTester.COMPONENT_ID) + "Input";
+
+ selenium.type(input, "20");
+ checkSliderVisualState(20);
+
+ selenium.type(input, "70");
+ checkSliderVisualState(70);
+ }
+
+ @Test
+ public void testIncorrectManualInputMovesSliderHandlerToTheLeftEdge(Template template) {
+ AutoTester tester = getAutoTester(this);
+ tester.renderPage(template, RESET_METHOD);
+ writeStatus("Check incorrect manual input moves slider handler to the left edge");
+ String input = getAutoTester(this).getClientId(AutoTester.COMPONENT_ID) + "Input";
+
+ selenium.type(input, "-20");
+ checkSliderVisualState(0);
+ Assert.assertEquals(getSliderValue(), "0", "Slider value has to be dropped to zero");
+ }
+
private String getSliderValue() {
- return selenium.getValue("name=" + getParentId() + FORM_ID + "componentId");
+ return selenium.getValue("name=" + getAutoTester(this).getClientId(AutoTester.COMPONENT_ID));
}
private void setSliderValue(String value) {
- selenium.type("name=" + getParentId() + FORM_ID + "componentId", value);
+ selenium.type("name=" + getAutoTester(this).getClientId(AutoTester.COMPONENT_ID), value);
}
@Override
15 years, 1 month
JBoss Rich Faces SVN: r12739 - trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service.
by richfaces-svn-commits@lists.jboss.org
Author: alevkovsky
Date: 2009-02-25 08:26:46 -0500 (Wed, 25 Feb 2009)
New Revision: 12739
Modified:
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/Constants.java
Log:
Realworld: Improve slide show
Modified: trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/Constants.java
===================================================================
--- trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/Constants.java 2009-02-25 13:26:41 UTC (rev 12738)
+++ trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/Constants.java 2009-02-25 13:26:46 UTC (rev 12739)
@@ -78,6 +78,7 @@
public static final String USER = "user";
public static final String TREE_ROOT_NODE_TYPE = "treeRoot";
public static final String DATASCROLLER_ID = "mainform:imageScroller";
+ public static final String DATASCROLLER2_ID = "mainform:slideShowImageScroller";
public static final String USER_EXIST_QUERY = "user-exist";
public static final String USER_LOGIN_QUERY = "user-login";
15 years, 1 month
JBoss Rich Faces SVN: r12738 - in trunk/test-applications/realworld2/web/src/main: webapp/includes/image and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alevkovsky
Date: 2009-02-25 08:26:41 -0500 (Wed, 25 Feb 2009)
New Revision: 12738
Modified:
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/util/ConversationState.java
trunk/test-applications/realworld2/web/src/main/webapp/includes/image/mainImage.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/image/slideshow.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/misc/slideShowPooler.xhtml
Log:
Realworld: Improve slide show
Modified: trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/util/ConversationState.java
===================================================================
--- trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/util/ConversationState.java 2009-02-25 12:49:22 UTC (rev 12737)
+++ trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/util/ConversationState.java 2009-02-25 13:26:41 UTC (rev 12738)
@@ -103,7 +103,7 @@
return;
}
UIComponent component = FacesContext.getCurrentInstance().getViewRoot();
- UIDatascroller scroller = (UIDatascroller)component.findComponent(Constants.DATASCROLLER_ID);
+ UIDatascroller scroller = (UIDatascroller)component.findComponent(Constants.DATASCROLLER2_ID);
Map<String, Object> attributes = scroller.getDataTable().getAttributes();
attributes.put(UIDatascroller.SCROLLER_STATE_ATTRIBUTE, index+1);
if(index == getSelectedAlbum().getImages().size() - 1){
Modified: trunk/test-applications/realworld2/web/src/main/webapp/includes/image/mainImage.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld2/web/src/main/webapp/includes/image/slideshow.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld2/web/src/main/webapp/includes/misc/slideShowPooler.xhtml
===================================================================
(Binary files differ)
15 years, 1 month
JBoss Rich Faces SVN: r12737 - trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/navigation.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2009-02-25 07:49:22 -0500 (Wed, 25 Feb 2009)
New Revision: 12737
Modified:
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/navigation/NavigationEnum.java
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/navigation/NavigationHelper.java
Log:
Modified: trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/navigation/NavigationEnum.java
===================================================================
--- trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/navigation/NavigationEnum.java 2009-02-25 11:06:27 UTC (rev 12736)
+++ trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/navigation/NavigationEnum.java 2009-02-25 12:49:22 UTC (rev 12737)
@@ -23,5 +23,5 @@
public enum NavigationEnum {
IMAGE_PREVIEW,
FILE_UPLOAD,
- USER_PREFS, SEARCH, READ_MESSAGES, WHAT_NEW,
+ USER_PREFS, SEARCH, WHAT_NEW, ALBUM_PREVIEW, SHELF_PREVIEW, ALL_SHELFS, TAGS, ALL_ALBUMS, ALL_IMAGES,
}
Modified: trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/navigation/NavigationHelper.java
===================================================================
--- trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/navigation/NavigationHelper.java 2009-02-25 11:06:27 UTC (rev 12736)
+++ trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/navigation/NavigationHelper.java 2009-02-25 12:49:22 UTC (rev 12737)
@@ -46,10 +46,6 @@
return NavigationEnum.SEARCH;
}
- public NavigationEnum getNavigationEnumReadMessages(){
- return NavigationEnum.READ_MESSAGES;
- }
-
public NavigationEnum getNavigationEnumImagePreview(){
return NavigationEnum.IMAGE_PREVIEW;
}
@@ -57,4 +53,28 @@
public NavigationEnum getNavigationEnumFileUpload(){
return NavigationEnum.FILE_UPLOAD;
}
+
+ public NavigationEnum getNavigationEnumAlbumPreview(){
+ return NavigationEnum.ALBUM_PREVIEW;
+ }
+
+ public NavigationEnum getNavigationEnumShelfPreview(){
+ return NavigationEnum.SHELF_PREVIEW;
+ }
+
+ public NavigationEnum getNavigationEnumAllImages(){
+ return NavigationEnum.ALL_IMAGES;
+ }
+
+ public NavigationEnum getNavigationEnumAllAlbums(){
+ return NavigationEnum.ALL_ALBUMS;
+ }
+
+ public NavigationEnum getNavigationEnumAllShelfs(){
+ return NavigationEnum.ALL_SHELFS;
+ }
+
+ public NavigationEnum getNavigationEnumTags(){
+ return NavigationEnum.TAGS;
+ }
}
15 years, 1 month
JBoss Rich Faces SVN: r12736 - trunk/test-applications/realworld2/ejb/src/main/resources.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2009-02-25 06:06:27 -0500 (Wed, 25 Feb 2009)
New Revision: 12736
Modified:
trunk/test-applications/realworld2/ejb/src/main/resources/import.sql
Log:
Modified: trunk/test-applications/realworld2/ejb/src/main/resources/import.sql
===================================================================
--- trunk/test-applications/realworld2/ejb/src/main/resources/import.sql 2009-02-25 08:35:13 UTC (rev 12735)
+++ trunk/test-applications/realworld2/ejb/src/main/resources/import.sql 2009-02-25 11:06:27 UTC (rev 12736)
@@ -3,15 +3,18 @@
INSERT INTO Users(user_id, firstname, secondname, email, login, passwordHash, birthdate) VALUES (3, 'John', 'Smith', 'jsmith(a)jboss.com', 'Noname', '8cb2237d0679ca88db6464eac60da96345513964', '1970-01-08');
INSERT INTO shelfs(shelf_id, name, description, shelf_user_id) VALUES (1, 'Nature', 'Nature pictures', 1);
-INSERT INTO albums(album_id, name, description, shared, album_user_id, parent_shelf_id) VALUES (15, 'Water', 'Rivers pictures', true, 2, null);
+INSERT INTO shelfs(shelf_id, name, description, shelf_user_id) VALUES (2, 'Sport', 'Nature pictures', 1);
+INSERT INTO shelfs(shelf_id, name, description, shelf_user_id) VALUES (3, 'Water', 'Nature pictures', 2);
+INSERT INTO shelfs(shelf_id, name, description, shelf_user_id) VALUES (4, 'Flowers', 'Nature pictures', 3);
+INSERT INTO albums(album_id, name, description, shared, album_user_id, parent_shelf_id) VALUES (15, 'Water', 'Rivers pictures', true, 2, 3);
INSERT INTO albums(album_id, name, description, shared, album_user_id, parent_shelf_id) VALUES (20, 'Sport', 'Nature pictures', true, 1, 1);
-INSERT INTO albums(album_id, name, description, shared, album_user_id, parent_shelf_id) VALUES (26, 'Travel', 'Fun pictures', true, 1, null);
+INSERT INTO albums(album_id, name, description, shared, album_user_id, parent_shelf_id) VALUES (26, 'Travel', 'Fun pictures', true, 1, 2);
INSERT INTO albums(album_id, name, description, shared, album_user_id, parent_shelf_id) VALUES (25, 'Beach', 'Fun pictures', true, 1, 1);
-INSERT INTO albums(album_id, name, description, shared, album_user_id, parent_shelf_id) VALUES (23, 'Flowers', 'Fun pictures', true, 3, null);
+INSERT INTO albums(album_id, name, description, shared, album_user_id, parent_shelf_id) VALUES (23, 'Flowers', 'Fun pictures', true, 3, 4);
INSERT INTO images(image_id, name, path, description, created, img_album_id, cameraModel, height, size, width, uploaded) VALUES (98, 'korana', 'Viking/15/korana.jpg', 'korana', '2008-12-18', 15, 'Canon S3', 1024, 1917.000000, 768, '2008-12-01');
15 years, 1 month
JBoss Rich Faces SVN: r12735 - trunk/test-applications/realworld2/web/src/main/webapp/layout.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2009-02-25 03:35:13 -0500 (Wed, 25 Feb 2009)
New Revision: 12735
Added:
trunk/test-applications/realworld2/web/src/main/webapp/layout/template.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/layout/template2.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/layout/template3.xhtml
Log:
Added: trunk/test-applications/realworld2/web/src/main/webapp/layout/template.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/realworld2/web/src/main/webapp/layout/template.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added: trunk/test-applications/realworld2/web/src/main/webapp/layout/template2.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/realworld2/web/src/main/webapp/layout/template2.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added: trunk/test-applications/realworld2/web/src/main/webapp/layout/template3.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/realworld2/web/src/main/webapp/layout/template3.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
15 years, 1 month
JBoss Rich Faces SVN: r12734 - in trunk/test-applications/seleniumTest/richfaces/src: main/webapp/layout/autotest and 3 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: dsvyatobatsko
Date: 2009-02-24 13:59:11 -0500 (Tue, 24 Feb 2009)
New Revision: 12734
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/autotest/bean/AutoTestBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/layout/autotest/autoTestControls.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/inputNumberSlider/inputNumberSliderAutoTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/AutoTester.java
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/InputNumberSliderTest.java
Log:
https://jira.jboss.org/jira/browse/RF-5856
https://jira.jboss.org/jira/browse/RF-5864
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/autotest/bean/AutoTestBean.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/autotest/bean/AutoTestBean.java 2009-02-24 18:12:08 UTC (rev 12733)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/autotest/bean/AutoTestBean.java 2009-02-24 18:59:11 UTC (rev 12734)
@@ -112,6 +112,8 @@
private boolean required;
+ private boolean disabled;
+
public class AutoTestConverter implements Converter {
public static final String AS_OBJECT_STRING = "AUTO_TEST_CONVERTER_AS_OBJECT";
@@ -531,13 +533,29 @@
this.required = required;
}
- public boolean isProcessExternalValidationSet() {
- return processExternalValidationSet;
- }
+ /**
+ * Gets value of disabled field.
+ * @return value of disabled field
+ */
+ public boolean isDisabled() {
+ return disabled;
+ }
- public void setProcessExternalValidationSet(boolean processExternalValidationSet) {
- this.processExternalValidationSet = processExternalValidationSet;
- }
+ /**
+ * Set a new value for disabled field.
+ * @param disabled a new value for disabled field
+ */
+ public void setDisabled(boolean disabled) {
+ this.disabled = disabled;
+ }
+
+ public boolean isProcessExternalValidationSet() {
+ return processExternalValidationSet;
+ }
+
+ public void setProcessExternalValidationSet(boolean processExternalValidationSet) {
+ this.processExternalValidationSet = processExternalValidationSet;
+ }
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/layout/autotest/autoTestControls.xhtml
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/webapp/layout/autotest/autoTestControls.xhtml 2009-02-24 18:12:08 UTC (rev 12733)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/webapp/layout/autotest/autoTestControls.xhtml 2009-02-24 18:59:11 UTC (rev 12734)
@@ -79,7 +79,13 @@
</td>
</tr>
<tr>
+ <td>Disabled:</td>
<td>
+ <h:selectBooleanCheckbox id="_auto_disabled" value="#{autoTestBean.disabled}"></h:selectBooleanCheckbox>
+ </td>
+ </tr>
+ <tr>
+ <td>
<h:commandButton id="_auto_load" actionListener="#{templateBean.reset}" action="#{autoTestBean.load}" value="Load"></h:commandButton>
</td>
<td>
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/inputNumberSlider/inputNumberSliderAutoTest.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/AutoTester.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/AutoTester.java 2009-02-24 18:12:08 UTC (rev 12733)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/AutoTester.java 2009-02-24 18:59:11 UTC (rev 12734)
@@ -755,6 +755,14 @@
return true;
}
+ public void disableComponent(boolean disabled) {
+ reset();
+ if (disabled) {
+ setupControl(TestSetupEntry.disabled, Boolean.TRUE);
+ }
+ clickLoad();
+ }
+
private String getStatus() {
return base.getTextById(base.getParentId() + AUTOTEST_FORM_ID + STATUS_ID);
}
@@ -804,6 +812,8 @@
public static final TestSetupEntry required = new TestSetupEntry("required", Boolean.class, Boolean.FALSE);
+ public static final TestSetupEntry disabled = new TestSetupEntry("disabled", Boolean.class, Boolean.FALSE);
+
public static final List<TestSetupEntry> list = new ArrayList<TestSetupEntry>();
static {
list.add(reRender);
@@ -818,6 +828,7 @@
list.add(process);
list.add(processExternalValidation);
list.add(required);
+ list.add(disabled);
}
}
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/InputNumberSliderTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/InputNumberSliderTest.java 2009-02-24 18:12:08 UTC (rev 12733)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/InputNumberSliderTest.java 2009-02-24 18:59:11 UTC (rev 12734)
@@ -137,6 +137,25 @@
tester.testSubmitImmediate();
}
+ @Test
+ public void testValidatorAndValidatorMessageAttributes(Template template) {
+ AutoTester tester = getAutoTester(this);
+ tester.renderPage(template, RESET_METHOD);
+ writeStatus("Check validator and validatorMessage attributes");
+ tester.testValidatorAndValidatorMessageAttributes(true);
+ }
+
+ @Test
+ public void testDisabledAttribute(Template template) {
+ AutoTester tester = getAutoTester(this);
+ tester.renderPage(template, RESET_METHOD);
+ writeStatus("Check component can be disabled");
+
+ tester.disableComponent(true);
+ String inputId = getAutoTester(this).getClientId(AutoTester.COMPONENT_ID) + "Input";
+ Assert.assertFalse(selenium.isEditable(inputId), "Slider's input has to be read only");
+ }
+
private String getSliderValue() {
return selenium.getValue("name=" + getParentId() + FORM_ID + "componentId");
}
15 years, 1 month