Author: dsvyatobatsko
Date: 2008-09-03 04:43:58 -0400 (Wed, 03 Sep 2008)
New Revision: 10288
Added:
trunk/test-applications/seleniumTest/richfaces/src/
trunk/test-applications/seleniumTest/richfaces/src/main/
trunk/test-applications/seleniumTest/richfaces/src/main/java/
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JActionParam.java
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JCommandTestBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JFormTestBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JHTMLCommandLinkTestBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JIncludeTestBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JKeepAliveTestBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JOutputPanelTestBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JPollTestBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JRegionTestBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JRepeatItemTestBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JRepeatTestBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JStatusTestBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JSupport.java
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4jTestBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/AjaxListenerTestBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/AjaxPushTestBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/Bean.java
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/CalendarTestBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ChildBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ComboBoxTestBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/Configurator.java
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ContextMenuTestBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/Data.java
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/DataBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/DataFilterSliderBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/DataTableBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/DropDownMenuTestBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/EnclosedData.java
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/IndexBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/InplaceInputTestBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/InplaceSelectTestBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/InputNumberSliderBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/JSFunctionBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ListAction.java
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ListShuttleBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/LoadBundleTestBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/Media.java
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/MediaBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/MediaData.java
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/MessageBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ModalPanelTestBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/NavigateBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ObjectNotFoundException.java
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/OrderingListTestBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/PageDescriptionBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/PagesBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/PickListTestBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/Planet.java
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ProgressBarTestBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/RepeatData.java
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/RichPanelTestBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/TemplateBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/TestBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/TestListener.java
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/TimerBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ToolBarTestBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/model/
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/model/Column.java
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/model/ListShuttleConverter.java
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/model/ListShuttleItem.java
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/template/
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/template/Template.java
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/template/TestConstants.java
trunk/test-applications/seleniumTest/richfaces/src/main/resources/
trunk/test-applications/seleniumTest/richfaces/src/main/resources/org/
trunk/test-applications/seleniumTest/richfaces/src/main/resources/org/ajax4jsf/
trunk/test-applications/seleniumTest/richfaces/src/main/resources/org/ajax4jsf/css/
trunk/test-applications/seleniumTest/richfaces/src/main/resources/org/ajax4jsf/css/loadStyleTest.css
trunk/test-applications/seleniumTest/richfaces/src/main/resources/org/ajax4jsf/js/
trunk/test-applications/seleniumTest/richfaces/src/main/resources/org/ajax4jsf/js/loadScriptTest.js
trunk/test-applications/seleniumTest/richfaces/src/main/resources/org/ajax4jsf/message/
trunk/test-applications/seleniumTest/richfaces/src/main/resources/org/ajax4jsf/message/resources_en_US.properties
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/META-INF/
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/META-INF/MANIFEST.MF
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/WEB-INF/
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/WEB-INF/.faces-config.xml.jsfdia
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/WEB-INF/faces-config.xml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/WEB-INF/lib/
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/WEB-INF/web.xml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/index.jsp
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/index.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/layout/
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/layout/controlLayout.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/layout/layout.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/actionParam/
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/actionParam/actionParam.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxCommandButton/
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxCommandButton/ajaxButtonTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxCommandLink/
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxCommandLink/ajaxLinkTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxForm/
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxForm/ajaxFormTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxHTMLCommandLink/
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxHTMLCommandLink/ajaxHTMLLinkTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxInclude/
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxInclude/ajaxIncludeTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxInclude/include1.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxInclude/include2.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxInclude/include3.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxInclude/step1.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxInclude/step2.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxListener/
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxListener/ajaxListenerTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxLog/
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxLog/ajaxLogTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxMediaOutput/
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxMediaOutput/ajaxMediaOutputTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxOutputPanel/
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxOutputPanel/ajaxOutputPanelTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxPoll/
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxPoll/ajaxPollTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxPush/
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxPush/ajaxPushTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxRegion/
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxRegion/ajaxRegionTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxRepeat/
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxRepeat/ajaxRepeatTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxStatus/
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxStatus/ajaxStatusDescription.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxStatus/ajaxStatusTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxSupport/
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxSupport/ajaxSupport.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/calendar/
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/calendar/calendarTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/columns/
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/columns/columnsTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/comboBox/
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/comboBox/comboBoxTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/contextMenu/
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/contextMenu/contextMenu.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/contextMenu/contextMenuDescription.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/dataFilterSlider/
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/dataFilterSlider/dataFilterSliderTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/dataTable/
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/dataTable/dataTableTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/dropDownMenu/
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/dropDownMenu/dropDownMenuTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/inplaceInput/
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/inplaceInput/inplaceInputTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/inplaceSelect/
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/inplaceSelect/inplaceSelectTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/inputNumberSlider/
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/inputNumberSlider/inputNumberSliderTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/inputNumberSpinner/
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/inputNumberSpinner/inputNumberSpinnerTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/jsFunction/
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/jsFunction/jsFunctionDescription.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/jsFunction/jsFunctionTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/keepAlive/
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/keepAlive/keepAliveTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/listShuttle/
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/listShuttle/listShuttleTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/loadBundle/
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/loadBundle/loadBundle.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/loadScript/
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/loadScript/loadScriptDescription.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/loadScript/loadScriptTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/loadStyle/
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/loadStyle/loadStyleDescription.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/loadStyle/loadStyleTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/modalPanel/
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/modalPanel/modalPanelTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/orderingList/
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/orderingList/orderingListDescription.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/orderingList/orderingListTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/panelBar/
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/panelBar/panelBarDescription.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/panelBar/panelBarTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/panelMenu/
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/panelMenu/panelMenuDescription.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/panelMenu/panelMenuTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/pickList/
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/pickList/pickListTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/progressBar/
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/progressBar/progressBarDescription.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/progressBar/progressBarTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/simpleTogglePanel/
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/simpleTogglePanel/simpleTogglePanel.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/simpleTogglePanel/simpleTogglePanelDescription.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/spacer/
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/spacer/spacerTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/tabPanel/
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/tabPanel/tabPanelDescription.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/tabPanel/tabPanelTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/togglePanel/
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/togglePanel/togglePanelDescription.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/togglePanel/togglePanelTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/toolBar/
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/toolBar/eventTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/toolBar/toolBarTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/template/
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/template/dataTable.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/template/modalPanel.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/template/simple.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/test.xhtml
trunk/test-applications/seleniumTest/richfaces/src/test/
trunk/test-applications/seleniumTest/richfaces/src/test/java/
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/RichSeleniumTest.java
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/SeleniumTestBase.java
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/TestAnnotationTransformer.java
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxActionParameterTest.java
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxCommandButtonTest.java
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxCommandLinkTest.java
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxFormTest.java
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxHTMLCommandLinkTest.java
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxIncludeTest.java
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxListenerTest.java
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxLoadBundleTest.java
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxLogTest.java
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxMediaOutputTest.java
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxOutputPanelTest.java
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxPollTest.java
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxPushTest.java
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxRegionTest.java
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxRepeatTest.java
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxStatusTest.java
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxSupportTest.java
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ColumnsTest.java
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ComboBoxTest.java
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ContextMenuTest.java
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/DataFilterSliderTest.java
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/DataTableTest.java
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/DropDownMenuTest.java
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/InplaceInputTest.java
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/InplaceSelectTest.java
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/InputNumberSliderTest.java
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/InputNumberSpinnerTest.java
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/JSFunctionTest.java
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/KeepAliveTest.java
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ListShuttleTest.java
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/LoadScriptTest.java
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/LoadStyleTest.java
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ModalPanelTest.java
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/OrderingListTest.java
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/PanelBarTest.java
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/PanelMenuTest.java
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/PickListTest.java
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ProgressBarTest.java
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/SimpleTogglePanelTest.java
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/SpacerTest.java
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/TabPanelTest.java
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/TogglePanelTest.java
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ToolBarTest.java
trunk/test-applications/seleniumTest/richfaces/src/test/testng/
trunk/test-applications/seleniumTest/richfaces/src/test/testng/unix/
trunk/test-applications/seleniumTest/richfaces/src/test/testng/unix/testng.xml
trunk/test-applications/seleniumTest/richfaces/src/test/testng/unix/testng_default_default_neko.xml
trunk/test-applications/seleniumTest/richfaces/src/test/testng/win/
trunk/test-applications/seleniumTest/richfaces/src/test/testng/win/testng_all_all_neko.xml
trunk/test-applications/seleniumTest/richfaces/src/test/testng/win/testng_all_all_none.xml
trunk/test-applications/seleniumTest/richfaces/src/test/testng/win/testng_all_all_tidy.xml
trunk/test-applications/seleniumTest/richfaces/src/test/testng/win/testng_all_default_neko.xml
trunk/test-applications/seleniumTest/richfaces/src/test/testng/win/testng_all_default_none.xml
trunk/test-applications/seleniumTest/richfaces/src/test/testng/win/testng_all_default_tidy.xml
trunk/test-applications/seleniumTest/richfaces/src/test/testng/win/testng_default_all_neko.xml
trunk/test-applications/seleniumTest/richfaces/src/test/testng/win/testng_default_all_none.xml
trunk/test-applications/seleniumTest/richfaces/src/test/testng/win/testng_default_all_tidy.xml
trunk/test-applications/seleniumTest/richfaces/src/test/testng/win/testng_default_default_neko.xml
trunk/test-applications/seleniumTest/richfaces/src/test/testng/win/testng_default_default_none.xml
trunk/test-applications/seleniumTest/richfaces/src/test/testng/win/testng_default_default_tidy.xml
Log:
lost data + dataFilterSliderTest
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JActionParam.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JActionParam.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JActionParam.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,75 @@
+package org.ajax4jsf.bean;
+
+import java.util.Map;
+
+import javax.faces.context.FacesContext;
+import javax.faces.event.ActionEvent;
+
+import com.sun.faces.context.FacesContextImpl;
+
+public class A4JActionParam {
+
+ private static final String PARAMETER_NAME = "param";
+
+ private static final String PARAMETER_VALUE = "Action Parameter";
+
+ public static class ERRORS {
+ public static final String NO_PARAM = "1";
+
+ public static final String INVALID_VALUE = "2";
+
+ public static final String NOT_ASSIGNED = "3";
+ }
+
+ private String parameterName;
+
+ private String parameterValue;
+
+ private String errorMessage = null;
+
+ public void listener(ActionEvent event) {
+ FacesContext context = FacesContextImpl.getCurrentInstance();
+ Map<String, String> p = context.getExternalContext().getRequestParameterMap();
+ if (p.get(PARAMETER_NAME) == null) {
+ errorMessage = ERRORS.NO_PARAM;
+ } else if (!PARAMETER_VALUE.equals(p.get(PARAMETER_NAME))) {
+ errorMessage = ERRORS.INVALID_VALUE;
+ } else if (parameterValue == null) {
+ errorMessage = ERRORS.NOT_ASSIGNED;
+ } else {
+ parameterName = PARAMETER_NAME;
+ }
+
+ }
+
+ /**
+ * @return the parameter
+ */
+ public String getParameter() {
+ return (errorMessage == null && (parameterName != null ||
parameterValue!=null)) ? (parameterName + "='" + parameterValue +
"'") : "";
+ }
+
+ /**
+ * @param parameter the parameter to set
+ */
+ public void setParameter(String parameter) {
+ ;
+ }
+
+ /**
+ * @return the parameterValue
+ */
+ public String getParameterValue() {
+ return parameterValue;
+ }
+
+ /**
+ * @param parameterValue the parameterValue to set
+ */
+ public void setParameterValue(String parameterValue) {
+ this.parameterValue = parameterValue;
+ }
+
+
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JActionParam.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JCommandTestBean.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JCommandTestBean.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JCommandTestBean.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,86 @@
+package org.ajax4jsf.bean;
+
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.faces.context.FacesContext;
+import javax.faces.event.ActionEvent;
+
+import org.ajax4jsf.context.AjaxContext;
+import org.ajax4jsf.context.AjaxContextImpl;
+
+import com.sun.faces.context.FacesContextImpl;
+
+public class A4JCommandTestBean {
+
+ private String value;
+
+ private boolean rendered = true;
+
+ private AjaxContext getAjaxContext () {
+ FacesContext context = FacesContextImpl.getCurrentInstance();
+ if (context != null) {
+ return AjaxContextImpl.getCurrentInstance(context);
+ }
+ return null;
+ }
+
+ @SuppressWarnings("unchecked")
+ private void put2ResponseData(String key, Object value) {
+ AjaxContext ajaxContext = getAjaxContext();
+ if (ajaxContext != null) {
+ Map<String, Object> data = (Map<String,
Object>)ajaxContext.getResponseData();
+ if (null == data) {
+ data = new HashMap<String, Object>();
+ ajaxContext.setResponseData(data);
+ }
+ data.put(key, value);
+ }
+ }
+
+ public String action () {
+ put2ResponseData("action", true);
+ return null;
+ }
+
+ public void actionListener (ActionEvent event) {
+ put2ResponseData("actionListener", true);
+ }
+
+ /**
+ * @return the value
+ */
+ public String getValue() {
+ return value;
+ }
+
+ /**
+ * @param value the value to set
+ */
+ public void setValue(String value) {
+ this.value = value;
+ put2ResponseData("input", true);
+ }
+
+ public boolean isRendered() {
+ return rendered;
+ }
+
+ public String reRender(){
+ this.setRendered(!rendered);
+ return null;
+ }
+
+ /**
+ * @param value the value to set
+ */
+ public void setRendered(boolean rendered) {
+ this.rendered = rendered;
+ }
+
+ public String getDate () {
+ return String.valueOf(Math.random());
+ }
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JCommandTestBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JFormTestBean.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JFormTestBean.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JFormTestBean.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,79 @@
+package org.ajax4jsf.bean;
+
+public class A4JFormTestBean {
+
+ private String name = "before submit";
+
+ private Boolean ajaxSubmit;
+
+ private Boolean ignoreDupResponses;
+
+ private Boolean prependId;
+
+ private String rerender = "";
+
+ private Boolean rendered = false;
+
+ public String getRerender() {
+ return rerender;
+ }
+
+ public void setRerender(String rerender) {
+ this.rerender = rerender;
+ }
+
+ public Boolean getAjaxSubmit() {
+ return ajaxSubmit;
+ }
+
+ public void setAjaxSubmit(Boolean ajaxSubmit) {
+ this.ajaxSubmit = ajaxSubmit;
+ }
+
+ public Boolean getIgnoreDupResponses() {
+ return ignoreDupResponses;
+ }
+
+ public void setIgnoreDupResponses(Boolean ignoreDupResponses) {
+ this.ignoreDupResponses = ignoreDupResponses;
+ }
+
+ public Boolean getPrependId() {
+ return prependId;
+ }
+
+ public void setPrependId(Boolean prependId) {
+ this.prependId = prependId;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public Boolean getRendered() {
+ return rendered;
+ }
+
+ public void setRendered(Boolean rendered) {
+ this.rendered = rendered;
+ }
+
+ public void changeName() {
+ this.name = "after submit";
+ }
+
+ public String reset() {
+ name = "before submit";
+ ajaxSubmit = false;
+ ignoreDupResponses = false;
+ prependId = false;
+ rerender = "";
+ rendered = false;
+ return null;
+ }
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JFormTestBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JHTMLCommandLinkTestBean.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JHTMLCommandLinkTestBean.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JHTMLCommandLinkTestBean.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,54 @@
+package org.ajax4jsf.bean;
+
+import javax.faces.event.ActionEvent;
+
+public class A4JHTMLCommandLinkTestBean {
+
+ private boolean rendered = false;
+ private boolean isListenerInvoked = false;
+ private boolean isActionInvoked = false;
+
+ private String value;
+
+ public boolean isRendered() {
+ return rendered;
+ }
+
+ public void setRendered(boolean rendered) {
+ this.rendered = rendered;
+ }
+
+ public String action() {
+ setActionInvoked(true);
+ return null;
+ }
+
+ public void actionListener (ActionEvent event) {
+ setListenerInvoked(true);
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+
+ public boolean isListenerInvoked() {
+ return isListenerInvoked;
+ }
+
+ public void setListenerInvoked(boolean isListenerInvoked) {
+ this.isListenerInvoked = isListenerInvoked;
+ }
+
+ public boolean isActionInvoked() {
+ return isActionInvoked;
+ }
+
+ public void setActionInvoked(boolean isActionInvoked) {
+ this.isActionInvoked = isActionInvoked;
+ }
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JHTMLCommandLinkTestBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JIncludeTestBean.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JIncludeTestBean.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JIncludeTestBean.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,140 @@
+/*
+ * A4JIncludeTestBean.java Date created: 26.06.2008
+ * Last modified by: $Author$
+ * $Revision$ $Date$
+ */
+
+package org.ajax4jsf.bean;
+
+/**
+ * A4JInclude Test Bean
+ * @author Alexandr Levkovsky
+ *
+ */
+public class A4JIncludeTestBean {
+
+ private Integer include1Counter = 0;
+ private Integer include2Counter = 0;
+ private Integer include3Counter = 0;
+ private Boolean include3ChildRenderedFlag = true;
+ private Boolean include4RenderedFlag = true;
+ private String inputValue;
+
+ /**
+ * @return the inputValue
+ */
+ public String getInputValue() {
+ return inputValue;
+ }
+
+ /**
+ * @param inputValue the inputValue to set
+ */
+ public void setInputValue(String inputValue) {
+ this.inputValue = inputValue;
+ }
+
+ /**
+ * @return the include1Counter
+ */
+ public Integer getInclude1Counter() {
+ return include1Counter;
+ }
+
+ /**
+ * @param include1Counter the include1Counter to set
+ */
+ public void setInclude1Counter(Integer include1Counter) {
+ this.include1Counter = include1Counter;
+ }
+
+ /**
+ * @return the include2Counter
+ */
+ public Integer getInclude2Counter() {
+ return include2Counter;
+ }
+
+ /**
+ * @param include2Counter the include2Counter to set
+ */
+ public void setInclude2Counter(Integer include2Counter) {
+ this.include2Counter = include2Counter;
+ }
+
+ /**
+ * @return the include3Counter
+ */
+ public Integer getInclude3Counter() {
+ return include3Counter;
+ }
+
+ /**
+ * @param include3Counter the include3Counter to set
+ */
+ public void setInclude3Counter(Integer include3Counter) {
+ this.include3Counter = include3Counter;
+ }
+
+ /**
+ * @return the include4RenderedFlag
+ */
+ public Boolean getInclude4RenderedFlag() {
+ return include4RenderedFlag;
+ }
+
+ /**
+ * @param include4RenderedFlag the include4RenderedFlag to set
+ */
+ public void setInclude4RenderedFlag(Boolean include4RenderedFlag) {
+ this.include4RenderedFlag = include4RenderedFlag;
+ }
+
+
+
+ /**
+ * @return the include3ChildRenderedFlag
+ */
+ public Boolean getInclude3ChildRenderedFlag() {
+ return include3ChildRenderedFlag;
+ }
+
+ /**
+ * @param include3ChildRenderedFlag the include3ChildRenderedFlag to set
+ */
+ public void setInclude3ChildRenderedFlag(Boolean include3ChildRenderedFlag) {
+ this.include3ChildRenderedFlag = include3ChildRenderedFlag;
+ }
+
+ public String b1Action() {
+ include2Counter++;
+ return null;
+ }
+
+ public String b2Action() {
+ include1Counter++;
+ include2Counter++;
+ return null;
+ }
+
+ public String b3Action() {
+ include3Counter++;
+ include3ChildRenderedFlag = false;
+ return null;
+ }
+
+ public String b4Action() {
+ setInclude4RenderedFlag(include4RenderedFlag ? false : true);
+ return null;
+ }
+
+ public String reset() {
+ include1Counter = 0;
+ include2Counter = 0;
+ include3Counter = 0;
+ include3ChildRenderedFlag = true;
+ include4RenderedFlag = true;
+ return null;
+ }
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JIncludeTestBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JKeepAliveTestBean.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JKeepAliveTestBean.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JKeepAliveTestBean.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,47 @@
+package org.ajax4jsf.bean;
+
+public class A4JKeepAliveTestBean {
+
+ /* result */
+ private Integer sum = 0;
+
+ /* value to be added to result */
+ private Integer augend = 5;
+
+ /**
+ * Gets value of sum field.
+ * @return value of sum field
+ */
+ public Integer getSum() {
+ return sum;
+ }
+
+ /**
+ * Set a new value for sum field.
+ * @param sum a new value for sum field
+ */
+ public void setSum(Integer sum) {
+ this.sum = sum;
+ }
+
+ /**
+ * Gets value of augend field.
+ * @return value of augend field
+ */
+ public Integer getAugend() {
+ return augend;
+ }
+
+ /**
+ * Set a new value for augend field.
+ * @param augend a new value for augend field
+ */
+ public void setAugend(Integer augend) {
+ this.augend = augend;
+ }
+
+ public String doSum() {
+ sum += augend;
+ return null;
+ }
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JKeepAliveTestBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JOutputPanelTestBean.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JOutputPanelTestBean.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JOutputPanelTestBean.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,105 @@
+/*
+ * A4JOutputPanelTestBean.java Date created: 11.06.2008
+ * Last modified by: $Author$
+ * $Revision$ $Date$
+ */
+
+package org.ajax4jsf.bean;
+
+/**
+ * A4JOutputPanel Test Bean
+ * @author Alexandr Levkovsky
+ *
+ */
+public class A4JOutputPanelTestBean {
+
+ private Boolean panel1VisibleFlag = true;
+ private Boolean panel2VisibleFlag = true;
+ private Boolean panel3VisibleFlag = true;
+ private Boolean panel4VisibleFlag = true;
+
+ /**
+ * @return the panel1VisibleFlag
+ */
+ public Boolean getPanel1VisibleFlag() {
+ return panel1VisibleFlag;
+ }
+
+ /**
+ * @param panel1VisibleFlag the panel1VisibleFlag to set
+ */
+ public void setPanel1VisibleFlag(Boolean panel1VisibleFlag) {
+ this.panel1VisibleFlag = panel1VisibleFlag;
+ }
+
+ /**
+ * @return the panel2VisibleFlag
+ */
+ public Boolean getPanel2VisibleFlag() {
+ return panel2VisibleFlag;
+ }
+
+ /**
+ * @param panel2VisibleFlag the panel2VisibleFlag to set
+ */
+ public void setPanel2VisibleFlag(Boolean panel2VisibleFlag) {
+ this.panel2VisibleFlag = panel2VisibleFlag;
+ }
+
+ /**
+ * @return the panel3VisibleFlag
+ */
+ public Boolean getPanel3VisibleFlag() {
+ return panel3VisibleFlag;
+ }
+
+ /**
+ * @param panel3VisibleFlag the panel3VisibleFlag to set
+ */
+ public void setPanel3VisibleFlag(Boolean panel3VisibleFlag) {
+ this.panel3VisibleFlag = panel3VisibleFlag;
+ }
+
+ /**
+ * @return the panel4VisibleFlag
+ */
+ public Boolean getPanel4VisibleFlag() {
+ return panel4VisibleFlag;
+ }
+
+ /**
+ * @param panel4VisibleFlag the panel4VisibleFlag to set
+ */
+ public void setPanel4VisibleFlag(Boolean panel4VisibleFlag) {
+ this.panel4VisibleFlag = panel4VisibleFlag;
+ }
+
+ public String b1Action(){
+ setPanel2VisibleFlag(false);
+ return null;
+ }
+
+ public String b2Action(){
+ setPanel1VisibleFlag(false);
+ setPanel2VisibleFlag(false);
+ return null;
+ }
+
+ public String b3Action(){
+ setPanel3VisibleFlag(false);
+ return null;
+ }
+
+ public String b4Action(){
+ setPanel4VisibleFlag(false);
+ return null;
+ }
+
+ public String reset(){
+ setPanel1VisibleFlag(true);
+ setPanel2VisibleFlag(true);
+ setPanel3VisibleFlag(true);
+ setPanel4VisibleFlag(true);
+ return null;
+ }
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JOutputPanelTestBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JPollTestBean.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JPollTestBean.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JPollTestBean.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,58 @@
+package org.ajax4jsf.bean;
+
+import javax.faces.event.ActionEvent;
+
+public class A4JPollTestBean {
+
+ private Integer i = 1;
+
+ private static final String POLLING = "Polling";
+
+ private boolean enabled = false;
+
+ public void start(ActionEvent event) {
+ enabled = true;
+ }
+
+ public void listener(ActionEvent event) {
+ i++;
+ if (i == 8) {
+ enabled = false;
+ }
+ }
+
+ public String getText() {
+ return POLLING.substring(0, i);
+ }
+
+ /**
+ * @return the i
+ */
+ public Integer getI() {
+ return i;
+ }
+
+ /**
+ * @param i the i to set
+ */
+ public void setI(Integer i) {
+ this.i = i;
+ }
+
+ /**
+ * @return the enabled
+ */
+ public boolean isEnabled() {
+ return enabled;
+ }
+
+ /**
+ * @param enabled the enabled to set
+ */
+ public void setEnabled(boolean enabled) {
+ this.enabled = enabled;
+ }
+
+
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JPollTestBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JRegionTestBean.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JRegionTestBean.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JRegionTestBean.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,67 @@
+package org.ajax4jsf.bean;
+
+public class A4JRegionTestBean {
+
+ private Integer internal = 0;
+
+ private Integer external = 0;
+
+ private Integer value = 0;
+
+ /**
+ * Gets value of internal field.
+ *
+ * @return value of internal field
+ */
+ public Integer getInternal() {
+ return internal;
+ }
+
+ /**
+ * Set a new value for internal field.
+ *
+ * @param internal
+ * a new value for internal field
+ */
+ public void setInternal(Integer internal) {
+ this.internal = internal;
+ }
+
+ /**
+ * Gets value of external field.
+ *
+ * @return value of external field
+ */
+ public Integer getExternal() {
+ return external;
+ }
+
+ /**
+ * Set a new value for external field.
+ *
+ * @param external
+ * a new value for external field
+ */
+ public void setExternal(Integer external) {
+ this.external = external;
+ }
+
+ /**
+ * Gets value of value field.
+ *
+ * @return value of value field
+ */
+ public Integer getValue() {
+ return value;
+ }
+
+ /**
+ * Set a new value for value field.
+ *
+ * @param value
+ * a new value for value field
+ */
+ public void setValue(Integer value) {
+ this.value = value;
+ }
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JRegionTestBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JRepeatItemTestBean.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JRepeatItemTestBean.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JRepeatItemTestBean.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,106 @@
+/*
+ * A4JRepeatItemTestBean.java Date created: 24.06.2008
+ * Last modified by: $Author$
+ * $Revision$ $Date$
+ */
+
+package org.ajax4jsf.bean;
+
+/**
+ * TODO Class description goes here.
+ * @author Alexandr Levkovsky
+ *
+ */
+public class A4JRepeatItemTestBean {
+
+ private Integer number;
+
+ private Integer output;
+
+ private Integer input;
+
+ private Integer rerenderedChangeCounter;
+
+ private Integer notRerenderedChangeCounter;
+
+ A4JRepeatItemTestBean(Integer index) {
+ this.number = index;
+ this.input = index;
+ this.output = index;
+ this.rerenderedChangeCounter = 0;
+ this.notRerenderedChangeCounter = 0;
+ }
+
+ /**
+ * @return the number
+ */
+ public Integer getNumber() {
+ return number;
+ }
+
+ /**
+ * @param number the number to set
+ */
+ public void setNumber(Integer number) {
+ this.number = number;
+ }
+
+ /**
+ * @return the output
+ */
+ public Integer getOutput() {
+ return output;
+ }
+
+ /**
+ * @param output the output to set
+ */
+ public void setOutput(Integer output) {
+ this.output = output;
+ }
+
+ /**
+ * @return the input
+ */
+ public Integer getInput() {
+ return input;
+ }
+
+ /**
+ * @param input the input to set
+ */
+ public void setInput(Integer input) {
+ this.input = input;
+ }
+
+ /**
+ * @return the rerenderedChangeCounter
+ */
+ public Integer getRerenderedChangeCounter() {
+ return rerenderedChangeCounter;
+ }
+
+ /**
+ * @param rerenderedChangeCounter the rerenderedChangeCounter to set
+ */
+ public void setRerenderedChangeCounter(Integer rerenderedChangeCounter) {
+ this.rerenderedChangeCounter = rerenderedChangeCounter;
+ }
+
+ /**
+ * @return the notRerenderedChangeCounter
+ */
+ public Integer getNotRerenderedChangeCounter() {
+ return notRerenderedChangeCounter;
+ }
+
+ /**
+ * @param notRerenderedChangeCounter the notRerenderedChangeCounter to set
+ */
+ public void setNotRerenderedChangeCounter(Integer notRerenderedChangeCounter) {
+ this.notRerenderedChangeCounter = notRerenderedChangeCounter;
+ }
+
+
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JRepeatItemTestBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
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
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JRepeatTestBean.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,184 @@
+/*
+ * A4JRepeatTestBean.java Date created: 19.06.2008
+ * Last modified by: $Author$
+ * $Revision$ $Date$
+ */
+
+package org.ajax4jsf.bean;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.ajax4jsf.component.UIRepeat;
+
+/**
+ * a4j:repeat component test bean
+ * @author Alexandr Levkovsky
+ *
+ */
+public class A4JRepeatTestBean {
+
+ private Integer first = 0;
+
+ private Integer rows = 5;
+
+ private Integer visible = 0;
+
+ private List<A4JRepeatItemTestBean> items;
+
+ private UIRepeat repeater;
+
+ private Boolean rendered = true;
+
+ private Set<Integer> keys = null;
+
+ /**
+ * @return the first
+ */
+ public Integer getFirst() {
+ return first;
+ }
+
+ /**
+ * @param first the first to set
+ */
+ public void setFirst(Integer first) {
+ this.first = first;
+ }
+
+ /**
+ * @return the rows
+ */
+ public Integer getRows() {
+ return rows;
+ }
+
+ /**
+ * @param rows the rows to set
+ */
+ public void setRows(Integer rows) {
+ this.rows = rows;
+ }
+
+ /**
+ * @return the items
+ */
+ public List<A4JRepeatItemTestBean> getItems() {
+ if (items == null) {
+ generateItems(getRows());
+ }
+ return items;
+ }
+
+ /**
+ * @param items the items to set
+ */
+ public void setItems(List<A4JRepeatItemTestBean> items) {
+ this.items = items;
+ }
+
+ /**
+ * @return the repeater
+ */
+ public UIRepeat getRepeater() {
+ return repeater;
+ }
+
+ /**
+ * @param repeater the repeater to set
+ */
+ public void setRepeater(UIRepeat repeater) {
+ this.repeater = repeater;
+ }
+
+ /**
+ * @return the rendered
+ */
+ public Boolean getRendered() {
+ return rendered;
+ }
+
+ /**
+ * @param rendered the rendered to set
+ */
+ public void setRendered(Boolean rendered) {
+ this.rendered = rendered;
+ }
+
+
+
+ /**
+ * @return the visible
+ */
+ public Integer getVisible() {
+ return visible;
+ }
+
+ /**
+ * @param visible the visible to set
+ */
+ public void setVisible(Integer visible) {
+ this.visible = visible;
+ }
+
+ private void generateItems(Integer rows) {
+ items = new ArrayList<A4JRepeatItemTestBean>(rows);
+ for (int i = 0; i < rows; i++) {
+ A4JRepeatItemTestBean item = new A4JRepeatItemTestBean(i);
+ items.add(item);
+
+ }
+ }
+
+ public String init(){
+ generateItems(getRows());
+ return null;
+ }
+
+ public String reset(){
+ setRows(5);
+ setRendered(true);
+ setVisible(0);
+ setFirst(0);
+ generateItems(getRows());
+ return null;
+ }
+
+ /**
+ * @return the keys
+ */
+ public Set<Integer> getKeys() {
+ return keys;
+ }
+
+ /**
+ * @param keys the keys to set
+ */
+ public void setKeys(Set<Integer> keys) {
+ this.keys = keys;
+ }
+
+ public String change() {
+ Set<Integer> keys = new HashSet<Integer>();
+ int rowKey = getRepeater().getRowIndex();
+ keys.add(rowKey);
+ setKeys(keys);
+ for (A4JRepeatItemTestBean item : items) {
+ item.setNotRerenderedChangeCounter(item.getNotRerenderedChangeCounter() + 1);
+ item.setRerenderedChangeCounter(item.getRerenderedChangeCounter() + 1);
+ }
+ return null;
+ }
+
+ public String changeWhithoutAjaxKeys() {
+ setKeys(null);
+ for (A4JRepeatItemTestBean item : items) {
+ item.setNotRerenderedChangeCounter(item.getNotRerenderedChangeCounter() + 1);
+ item.setRerenderedChangeCounter(item.getRerenderedChangeCounter() + 1);
+ }
+ return null;
+ }
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JRepeatTestBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JStatusTestBean.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JStatusTestBean.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JStatusTestBean.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,16 @@
+package org.ajax4jsf.bean;
+
+import javax.faces.event.ActionEvent;
+
+public class A4JStatusTestBean {
+
+ public void actionListener(ActionEvent event) {
+ //mega time-consuming operation - sleeping
+ try {
+ Thread.sleep(2000);
+ } catch (InterruptedException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JStatusTestBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JSupport.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JSupport.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JSupport.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,52 @@
+package org.ajax4jsf.bean;
+
+import javax.faces.event.ActionEvent;
+
+public class A4JSupport {
+
+ private String data = null;
+
+ public static class Messages {
+ public static final String FOR_LINK = "Link onclick passed";
+
+ public static final String FOR_CHECKBOX = "Checkbox onchange passed";
+
+ public static final String FOR_COMMAND = "Command onclick passed";
+
+ public static final String FOR_SUBMIT = "Default listener";
+
+ public static final String NO_DATA = "nodata";
+ }
+
+ public void linkListener (ActionEvent event) {
+ data = Messages.FOR_LINK;
+ }
+
+ public void checkBoxListener (ActionEvent event) {
+ data = Messages.FOR_CHECKBOX;
+ }
+
+ public void commandListener (ActionEvent event) {
+ data = Messages.FOR_COMMAND;
+ }
+
+ public void listener (ActionEvent event) {
+ data = Messages.FOR_SUBMIT;
+ }
+
+
+ /**
+ * @return the data
+ */
+ public String getData() {
+ return (data != null) ? data : Messages.NO_DATA;
+ }
+
+ /**
+ * @param data the data to set
+ */
+ public void setData(String data) {
+ this.data = data;
+ }
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JSupport.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4jTestBean.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4jTestBean.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4jTestBean.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,45 @@
+package org.ajax4jsf.bean;
+
+import java.util.Map;
+
+import javax.faces.context.FacesContext;
+import javax.faces.event.ActionEvent;
+
+public class A4jTestBean {
+
+ private String param = "Not set yet";
+ private boolean checked;
+
+ public String getParam() {
+ return param;
+ }
+
+ public void setParam(String param) {
+ this.param = param;
+ }
+
+ private void checkMap() {
+ Map<String, String> params =
FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap();
+ for (String key : params.keySet()) {
+ System.out.println(key + "=" + params.get(key));
+ }
+ }
+
+ public void perform(ActionEvent actionEvent) {
+ System.out.println("A4jTestBean.perform(ActionEvent) = " + param);
+ checkMap();
+ }
+
+ public void perform() {
+ System.out.println("A4jTestBean.perform() = " + param);
+ checkMap();
+ }
+
+ public boolean isChecked() {
+ return checked;
+ }
+
+ public void setChecked(boolean checked) {
+ this.checked = checked;
+ }
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4jTestBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/AjaxListenerTestBean.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/AjaxListenerTestBean.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/AjaxListenerTestBean.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,42 @@
+package org.ajax4jsf.bean;
+
+import javax.faces.context.FacesContext;
+
+import org.ajax4jsf.component.UIAjaxCommandLink;
+import org.ajax4jsf.event.AjaxEvent;
+import org.ajax4jsf.event.AjaxListener;
+
+public class AjaxListenerTestBean implements AjaxListener{
+
+ private long number = 0l;
+
+ /**
+ * Gets value of number field.
+ * @return value of number field
+ */
+ public long getNumber() {
+ return number;
+ }
+
+ /**
+ * Set a new value for number field.
+ * @param number a new value for number field
+ */
+ public void setNumber(long number) {
+ this.number = number;
+ }
+
+ /**
+ * @see AjaxListener#processAjax(AjaxEvent)
+ */
+ public void processAjax(AjaxEvent event) {
+ FacesContext ctx = FacesContext.getCurrentInstance();
+ UIAjaxCommandLink link = (UIAjaxCommandLink) event.getComponent();
+ if(ctx.getMessages().hasNext()) {
+ link.setValue("Validation failed, but ajax listener is invoked
anyway");
+ } else {
+ link.setValue("Ajax listener has been invoked successfully");
+ }
+ }
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/AjaxListenerTestBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/AjaxPushTestBean.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/AjaxPushTestBean.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/AjaxPushTestBean.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,88 @@
+package org.ajax4jsf.bean;
+
+import java.util.Date;
+import java.util.EventListener;
+import java.util.EventObject;
+
+import org.ajax4jsf.event.PushEventListener;
+
+public class AjaxPushTestBean implements Runnable {
+
+ private boolean enabled = false;
+
+ private Date startDate;
+
+ private PushEventListener listener;
+
+ private Thread thread;
+
+ private int eventsSent = 0;
+
+ /**
+ * Gets value of eventsSent field.
+ * @return value of eventsSent field
+ */
+ public int getEventsSent() {
+ return eventsSent;
+ }
+
+ /**
+ * Set a new value for eventsSent field.
+ * @param eventsSent a new value for eventsSent field
+ */
+ public void setEventsSent(int eventsSent) {
+ this.eventsSent = eventsSent;
+ }
+
+ public void addListener(EventListener listener) {
+ synchronized (listener) {
+ if (this.listener != listener) {
+ this.listener = (PushEventListener) listener;
+ }
+ }
+ }
+
+ public void run() {
+ while (thread != null) {
+ try {
+ long left = System.currentTimeMillis() - startDate.getTime();
+ if (left >= 60000) {
+ stop();
+ }
+ listener.onEvent(new EventObject(this));
+ eventsSent++;
+ Thread.sleep(2000);
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+
+ public void start() {
+ if (thread == null) {
+ thread = new Thread(this);
+ thread.setDaemon(true);
+ thread.start();
+ startDate = new Date();
+ setEnabled(true);
+ }
+ }
+
+ public void stop() {
+ if (thread != null) {
+ startDate = null;
+ eventsSent = 0;
+ setEnabled(false);
+ thread = null;
+ }
+ }
+
+ public boolean isEnabled() {
+ return enabled;
+ }
+
+ public void setEnabled(boolean enabled) {
+ this.enabled = enabled;
+ }
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/AjaxPushTestBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/Bean.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/Bean.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/Bean.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,206 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library 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 library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.ajax4jsf.bean;
+
+import java.text.DateFormat;
+import java.util.Date;
+
+import javax.faces.application.FacesMessage;
+import javax.faces.component.UIComponent;
+import javax.faces.component.html.HtmlOutputText;
+import javax.faces.context.ExternalContext;
+import javax.faces.context.FacesContext;
+import javax.faces.event.ValueChangeEvent;
+import javax.servlet.http.Cookie;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+
+/**
+ * @author $Autor$
+ *
+ */
+public class Bean {
+
+ private java.lang.String text;
+
+ private String text2="<%%%>";
+
+ private String[] array = {"one]","two]]>"};
+
+ private String[][] array2 =
{{"one","two"},{"three","four"}};
+
+ private UIComponent component;
+
+ private HtmlOutputText outputComponent;
+
+ /**
+ * @return the component
+ */
+ public UIComponent getComponent() {
+ return component;
+ }
+
+ /**
+ * @param component the component to set
+ */
+ public void setComponent(UIComponent component) {
+ this.component = component;
+ }
+
+ public java.lang.String getText() {
+ return text;
+ }
+
+ public void setText(java.lang.String text) {
+ this.text = text;
+ }
+
+ public String ok(){
+ System.out.println("Button pressed");
+ setText("testOk");
+ return null;
+ }
+
+ public String setCookie() {
+ ExternalContext externalContext =
FacesContext.getCurrentInstance().getExternalContext();
+ HttpServletResponse response = (HttpServletResponse)
externalContext.getResponse();
+ Cookie cookie = new Cookie("test", "Setted at time
"+System.currentTimeMillis());
+ cookie.setMaxAge(60 * 60 * 24 * 365);
+ response.addCookie(cookie);
+ return "verify_cookie";
+ }
+
+ public String getTestCookie(){
+ ExternalContext externalContext =
FacesContext.getCurrentInstance().getExternalContext();
+ HttpServletRequest request = (HttpServletRequest) externalContext.getRequest();
+ Cookie[] cookies = request.getCookies();
+ for (int i = 0; i < cookies.length; i++) {
+ if("test".equals(cookies[i].getName())){
+ return cookies[i].getValue();
+ }
+ }
+ return null;
+ }
+
+ /**
+ * @return the array
+ */
+ public String[] getArray() {
+ return array;
+ }
+
+ /**
+ * @param array the array to set
+ */
+ public void setArray(String[] array) {
+ this.array = array;
+ }
+
+ /**
+ * @return the array2
+ */
+ public String[][] getArray2() {
+ return array2;
+ }
+
+ /**
+ * @param array2 the array2 to set
+ */
+ public void setArray2(String[][] array2) {
+ this.array2 = array2;
+ }
+
+ /**
+ * @return the text2
+ */
+ public String getText2() {
+ return text2;
+ }
+
+ /**
+ * @param text2 the text2 to set
+ */
+ public void setText2(String test2) {
+ this.text2 = test2;
+ }
+
+ public void validate(FacesContext context, UIComponent input,Object newValue) {
+ FacesMessage msg = new FacesMessage("#{bean.validate} called");
+ context.addMessage(input.getClientId(context), msg);
+ System.out.println("validate");
+ }
+
+ public void onChange(ValueChangeEvent event) {
+ FacesContext context = FacesContext.getCurrentInstance();
+ UIComponent input = event.getComponent();
+ FacesMessage msg = new FacesMessage("#{bean.onChange} called");
+ context.addMessage(input.getClientId(context), msg);
+ System.out.println("onChange");
+
+ }
+
+ public void validate2(FacesContext context, UIComponent input,Object newValue) {
+ FacesMessage msg = new FacesMessage("#{bean.validate2} called");
+ context.addMessage(input.getClientId(context), msg);
+ System.out.println("validate2");
+
+ }
+
+ public void onChange2(ValueChangeEvent event) {
+ FacesContext context = FacesContext.getCurrentInstance();
+ UIComponent input = event.getComponent();
+ FacesMessage msg = new FacesMessage("#{bean.onChange2} called");
+ context.addMessage(input.getClientId(context), msg);
+ System.out.println("onChange2");
+
+ }
+
+ public String getTime(){
+ return (new Date(System.currentTimeMillis())).toString();
+ }
+
+ public String clearSession(){
+ ExternalContext externalContext =
FacesContext.getCurrentInstance().getExternalContext();
+ HttpSession session = (HttpSession) externalContext.getSession(false);
+ if(null != session){
+ session.setMaxInactiveInterval(5);
+ }
+ return null;
+ }
+
+ /**
+ * @return the outputComponent
+ */
+ public HtmlOutputText getOutputComponent() {
+ outputComponent = new HtmlOutputText();
+ return outputComponent;
+ }
+
+ /**
+ * @param outputComponent the outputComponent to set
+ */
+ public void setOutputComponent(HtmlOutputText outputComponent) {
+ this.outputComponent = outputComponent;
+ }
+
+}
\ No newline at end of file
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/Bean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/CalendarTestBean.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/CalendarTestBean.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/CalendarTestBean.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,170 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library 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 library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.ajax4jsf.bean;
+
+import java.lang.reflect.Method;
+import java.text.DateFormat;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.Locale;
+import java.util.TimeZone;
+
+import javax.faces.convert.DateTimeConverter;
+
+public class CalendarTestBean {
+
+ public static final String DATE_PATTERN = "MM/dd/yyyy HH:mm";
+
+ public static final Locale LOCALE = new Locale("US");
+
+ public static final TimeZone TIME_ZONE = TimeZone.getTimeZone("GMT+2");
+
+ public static Date DEFAULT_DATE;
+
+ private static DateTimeConverter DEFAULT_CONVERTER;
+
+ public static DateFormat DATE_FORMAT;
+
+ // constructor for static fields
+ static {
+ setupDefaultConverter();
+ setupDefaultDate();
+ }
+
+ private String datePattern ;
+
+ private Locale locale;
+
+ private TimeZone timeZone;
+
+ private Date selectedDate;
+
+ private String selectedDateString;
+
+ public CalendarTestBean() {
+ selectedDate = DEFAULT_DATE;
+ resetSelectedDateString();
+
+ datePattern = DATE_PATTERN;
+ locale = LOCALE;
+ timeZone = TIME_ZONE;
+ }
+
+ public Date getSelectedDate() {
+ return selectedDate;
+ }
+
+ public void setSelectedDate(Date selectedDate) {
+ this.selectedDate = selectedDate;
+ resetSelectedDateString();
+ }
+
+ public void resetSelectedDateString() {
+ setSelectedDateString(DATE_FORMAT.format(getSelectedDate()));
+ }
+
+ public String getSelectedDateString() {
+ return selectedDateString;
+ }
+
+ public void setSelectedDateString(String selectedDateString) {
+ this.selectedDateString = selectedDateString;
+ }
+
+ public String getDatePattern() {
+ return datePattern;
+ }
+
+ public Locale getLocale() {
+ return locale;
+ }
+
+ public TimeZone getTimeZone() {
+ return timeZone;
+ }
+
+ public void setDatePattern(String datePattern) {
+ this.datePattern = datePattern;
+ }
+
+ public void setLocale(Locale locale) {
+ this.locale = locale;
+ }
+
+ public void setTimeZone(TimeZone timeZone) {
+ this.timeZone = timeZone;
+ }
+
+ public static Calendar getCalendar() {
+ return Calendar.getInstance(CalendarTestBean.TIME_ZONE, CalendarTestBean.LOCALE);
+ }
+
+ /**
+ * Setup the default date
+ */
+ private static void setupDefaultDate() {
+ DEFAULT_DATE = getDayInMay(10);
+ }
+
+ public static Date getDayInMay(int dayOfMonth) {
+ Calendar calendar = getCalendar();
+ calendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);
+ calendar.set(Calendar.MONTH, Calendar.MAY);
+ calendar.set(Calendar.YEAR, 2008);
+ calendar.set(Calendar.HOUR_OF_DAY, 18);
+ calendar.set(Calendar.MINUTE, 25);
+ calendar.set(Calendar.SECOND, 0);
+ calendar.set(Calendar.MILLISECOND, 0);
+
+ return calendar.getTime();
+ }
+
+ /**
+ * Setup the default converter
+ */
+ private static void setupDefaultConverter() {
+ DEFAULT_CONVERTER = new DateTimeConverter();
+
+ DEFAULT_CONVERTER.setPattern(DATE_PATTERN);
+ DEFAULT_CONVERTER.setLocale(LOCALE);
+ DEFAULT_CONVERTER.setTimeZone(TIME_ZONE);
+
+ try {
+ Method method = null;
+ Method[] declaredMethods = DateTimeConverter.class.getDeclaredMethods();
+ for (int i = 0; i < declaredMethods.length; i++) {
+ if (declaredMethods[i].getName().equals("getDateFormat")) {
+ method = declaredMethods[i];
+ break;
+ }
+ }
+ if (method != null) {
+
+ method.setAccessible(true);
+ DATE_FORMAT = (DateFormat) method.invoke(DEFAULT_CONVERTER,
DEFAULT_CONVERTER.getLocale());
+ DATE_FORMAT.setTimeZone(DEFAULT_CONVERTER.getTimeZone());
+ }
+ } catch (Exception e) {
+ // skip exception
+ }
+ }
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/CalendarTestBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ChildBean.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ChildBean.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ChildBean.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,62 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library 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 library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.ajax4jsf.bean;
+
+/**
+ * @author shura
+ *
+ */
+public class ChildBean {
+
+ private String name;
+
+ private int qty;
+
+ /**
+ * @return the name
+ */
+ public String getName() {
+ return this.name;
+ }
+
+ /**
+ * @param name the name to set
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ /**
+ * @return the qty
+ */
+ public int getQty() {
+ return this.qty;
+ }
+
+ /**
+ * @param qty the qty to set
+ */
+ public void setQty(int qty) {
+ this.qty = qty;
+ }
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ChildBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ComboBoxTestBean.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ComboBoxTestBean.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ComboBoxTestBean.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,38 @@
+package org.ajax4jsf.bean;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import javax.faces.model.SelectItem;
+
+public class ComboBoxTestBean {
+
+ private List<SelectItem> treeItems;
+ private List<String> treeNames;
+
+ public ComboBoxTestBean() {
+ treeNames = Arrays.asList("Pine", "Birch", "Aspen",
"Spruce", "Oak", "Maple", "Ash",
"Lime");
+ treeItems = new ArrayList<SelectItem>();
+ for (String treeName : treeNames) {
+ treeItems.add(new SelectItem(treeName, treeName));
+ }
+ }
+
+ /**
+ * Gets value of treeItems field.
+ * @return value of treeItems field
+ */
+ public List<SelectItem> getTreeItems() {
+ return treeItems;
+ }
+
+ /**
+ * Gets value of treeNames field.
+ * @return value of treeNames field
+ */
+ public List<String> getTreeNames() {
+ return treeNames;
+ }
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ComboBoxTestBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/Configurator.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/Configurator.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/Configurator.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,51 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library 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 library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+package org.ajax4jsf.bean;
+
+public class Configurator {
+
+ private static final String[] LOAD_STRATEGIES = new String[] {"DEFAULT",
"ALL"};
+
+ private static String loadScriptStrategy = LOAD_STRATEGIES[0];
+
+ private static String loadStyleStrategy = LOAD_STRATEGIES[0];
+
+ private static int currentStrategyIndex = 0;
+
+ public Configurator() {}
+
+ public String getLoadScriptStrategy() {
+ return loadScriptStrategy;
+ }
+
+ public static void setLoadScriptStrategy(String strategy) {
+ loadScriptStrategy = strategy;
+ }
+
+ public String getLoadStyleStrategy() {
+ return loadStyleStrategy;
+ }
+
+ public static void setLoadStyleStrategy(String strategy) {
+ loadStyleStrategy = strategy;
+ }
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/Configurator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ContextMenuTestBean.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ContextMenuTestBean.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ContextMenuTestBean.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,65 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library 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 library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.ajax4jsf.bean;
+
+import javax.faces.event.ActionEvent;
+
+public class ContextMenuTestBean {
+
+ private String value;
+ private int value2;
+
+ public ContextMenuTestBean() {
+ value = "";
+ value2 = 0;
+ }
+
+ public void actionListener(ActionEvent event) {
+ this.value = event.getComponent().getId();
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+
+ public String action() {
+ if (4 == value2 ) {
+ value2 = 1;
+ } else {
+ value2++;
+ }
+ return null;
+ }
+
+ public int getValue2() {
+ return value2;
+ }
+
+ public void setValue2(int value2) {
+ this.value2 = value2;
+ }
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ContextMenuTestBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/Data.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/Data.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/Data.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,135 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library 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 library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.ajax4jsf.bean;
+
+import java.text.DateFormat;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.Enumeration;
+import java.util.List;
+import java.util.Properties;
+
+public class Data {
+
+ private static final String[]
mnames={"Jan","Feb","Mar","Apr","May"};
+
+ private List mounths = new ArrayList();
+
+ private List numbers = new ArrayList();
+
+ private boolean c3rendered=true;
+
+ private boolean c2rendered=true;
+
+ /**
+ * @return the c3rendered
+ */
+ public boolean isC3rendered() {
+ return this.c3rendered;
+ }
+
+ /**
+ * @param c3rendered the c3rendered to set
+ */
+ public void setC3rendered(boolean c3rendered) {
+ this.c3rendered = c3rendered;
+ }
+
+ public String toggleColumn() {
+ this.c3rendered = !this.c3rendered;
+ return null;
+ }
+ /**
+ * @return the numbers
+ */
+ public List getNumbers() {
+ return this.numbers;
+ }
+
+ /**
+ * @param numbers the numbers to set
+ */
+ public void setNumbers(List numbers) {
+ this.numbers = numbers;
+ }
+
+ public Data() {
+ Properties properties = System.getProperties();
+ Enumeration keys = properties.keys();
+ for(int i=0;i<5;i++){
+ DataBean bean = new DataBean();
+ int l = (int)(Math.random()*5)+1;
+ bean.setTotal(0);
+ bean.setMounth(mnames[i]);
+ mounths.add(bean);
+ for(int j=0;j<l;j++){
+ ChildBean child = new ChildBean();
+ child.setName((String) keys.nextElement());
+ int qty = (int)(Math.random()*10);
+ bean.setTotal(bean.getTotal()+qty);
+ child.setQty(qty);
+ bean.getDetail().add(child);
+ }
+ }
+ for(int i=0;i<16;i++){
+ numbers.add(new Integer(i));
+ }
+ }
+
+ /**
+ * @return the mounths
+ */
+ public List getMounths() {
+ return this.mounths;
+ }
+
+ /**
+ * @param mounths the mounths to set
+ */
+ public void setMounths(List mounths) {
+ this.mounths = mounths;
+ }
+
+ /**
+ * @return the c2rendered
+ */
+ public boolean isC2rendered() {
+ return this.c2rendered;
+ }
+
+ /**
+ * @param c2rendered the c2rendered to set
+ */
+ public void setC2rendered(boolean c2rendered) {
+ this.c2rendered = c2rendered;
+ }
+
+ public int getC2span(){
+ return c3rendered?1:2;
+ }
+
+ public int getC1span(){
+ int i = c2rendered?1:c3rendered?2:3;
+ return i;
+ }
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/Data.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/DataBean.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/DataBean.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/DataBean.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,119 @@
+/**
+ *
+ */
+package org.ajax4jsf.bean;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.faces.event.ValueChangeEvent;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class DataBean {
+ private List detail = new ArrayList();
+
+ private String mounth;
+
+ private int total;
+
+ private int price;
+
+ private boolean checked=true;
+ /**
+ *
+ */
+ public DataBean() {
+ // TODO Auto-generated constructor stub
+ }
+
+ /**
+ * @return the detail
+ */
+ public List getDetail() {
+ return this.detail;
+ }
+
+ /**
+ * @param detail the detail to set
+ */
+ public void setDetail(List detail) {
+ this.detail = detail;
+ }
+
+ /**
+ * @return the mounth
+ */
+ public String getMounth() {
+ return this.mounth;
+ }
+
+ /**
+ * @param mounth the mounth to set
+ */
+ public void setMounth(String mounth) {
+ this.mounth = mounth;
+ }
+
+ /**
+ * @return the total
+ */
+ public int getTotal() {
+ return this.total;
+ }
+
+ /**
+ * @param total the total to set
+ */
+ public void setTotal(int total) {
+ this.total = total;
+ }
+
+ /**
+ * @return the checked
+ */
+ public boolean isChecked() {
+ System.out.println("Invoke get checked for mounth "+getMounth()+",
checked:"+checked);
+ return this.checked;
+ }
+
+ /**
+ * @param checked the checked to set
+ */
+ public void setChecked(boolean checked) {
+ System.out.println("Invoke set checked for mounth "+getMounth()+",
checked:"+checked);
+ this.checked = checked;
+ }
+
+ public String check(){
+ checked = !checked;
+ System.out.println("Invoke check action for mounth "+getMounth()+",
checked:"+checked);
+ return null;
+ }
+
+ public String inc(){
+ total++;
+ return null;
+ }
+
+ public void checkChanged(ValueChangeEvent event) {
+ System.out.println("Checked changed for mounth "+getMounth());
+ }
+
+ /**
+ * @return the price
+ */
+ public int getPrice() {
+ return price;
+ }
+
+ /**
+ * @param price the price to set
+ */
+ public void setPrice(int price) {
+ this.price = price;
+ }
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/DataBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/DataFilterSliderBean.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/DataFilterSliderBean.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/DataFilterSliderBean.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,67 @@
+package org.ajax4jsf.bean;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.richfaces.component.UIDataFltrSlider;
+import org.richfaces.event.DataFilterSliderEvent;
+
+public class DataFilterSliderBean {
+ private UIDataFltrSlider slider;
+
+ private List<Planet> planets;
+
+ private String eventSnapshot = "";
+
+ public DataFilterSliderBean() {
+ planets = new ArrayList<Planet>();
+ planets.add(new Planet("Sun", 27.94));
+ planets.add(new Planet("Mercury", 0.3770));
+ planets.add(new Planet("Venus", 0.9032));
+ planets.add(new Planet("Earth", 1.0));
+ planets.add(new Planet("Moon", 0.1655));
+ planets.add(new Planet("Mars", 0.3895));
+ planets.add(new Planet("Jupiter", 2.640));
+ planets.add(new Planet("Saturn", 1.139));
+ planets.add(new Planet("Uranus", 0.917));
+ planets.add(new Planet("Neptune", 1.148));
+ planets.add(new Planet("Pluto", 0.0621));
+ }
+
+ public List<Planet> getPlanets() {
+ return planets;
+ }
+
+ public UIDataFltrSlider getSlider() {
+ return slider;
+ }
+
+ public void setSlider(UIDataFltrSlider slider) {
+ this.slider = slider;
+ }
+
+ public void doSlide(DataFilterSliderEvent event) {
+ Integer oldSliderVal = event.getOldSliderVal();
+ Integer newSliderVal = event.getNewSliderVal();
+ eventSnapshot = "DataFilterSliderEvent[" + oldSliderVal + ","
+ newSliderVal + "]";
+ }
+
+ public String getEventSnapshot() {
+ return eventSnapshot;
+ }
+
+ public Integer getSubmittedValue() {
+ Integer retVal = null;
+ if (slider != null) {
+ retVal = (Integer) slider.getHandleValue();
+ }
+
+ return retVal;
+ }
+
+ public String reset() {
+ eventSnapshot = "";
+ return null;
+ }
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/DataFilterSliderBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/DataTableBean.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/DataTableBean.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/DataTableBean.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,167 @@
+package org.ajax4jsf.bean;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+import javax.faces.event.ActionEvent;
+
+import org.ajax4jsf.model.Column;
+import org.richfaces.model.Ordering;
+
+@SuppressWarnings("unchecked")
+public class DataTableBean {
+
+ private int rows = 20;
+
+ private int column = 3;
+
+ private int begin = 1;
+
+ private int end = 10;
+
+ private List model;
+
+ private List columns;
+
+ private Ordering ordering;
+
+ public DataTableBean() {
+ init();
+ }
+
+ public void init(ActionEvent event) {
+ init();
+ }
+
+ public void reset(ActionEvent event) {
+ rows = 20;
+ column = 3;
+ begin = 1;
+ end = 10;
+ init();
+ }
+
+ public String getDate() {
+ return new Date().toLocaleString();
+ }
+
+ private void init() {
+ model = new ArrayList();
+ for (int i = 0; i < rows; i++) {
+ String [] m = new String[column];
+ for (int j = 0; j < column; j++) {
+ m[j] = String.valueOf(i + j);
+ }
+ model.add(m);
+ }
+
+ columns = new ArrayList();
+ for (int i = 0; i < column; i++) {
+ columns.add(new Column("header","footer", i));
+ }
+ }
+
+ /**
+ * @return the columns
+ */
+ public int getColumn() {
+ return column;
+ }
+
+ /**
+ * @param columns
+ * the columns to set
+ */
+ public void setColumn(int column) {
+ this.column = column;
+ }
+
+ /**
+ * @return the rows
+ */
+ public int getRows() {
+ return rows;
+ }
+
+ /**
+ * @param rows
+ * the rows to set
+ */
+ public void setRows(int rows) {
+ this.rows = rows;
+ }
+
+ /**
+ * @return the model
+ */
+ public List getModel() {
+ return model;
+ }
+
+ /**
+ * @param model
+ * the model to set
+ */
+ public void setModel(List model) {
+ this.model = model;
+ }
+
+ /**
+ * @return the columns
+ */
+ public List getColumns() {
+ return columns;
+ }
+
+ /**
+ * @param columns
+ * the columns to set
+ */
+ public void setColumns(List columns) {
+ this.columns = columns;
+ }
+
+ /**
+ * @return the ordering
+ */
+ public Ordering getOrdering() {
+ return ordering;
+ }
+
+ /**
+ * @param ordering the ordering to set
+ */
+ public void setOrdering(Ordering ordering) {
+ this.ordering = ordering;
+ }
+
+ /**
+ * @return the begin
+ */
+ public int getBegin() {
+ return begin;
+ }
+
+ /**
+ * @param begin the begin to set
+ */
+ public void setBegin(int begin) {
+ this.begin = begin;
+ }
+
+ /**
+ * @return the end
+ */
+ public int getEnd() {
+ return end;
+ }
+
+ /**
+ * @param end the end to set
+ */
+ public void setEnd(int end) {
+ this.end = end;
+ }
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/DataTableBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/DropDownMenuTestBean.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/DropDownMenuTestBean.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/DropDownMenuTestBean.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,53 @@
+package org.ajax4jsf.bean;
+
+public class DropDownMenuTestBean {
+
+ private String actionName = "";
+
+ /**
+ * Gets value of actionName field.
+ * @return value of actionName field
+ */
+ public String getActionName() {
+ return actionName;
+ }
+
+ /**
+ * Set a new value for actionName field.
+ * @param actionName a new value for actionName field
+ */
+ public void setActionName(String actionName) {
+ this.actionName = actionName;
+ }
+
+ public String doNew() {
+ setActionName("New");
+ return null;
+ }
+
+ public String doOpen() {
+ setActionName("Open");
+ return null;
+ }
+
+ public String doSave() {
+ setActionName("Save");
+ return null;
+ }
+
+ public String doSaveAll() {
+ setActionName("Save All");
+ return null;
+ }
+
+ public String doClose() {
+ setActionName("Close");
+ return null;
+ }
+
+ public String doExit() {
+ setActionName("Exit");
+ return null;
+ }
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/DropDownMenuTestBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/EnclosedData.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/EnclosedData.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/EnclosedData.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,42 @@
+/**
+ *
+ */
+package org.ajax4jsf.bean;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class EnclosedData {
+
+ private List<RepeatData> repeatData;
+
+ public EnclosedData() {
+ repeatData = new ArrayList<RepeatData>();
+ for(int i=0;i<5;i++){
+ RepeatData data = new RepeatData();
+ data.setText("Top row "+i);
+ repeatData.add(data);
+ }
+ }
+
+ /**
+ * @return the repeatData
+ */
+ public List<RepeatData> getRepeatData() {
+ return repeatData;
+ }
+
+ /**
+ * @param repeatData the repeatData to set
+ */
+ public void setRepeatData(List<RepeatData> repeatData) {
+ this.repeatData = repeatData;
+ }
+
+
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/EnclosedData.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/IndexBean.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/IndexBean.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/IndexBean.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,100 @@
+package org.ajax4jsf.bean;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class IndexBean {
+
+ private List<ComponentItem> list = new ArrayList<ComponentItem>();
+
+ public class ComponentItem {
+ String name;
+ String link;
+
+
+ public ComponentItem(String name, String link) {
+ this.name = name;
+ this.link = link;
+ }
+
+ /**
+ * @return the name
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * @return the link
+ */
+ public String getLink() {
+ return link;
+ }
+
+ };
+
+ private void sortList () {
+ String [] names = new String [list.size()];
+ Map<String, ComponentItem> map = new HashMap<String, ComponentItem>();
+ for (int i=0; i < list.size(); i++) {
+ names [i] = list.get(i).name;
+ map.put(list.get(i).name, list.get(i));
+ }
+ Arrays.sort(names);
+ list = new ArrayList<ComponentItem>();
+ for (String name : names) {
+ list.add(map.get(name));
+ }
+ }
+
+ public IndexBean() {
+ list.add(new ComponentItem("<a4j:commandButton>",
"ajaxCommandButton/ajaxButtonTest.xhtml"));
+ list.add(new ComponentItem("<a4j:commandLink>",
"ajaxCommandLink/ajaxLinkTest.xhtml"));
+ list.add(new ComponentItem("<a4j:htmlCommandLink>",
"ajaxHTMLCommandLink/ajaxHTMLLinkTest.xhtml"));
+ list.add(new ComponentItem("<a4j:poll>",
"ajaxPoll/ajaxPollTest.xhtml"));
+ list.add(new ComponentItem("<a4j:region>",
"ajaxRegion/ajaxRegionTest.xhtml"));
+ list.add(new ComponentItem("<rich:calendar>",
"calendar/calendarTest.xhtml"));
+ list.add(new ComponentItem("<rich:combobox>",
"comboBox/comboBoxTest.xhtml"));
+ list.add(new ComponentItem("<rich:contextMenu>",
"contextMenu/contextMenu.xhtml"));
+ list.add(new ComponentItem("<rich:dataTable>",
"dataTable/dataTableTest.xhtml"));
+ list.add(new ComponentItem("<rich:dropDownMenu>",
"dropDownMenu/dropDownMenuTest.xhtml"));
+ list.add(new ComponentItem("<rich:inplaceSelect>",
"inplaceSelect/inplaceSelectTest.xhtml"));
+ list.add(new ComponentItem("<rich:inputNumberSpinner>",
"inputNumberSpinner/inputNumberSpinnerTest.xhtml"));
+ list.add(new ComponentItem("<a4j:keepAlive>",
"keepAlive/keepAliveTest.xhtml"));
+ list.add(new ComponentItem("<a4j:loadScript>",
"loadScript/loadScriptTest.xhtml"));
+ list.add(new ComponentItem("<a4j:loadStyle>",
"loadStyle/loadStyleTest.xhtml"));
+ list.add(new ComponentItem("<rich:orderingList>",
"orderingList/orderingListTest.xhtml"));
+ list.add(new ComponentItem("<rich:panelBar>",
"panelBar/panelBarTest.xhtml"));
+ list.add(new ComponentItem("<rich:panelMenu>",
"panelMenu/panelMenuTest.xhtml"));
+ list.add(new ComponentItem("<rich:pickList>",
"pickList/pickListTest.xhtml"));
+ list.add(new ComponentItem("<rich:progressBar>",
"progressBar/progressBarTest.xhtml"));
+ list.add(new ComponentItem("<rich:simpleTogglePanel>",
"simpleTogglePanel/simpleTogglePanel.xhtml"));
+ list.add(new ComponentItem("<rich:tabPanel>",
"tabPanel/tabPanelTest.xhtml"));
+ list.add(new ComponentItem("<rich:togglePanel>",
"togglePanel/togglePanelTest.xhtml"));
+ list.add(new ComponentItem("<a4j:actionParam>",
"actionParam/actionParam.xhtml"));
+ list.add(new ComponentItem("<a4j:form>",
"ajaxForm/ajaxFormTest.xhtml"));
+ list.add(new ComponentItem("<a4j:ajaxListener>",
"ajaxListener/ajaxListenerTest.xhtml"));
+ list.add(new ComponentItem("<a4j:outputPanel>",
"ajaxOutputPanel/ajaxOutputPanelTest.xhtml"));
+ list.add(new ComponentItem("<a4j:support>",
"ajaxOutputPanel/ajaxOutputPanelTest.xhtml"));
+ list.add(new ComponentItem("<a4j:jsFunction>",
"jsFunction/jsFunctionTest.xhtml"));
+ list.add(new ComponentItem("<rich:spacer>",
"spacer/spacerTest.xhtml"));
+ list.add(new ComponentItem("<a4j:loadBundle>",
"loadBundle/loadBundle.xhtml"));
+ list.add(new ComponentItem("<rich:toolTip>",
"toolTip/toolTip.xhtml"));
+ list.add(new ComponentItem("<rich:listShuttle>",
"listShuttle/listShuttleTest.xhtml"));
+
+ sortList();
+
+ }
+
+ /**
+ * @return the list
+ */
+ public List<ComponentItem> getList() {
+ return list;
+ }
+
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/IndexBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/InplaceInputTestBean.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/InplaceInputTestBean.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/InplaceInputTestBean.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,24 @@
+package org.ajax4jsf.bean;
+
+public class InplaceInputTestBean {
+
+ private String text ="";
+
+ /**
+ * Gets value of text field.
+ * @return value of text field
+ */
+ public String getText() {
+ return text;
+ }
+
+ /**
+ * Set a new value for text field.
+ * @param text a new value for text field
+ */
+ public void setText(String text) {
+ this.text = text;
+ }
+
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/InplaceInputTestBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/InplaceSelectTestBean.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/InplaceSelectTestBean.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/InplaceSelectTestBean.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,51 @@
+package org.ajax4jsf.bean;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import javax.faces.model.SelectItem;
+
+public class InplaceSelectTestBean {
+
+ private List<SelectItem> treeItems = new ArrayList<SelectItem>();
+
+ private List<String> treeNames = Arrays.asList("Pine",
"Birch", "Aspen", "Spruce", "Oak",
"Maple", "Ash", "Lime");
+
+ private String tree = "";
+
+ /**
+ * Gets value of tree field.
+ *
+ * @return value of tree field
+ */
+ public String getTree() {
+ return tree;
+ }
+
+ /**
+ * Set a new value for tree field.
+ *
+ * @param tree
+ * a new value for tree field
+ */
+ public void setTree(String tree) {
+ this.tree = tree;
+ }
+
+ public InplaceSelectTestBean() {
+ for (String treeName : treeNames) {
+ treeItems.add(new SelectItem(treeName, treeName));
+ }
+ }
+
+ /**
+ * Gets value of treeItems field.
+ *
+ * @return value of treeItems field
+ */
+ public List<SelectItem> getTreeItems() {
+ return treeItems;
+ }
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/InplaceSelectTestBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/InputNumberSliderBean.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/InputNumberSliderBean.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/InputNumberSliderBean.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,55 @@
+/* License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library 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 library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.ajax4jsf.bean;
+
+import javax.faces.application.FacesMessage;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.validator.ValidatorException;
+
+public class InputNumberSliderBean {
+ private int value;
+
+ public InputNumberSliderBean() {
+ value = 40;
+ }
+
+ public void validate(FacesContext context, UIComponent component,
+ Object value) throws ValidatorException {
+ if (((Integer)value).intValue() > 90) {
+ throw new ValidatorException(new FacesMessage("Fake validation. Value is more
than 90."));
+ }
+ }
+
+ public String action() {
+ this.value += 10;
+ return null;
+ }
+
+ public int getValue() {
+ return value;
+ }
+
+ public void setValue(int value) {
+ this.value = value;
+ }
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/InputNumberSliderBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/JSFunctionBean.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/JSFunctionBean.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/JSFunctionBean.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,23 @@
+package org.ajax4jsf.bean;
+
+public class JSFunctionBean {
+
+ private String name = "";
+
+ /**
+ * Gets value of name field.
+ * @return value of name field
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * Set a new value for name field.
+ * @param name a new value for name field
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/JSFunctionBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ListAction.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ListAction.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ListAction.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,52 @@
+/**
+ *
+ */
+package org.ajax4jsf.bean;
+
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class ListAction {
+
+ private List data;
+
+ private Set keys;
+
+ /**
+ * @return the data
+ */
+ public List getData() {
+ return data;
+ }
+
+ /**
+ * @param data the data to set
+ */
+ public void setData(List data) {
+ this.data = data;
+ }
+
+ public Set getKeys(){
+ return keys;
+ }
+
+ public String timer(){
+ if(null != data){
+ keys=new HashSet();
+ int random = (int)(Math.random()*10.0);
+ for(int i=0;i<random;i++){
+ Bean bean = (Bean) data.get(i);
+ bean.setText(bean.getText()+" X");
+ keys.add(new Integer(i));
+ }
+ }
+ return null;
+ }
+
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ListAction.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ListShuttleBean.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ListShuttleBean.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ListShuttleBean.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,64 @@
+package org.ajax4jsf.bean;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.faces.event.ActionEvent;
+
+import org.ajax4jsf.model.ListShuttleItem;
+
+public class ListShuttleBean {
+ private List<ListShuttleItem> items = null;
+ private List<ListShuttleItem> freeItems = null;
+ private boolean controlsVisible = true;
+ public ListShuttleBean() {
+ init();
+ }
+
+ private void init() {
+ items = new ArrayList<ListShuttleItem>();
+ freeItems = new ArrayList<ListShuttleItem>();
+ for (int i = 0; i < 5; i++) {
+ ListShuttleItem item = new ListShuttleItem(i + 1, "Item" + (i + 1));
+ freeItems.add(item);
+ }
+ controlsVisible = true;
+ }
+
+ public void hide(ActionEvent event) {
+ controlsVisible = false;
+ }
+
+ public void reset(ActionEvent event) {
+ init();
+ }
+
+ public List<ListShuttleItem> getItems() {
+ return items;
+ }
+ public void setItems(List<ListShuttleItem> items) {
+ this.items = items;
+ }
+
+ public List<ListShuttleItem> getFreeItems() {
+ return freeItems;
+ }
+
+ public void setFreeItems(List<ListShuttleItem> freeItems) {
+ this.freeItems = freeItems;
+ }
+
+ /**
+ * @return the controlsVisible
+ */
+ public boolean isControlsVisible() {
+ return controlsVisible;
+ }
+
+ /**
+ * @param controlsVisible the controlsVisible to set
+ */
+ public void setControlsVisible(boolean controlsVisible) {
+ this.controlsVisible = controlsVisible;
+ }
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ListShuttleBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/LoadBundleTestBean.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/LoadBundleTestBean.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/LoadBundleTestBean.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,23 @@
+package org.ajax4jsf.bean;
+
+
+public class LoadBundleTestBean {
+
+ private boolean rendered = false;
+
+ public boolean isRendered() {
+ return rendered;
+ }
+
+ public void reRender(){
+ this.setRendered(!rendered);
+ }
+
+ /**
+ * @param value the value to set
+ */
+ public void setRendered(boolean rendered) {
+ this.rendered = rendered;
+ }
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/LoadBundleTestBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/Media.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/Media.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/Media.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,14 @@
+package org.ajax4jsf.bean;
+
+import java.io.IOException;
+import java.io.OutputStream;
+
+public interface Media {
+
+ public void paint(OutputStream out, Object data) throws IOException;
+
+ public void setData(MediaData data);
+
+ public MediaData getData();
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/Media.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/MediaBean.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/MediaBean.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/MediaBean.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,72 @@
+package org.ajax4jsf.bean;
+
+import java.awt.Color;
+import java.awt.Graphics2D;
+import java.awt.image.BufferedImage;
+import java.io.IOException;
+import java.io.OutputStream;
+
+import javax.imageio.ImageIO;
+
+public class MediaBean implements Media {
+
+ private MediaData data = new MediaData();
+ private MediaData data2 = new MediaData(50, 10, Color.BLACK, Color.WHITE);
+
+
+ /**
+ * @return the data2
+ */
+ public MediaData getData2() {
+ return data2;
+ }
+
+ /**
+ * @param data2 the data2 to set
+ */
+ public void setData2(MediaData data2) {
+ this.data2 = data2;
+ }
+
+ /**
+ * @return the data
+ */
+ public MediaData getData() {
+ return data;
+ }
+
+ /**
+ * @param data
+ * the data to set
+ */
+ public void setData(MediaData data) {
+ this.data = data;
+ }
+
+ public String reInitData() {
+ data = new MediaData(200, 200, Color.WHITE, Color.BLACK);
+ return null;
+ }
+
+ public String resetData() {
+ data = new MediaData();
+ return null;
+ }
+
+ public void paint(OutputStream out, Object data) throws IOException {
+ if (data instanceof MediaData) {
+
+ MediaData paintData = (MediaData) data;
+ BufferedImage img = new BufferedImage(paintData.getWidth(), paintData.getHeight(),
BufferedImage.TYPE_INT_RGB);
+ Graphics2D graphics2D = img.createGraphics();
+ graphics2D.setBackground(paintData.getBackground());
+ graphics2D.setColor(paintData.getDrawColor());
+ graphics2D.clearRect(0, 0, paintData.getWidth(), paintData.getHeight());
+ graphics2D.drawChars(new String("mediaOutput").toCharArray(), 0, 11, 5,
35);
+ graphics2D.drawChars(new String("selenium test").toCharArray(), 0, 13, 5,
55);
+
+ ImageIO.write(img, "jpeg", out);
+
+ }
+ }
+}
\ No newline at end of file
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/MediaBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/MediaData.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/MediaData.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/MediaData.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,88 @@
+package org.ajax4jsf.bean;
+
+import java.awt.Color;
+import java.io.Serializable;
+
+public class MediaData implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ Integer width;
+
+ Integer height;
+
+ Color background;
+
+ Color drawColor;
+
+ public MediaData() {
+ this.width = 100;
+ this.height = 100;
+ background = Color.BLACK;
+ drawColor = Color.WHITE;
+ }
+
+ public MediaData(Integer width, Integer height, Color background, Color drawColor) {
+ this.width = width;
+ this.height = height;
+ this.background = background;
+ this.drawColor = drawColor;
+ }
+
+ /**
+ * @return the width
+ */
+ public Integer getWidth() {
+ return width;
+ }
+
+ /**
+ * @param width the width to set
+ */
+ public void setWidth(Integer width) {
+ this.width = width;
+ }
+
+ /**
+ * @return the height
+ */
+ public Integer getHeight() {
+ return height;
+ }
+
+ /**
+ * @param height the height to set
+ */
+ public void setHeight(Integer height) {
+ this.height = height;
+ }
+
+ /**
+ * @return the background
+ */
+ public Color getBackground() {
+ return background;
+ }
+
+ /**
+ * @param background the background to set
+ */
+ public void setBackground(Color background) {
+ this.background = background;
+ }
+
+ /**
+ * @return the drawColor
+ */
+ public Color getDrawColor() {
+ return drawColor;
+ }
+
+ /**
+ * @param drawColor the drawColor to set
+ */
+ public void setDrawColor(Color drawColor) {
+ this.drawColor = drawColor;
+ }
+
+}
\ No newline at end of file
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/MediaData.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/MessageBean.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/MessageBean.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/MessageBean.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,103 @@
+package org.ajax4jsf.bean;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.EventListener;
+import java.util.EventObject;
+import java.util.List;
+
+import org.ajax4jsf.event.PushEventListener;
+
+
+public class MessageBean implements Runnable {
+
+ private String result;
+
+ private boolean running = true;
+
+ private PushEventListener listener;
+
+ private List messages = new ArrayList(10);
+
+ private int counter = 0;
+
+ public MessageBean() {
+ // TODO Auto-generated constructor stub
+ }
+
+ /**
+ * @return the result
+ */
+ public String getResult() {
+ return result;
+ }
+
+ /**
+ * @param result
+ * the result to set
+ */
+ public void setResult(String result) {
+ this.result = result;
+ }
+
+ public void addListener(EventListener listener) {
+ synchronized (listener) {
+ if (this.listener != listener) {
+ this.listener = (PushEventListener) listener;
+ Thread th = new Thread(this);
+ th.start();
+
+ }
+ }
+ }
+
+ public void run() {
+ try {
+ while (isRunning()) {
+ Thread.sleep(10000);
+ Date current = new Date(System.currentTimeMillis());
+ if(messages.size()>=10){
+ messages.remove(0);
+ }
+ messages.add(messages.size(),String.valueOf(counter++)+" at
"+current.toString());
+ System.out.println("event occurs");
+ synchronized (listener) {
+ listener.onEvent(new EventObject(this));
+ }
+ }
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+
+ }
+
+ /**
+ * @return the running
+ */
+ public synchronized boolean isRunning() {
+ return running;
+ }
+
+ /**
+ * @param running
+ * the running to set
+ */
+ public synchronized void setRunning(boolean running) {
+ this.running = running;
+ }
+
+ /**
+ * @return the messages
+ */
+ public List getMessages() {
+ return messages;
+ }
+
+ /**
+ * @param messages the messages to set
+ */
+ public void setMessages(List messages) {
+ this.messages = messages;
+ }
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/MessageBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ModalPanelTestBean.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ModalPanelTestBean.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ModalPanelTestBean.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,89 @@
+/*
+ * ModalPanelTestBean.java Date created: 30.07.2008
+ * Last modified by: $Author$
+ * $Revision$ $Date$
+ */
+
+package org.ajax4jsf.bean;
+
+/**
+ * rich:modalPannel component test bean
+ * @author Alexandr Levkovsky
+ *
+ */
+public class ModalPanelTestBean {
+
+ private Boolean rendered = true;
+ private Boolean showWhenRendered = false;
+ private Boolean moveable = true;
+ private Boolean resizeable = true;
+ /**
+ * @return the rendered
+ */
+ public Boolean getRendered() {
+ return rendered;
+ }
+ /**
+ * @param rendered the rendered to set
+ */
+ public void setRendered(Boolean rendered) {
+ this.rendered = rendered;
+ }
+ /**
+ * @return the showWhenRendered
+ */
+ public Boolean getShowWhenRendered() {
+ return showWhenRendered;
+ }
+ /**
+ * @param showWhenRendered the showWhenRendered to set
+ */
+ public void setShowWhenRendered(Boolean showWhenRendered) {
+ this.showWhenRendered = showWhenRendered;
+ }
+ /**
+ * @return the moveable
+ */
+ public Boolean getMoveable() {
+ return moveable;
+ }
+ /**
+ * @param moveable the moveable to set
+ */
+ public void setMoveable(Boolean moveable) {
+ this.moveable = moveable;
+ }
+ /**
+ * @return the resizeable
+ */
+ public Boolean getResizeable() {
+ return resizeable;
+ }
+ /**
+ * @param resizeable the resizeable to set
+ */
+ public void setResizeable(Boolean resizeable) {
+ this.resizeable = resizeable;
+ }
+
+ public String changeAttributes(){
+ showWhenRendered = true;
+ moveable = false;
+ resizeable = false;
+ return null;
+ }
+
+ public String changeRendered(){
+ rendered = false;
+ return null;
+ }
+
+ public String reset(){
+ rendered = true;
+ showWhenRendered = false;
+ moveable = true;
+ resizeable = true;
+ return null;
+ }
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ModalPanelTestBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/NavigateBean.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/NavigateBean.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/NavigateBean.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,64 @@
+package org.ajax4jsf.bean;
+
+import java.io.Serializable;
+
+import org.ajax4jsf.component.UIInclude;
+
+public class NavigateBean implements Serializable {
+
+ private String viewId="/pages/hello.jsp";
+
+ transient private UIInclude include;
+
+ public String navigateOne() {
+
+ return "sucessOne";
+ }
+
+ public String navigateTwo() {
+
+ return "sucessTwo";
+ }
+
+ public String navigateHello() {
+
+ return "sucessHello";
+ }
+
+ /**
+ * @return the viewId
+ */
+ public String getViewId() {
+ return viewId;
+ }
+
+ /**
+ * @param viewId the viewId to set
+ */
+ public void setViewId(String viewId) {
+ this.viewId = viewId;
+ }
+
+ public String reset(){
+ setViewId("/pages/hello.jsp");
+ if(null != include){
+ include.setViewId("/pages/hello.jsp");
+ }
+ return null;
+ }
+
+ /**
+ * @return the include
+ */
+ public UIInclude getInclude() {
+ return include;
+ }
+
+ /**
+ * @param include the include to set
+ */
+ public void setInclude(UIInclude include) {
+ this.include = include;
+ }
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/NavigateBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ObjectNotFoundException.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ObjectNotFoundException.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ObjectNotFoundException.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,12 @@
+/**
+ *
+ */
+package org.ajax4jsf.bean;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class ObjectNotFoundException extends Exception {
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ObjectNotFoundException.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/OrderingListTestBean.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/OrderingListTestBean.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/OrderingListTestBean.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,174 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library 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 library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.ajax4jsf.bean;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.convert.Converter;
+
+public class OrderingListTestBean {
+ private Converter converter;
+ private List<Item> items;
+ private Collection<Item> selection;
+ private Object activeItem;
+
+ public OrderingListTestBean() {
+ converter = new ItemConverter();
+ items = new ArrayList<Item>();
+ for (int i = 0; i < 4; i++) {
+ items.add(new Item("item" + i));
+ }
+ selection = new HashSet<Item>();
+ }
+
+ public Object getActionResult() {
+ return
FacesContext.getCurrentInstance().getExternalContext().getSessionMap().get("actionResult");
+ }
+
+ public Collection<Item> getSelection() {
+ return selection;
+ }
+
+ public void setSelection(Collection<Item> selection) {
+ this.selection = selection;
+ }
+
+ public Object getActiveItem() {
+ return activeItem;
+ }
+
+ public void setActiveItem(Object activeItem) {
+ this.activeItem = activeItem;
+ }
+
+ public Converter getConverter() {
+ return converter;
+ }
+
+ public void setConverter(Converter converter) {
+ this.converter = converter;
+ }
+
+ public List<Item> getItems() {
+ return items;
+ }
+
+ public void setItems(List<Item> items) {
+ this.items = items;
+ }
+
+ public String getSelectionString() {
+ StringBuffer buff = new StringBuffer();
+ for (Iterator<Item> it = selection.iterator(); it.hasNext();) {
+ Item item = it.next();
+ buff.append(item.getName());
+ if (it.hasNext()) {
+ buff.append(',');
+ }
+ }
+ return buff.toString();
+ }
+
+
+ private class ItemConverter implements Converter {
+
+ /* (non-Javadoc)
+ * @see javax.faces.convert.Converter#getAsObject(javax.faces.context.FacesContext,
javax.faces.component.UIComponent, java.lang.String)
+ */
+ public Object getAsObject(FacesContext context, UIComponent component,
+ String value) {
+ return new Item(value);
+ }
+
+ /* (non-Javadoc)
+ * @see javax.faces.convert.Converter#getAsString(javax.faces.context.FacesContext,
javax.faces.component.UIComponent, java.lang.Object)
+ */
+ public String getAsString(FacesContext context, UIComponent component,
+ Object value) {
+ Item optionItem = (Item) value;
+ return optionItem.getName();
+ }
+
+ }
+
+ public class Item implements Serializable {
+
+ private static final long serialVersionUID = 1083694594537030790L;
+
+ private String name;
+
+ public String action() {
+ FacesContext.getCurrentInstance().getExternalContext().getSessionMap().put("actionResult",
name);
+ return null;
+ }
+
+ public Item(String name) {
+ super();
+ this.name = name;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String toString() {
+ return this.getClass().getSimpleName() + " [" + name + "]";
+ }
+
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((name == null) ? 0 : name.hashCode());
+ return result;
+ }
+
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ Item other = (Item) obj;
+ if (name == null) {
+ if (other.name != null)
+ return false;
+ } else if (!name.equals(other.name))
+ return false;
+
+ return true;
+ }
+
+ }
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/OrderingListTestBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/PageDescriptionBean.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/PageDescriptionBean.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/PageDescriptionBean.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,44 @@
+/**
+ *
+ */
+package org.ajax4jsf.bean;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class PageDescriptionBean {
+
+ private String _path;
+
+ private String _title;
+
+ /**
+ * @return the path
+ */
+ public String getPath() {
+ return _path;
+ }
+
+ /**
+ * @param path the path to set
+ */
+ public void setPath(String path) {
+ _path = path;
+ }
+
+ /**
+ * @return the title
+ */
+ public String getTitle() {
+ return _title;
+ }
+
+ /**
+ * @param title the title to set
+ */
+ public void setTitle(String title) {
+ _title = title;
+ }
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/PageDescriptionBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/PagesBean.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/PagesBean.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/PagesBean.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,125 @@
+/**
+ *
+ */
+package org.ajax4jsf.bean;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import javax.servlet.ServletContext;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class PagesBean {
+
+ private static final Pattern JSP_PATTERN = Pattern.compile(".*\\.jspx?");
+
+ private static final Pattern XHTML_PATTERN = Pattern.compile(".*\\.xhtml");
+
+ private static final Pattern TITLE_PATTERN =
Pattern.compile("<title>(.*)</title>",Pattern.CASE_INSENSITIVE|Pattern.MULTILINE);
+
+ private ServletContext _servletContext;
+
+ private List<PageDescriptionBean> _jspPages;
+
+ private String _path;
+
+ private List<PageDescriptionBean> _xhtmlPages;
+
+ /**
+ * @return the path
+ */
+ public String getPath() {
+ return _path;
+ }
+
+ /**
+ * @param path
+ * the path to set
+ */
+ public void setPath(String path) {
+ _path = path;
+ }
+
+ /**
+ * @return the servletContext
+ */
+ public ServletContext getServletContext() {
+ return _servletContext;
+ }
+
+ /**
+ * @param servletContext
+ * the servletContext to set
+ */
+ public void setServletContext(ServletContext servletContext) {
+ _servletContext = servletContext;
+ }
+
+ public List<PageDescriptionBean> getJspPages() {
+ if (_jspPages == null && null != getServletContext()) {
+ _jspPages = getPagesByPattern(JSP_PATTERN);
+ }
+
+ return _jspPages;
+ }
+
+ public List<PageDescriptionBean> getXhtmlPages() {
+ if (_xhtmlPages == null && null != getServletContext()) {
+ _xhtmlPages = getPagesByPattern(XHTML_PATTERN);
+ }
+
+ return _xhtmlPages;
+ }
+
+ /**
+ *
+ */
+ private List<PageDescriptionBean> getPagesByPattern(Pattern pattern) {
+ List<PageDescriptionBean> jspPages = new ArrayList<PageDescriptionBean>();
+ Set resourcePaths = getServletContext().getResourcePaths(getPath());
+ for (Iterator iterator = resourcePaths.iterator(); iterator
+ .hasNext();) {
+ String page = (String) iterator.next();
+ if (pattern.matcher(page).matches()) {
+ PageDescriptionBean pageBean = new PageDescriptionBean();
+ pageBean.setPath(page);
+ InputStream pageInputStream = getServletContext().getResourceAsStream(page);
+ if(null != pageInputStream){
+ byte[] head = new byte[1024];
+ try {
+ int readed = pageInputStream.read(head);
+ String headString = new String(head,0,readed);
+ Matcher titleMatcher = TITLE_PATTERN.matcher(headString);
+ if(titleMatcher.find() && titleMatcher.group(1).length()>0){
+ pageBean.setTitle(titleMatcher.group(1));
+ } else {
+ pageBean.setTitle(page);
+ }
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } finally {
+ try {
+ pageInputStream.close();
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+ }
+ jspPages.add(pageBean);
+ }
+ }
+ return jspPages;
+ }
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/PagesBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/PickListTestBean.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/PickListTestBean.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/PickListTestBean.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,110 @@
+package org.ajax4jsf.bean;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import javax.faces.model.SelectItem;
+
+public class PickListTestBean {
+
+ private String copyAllLabel = "MOVE ALL";
+
+ private String copyLabel = "MOVE";
+
+ private String removeLabel = "TAKE AWAY";
+
+ private String removeAllLabel = "TAKE ALL AWAY";
+
+ private List<String> items = Arrays.asList("ZHURIK",
"MELESHKO", "LEONTIEV", "KOVAL", "KALYUZHNY",
"DUDIK",
+ "KOSTITSYN", "GRABOVSKI");
+
+ private List<SelectItem> options = new ArrayList<SelectItem>();
+
+ private List<String> result = new ArrayList<String>();
+
+ public PickListTestBean() {
+ for (String player : items) {
+ options.add(new SelectItem(player, player));
+ }
+
+ // preselected items
+ result.add(items.get(0));
+ result.add(items.get(1));
+ }
+
+ /**
+ * Gets value of copyAllLabel field.
+ *
+ * @return value of copyAllLabel field
+ */
+ public String getCopyAllLabel() {
+ return copyAllLabel;
+ }
+
+ /**
+ * Gets value of copyLabel field.
+ *
+ * @return value of copyLabel field
+ */
+ public String getCopyLabel() {
+ return copyLabel;
+ }
+
+ /**
+ * Gets value of removeLabel field.
+ *
+ * @return value of removeLabel field
+ */
+ public String getRemoveLabel() {
+ return removeLabel;
+ }
+
+ /**
+ * Gets value of removeAllLabel field.
+ *
+ * @return value of removeAllLabel field
+ */
+ public String getRemoveAllLabel() {
+ return removeAllLabel;
+ }
+
+ /**
+ * Gets value of options field.
+ *
+ * @return value of options field
+ */
+ public List<SelectItem> getOptions() {
+ return options;
+ }
+
+ /**
+ * Set a new value for options field.
+ *
+ * @param options
+ * a new value for options field
+ */
+ public void setOptions(List<SelectItem> options) {
+ this.options = options;
+ }
+
+ /**
+ * Gets value of result field.
+ *
+ * @return value of result field
+ */
+ public List<String> getResult() {
+ return result;
+ }
+
+ /**
+ * Set a new value for result field.
+ *
+ * @param result
+ * a new value for result field
+ */
+ public void setResult(List<String> result) {
+ this.result = result;
+ }
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/PickListTestBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/Planet.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/Planet.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/Planet.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,20 @@
+package org.ajax4jsf.bean;
+
+public class Planet {
+ private String name;
+
+ private double gravity;
+
+ Planet(String n, double g) {
+ name = n;
+ gravity = g;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public double getGravity() {
+ return gravity;
+ }
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/Planet.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ProgressBarTestBean.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ProgressBarTestBean.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ProgressBarTestBean.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,60 @@
+package org.ajax4jsf.bean;
+
+import java.util.Date;
+
+import javax.faces.event.ActionEvent;
+
+public class ProgressBarTestBean {
+
+ private boolean enabled = false;
+
+ private Long value = -5L;
+
+ public String getDate() {
+ return String.valueOf(new Date().getTime());
+ }
+
+ public String getCompleteDate() {
+ return String.valueOf(new Date().getTime());
+ }
+
+ public void reset(ActionEvent event) {
+ this.value = -5L;
+ }
+
+ public void complete(ActionEvent event) {
+ this.value = 120L;
+ }
+
+ /**
+ * @return the enabled
+ */
+ public boolean isEnabled() {
+ return enabled;
+ }
+
+ /**
+ * @param enabled the enabled to set
+ */
+ public void setEnabled(boolean enabled) {
+ this.enabled = enabled;
+ }
+
+ /**
+ * @return the value
+ */
+ public Long getValue() {
+ value++;
+ return value;
+ }
+
+ /**
+ * @param value the value to set
+ */
+ public void setValue(Long value) {
+ this.value = value;
+ }
+
+
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ProgressBarTestBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/RepeatData.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/RepeatData.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/RepeatData.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,62 @@
+/**
+ *
+ */
+package org.ajax4jsf.bean;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class RepeatData {
+
+ private List data;
+
+ private String text;
+
+
+ /**
+ * @return the text
+ */
+ public String getText() {
+ return text;
+ }
+
+ /**
+ * @param text the text to set
+ */
+ public void setText(String text) {
+ this.text = text;
+ }
+
+ public RepeatData() {
+ data = new ArrayList(10);
+ for(int i=0;i<10;i++){
+ Bean bean = new Bean();
+ bean.setText("Row "+i);
+ data.add(bean);
+ }
+ }
+
+ public String ok(){
+ System.out.println("Row command pressed");
+ return null;
+ }
+
+ /**
+ * @return the data
+ */
+ public List getData() {
+ return data;
+ }
+
+ /**
+ * @param data the data to set
+ */
+ public void setData(List data) {
+ this.data = data;
+ }
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/RepeatData.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/RichPanelTestBean.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/RichPanelTestBean.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/RichPanelTestBean.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,98 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library 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 library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.ajax4jsf.bean;
+
+import javax.faces.event.ActionEvent;
+
+public class RichPanelTestBean {
+ private String value;
+ private int value2;
+ private Object panelValue;
+ private Object panelValue2;
+
+ public RichPanelTestBean() {
+ value = "";
+ value2 = 0;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+
+ public void actionListener(ActionEvent event) {
+ this.value = event.getComponent().getId();
+ }
+
+ public String action1() {
+ this.value2 = 1;
+ return null;
+ }
+
+ public String action2() {
+ this.value2 = 2;
+ return null;
+ }
+
+ public String increment() {
+ if (4 == this.value2) {
+ this.value2 = 0;
+ }
+ this.value2++;
+ return null;
+ }
+
+ public int getValue2() {
+ return value2;
+ }
+
+ public void setValue2(int value2) {
+ this.value2 = value2;
+ }
+
+ public Object getPanelValue() {
+ return panelValue;
+ }
+
+ public void setPanelValue(Object panelValue) {
+ this.panelValue = panelValue;
+ }
+
+ public void cleanValues(ActionEvent event) {
+ value = "";
+ value2 = 0;
+ panelValue = null;
+ panelValue2 = null;
+ }
+
+ public Object getPanelValue2() {
+ return panelValue2;
+ }
+
+ public void setPanelValue2(Object panelValue2) {
+ this.panelValue2 = panelValue2;
+ }
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/RichPanelTestBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/TemplateBean.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/TemplateBean.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/TemplateBean.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,80 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library 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 library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.ajax4jsf.bean;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.faces.model.SelectItem;
+
+import org.ajax4jsf.template.Template;
+
+public class TemplateBean {
+ public static final String PARAM_NAME = "t";
+
+ private Template template = Template.SIMPLE;
+
+ /*
+ * public void initTemplate (ActionEvent event) { Map<String, String>
+ * reqMap =
+ * FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap();
+ * String template = reqMap.get(PARAM_NAME); this.template = template !=
+ * null ? template : "simple"; }
+ */
+
+ public String getTemplateId() {
+ return template.toString();
+ }
+
+ public void setTemplateId(String template) {
+ this.template = Template.valueOf(template);
+ }
+
+ public String getParentId() {
+ return template.getPrefix();
+ }
+
+ /**
+ * @return the template
+ */
+ public String getTemplate() {
+ return "../../template/" + template.getName() + ".xhtml";
+ }
+
+ /**
+ * @param template
+ * the template to set
+ */
+ public void setTemplate(Template template) {
+ this.template = template;
+ }
+
+ public List<SelectItem> getAvailableTemplates() {
+ List<SelectItem> retVal = new ArrayList<SelectItem>();
+ for (Template template : Template.values()) {
+ retVal.add(new SelectItem(template.toString(), template.getDesc()));
+ }
+
+ return retVal;
+ }
+
+}
\ No newline at end of file
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/TemplateBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/TestBean.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/TestBean.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/TestBean.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,64 @@
+package org.ajax4jsf.bean;
+
+
+
+import java.util.logging.Logger;
+
+import javax.faces.application.FacesMessage;
+import javax.faces.context.FacesContext;
+
+/**
+ * @author krasi
+ *
+ */
+public class TestBean {
+ String id = "";
+ static final Logger LOGGER = Logger.getLogger(TestBean.class.getName());
+
+ public TestBean() {
+ }
+
+ public String getId() {
+
+ FacesContext.getCurrentInstance().addMessage(
+ null,
+ new FacesMessage(FacesMessage.SEVERITY_ERROR, "Message 1.",
+ ""));
+
+ System.out.println("GET 1 ------" + id);
+ if (!id.equals("")) {
+ System.out.println("GET 2 ------" + id);
+ FacesContext.getCurrentInstance().addMessage(
+ null,
+ new FacesMessage(FacesMessage.SEVERITY_ERROR, "Message 2.",
+ "11"));
+
+ try {
+ System.out.println("GET 3 ------" + id);
+ throw new ObjectNotFoundException();
+
+ } catch (ObjectNotFoundException e) {
+ System.out.println("GET 4 ------" + id);
+ FacesContext.getCurrentInstance().addMessage(
+ null,
+ new FacesMessage(FacesMessage.SEVERITY_ERROR, "Message 3.",
+ "11"));
+ }
+
+ }
+
+ return id;
+ }
+
+ public void setId(String id) {
+ System.out.println("SET 1-" + id);
+ this.id = id;
+ }
+
+ public String searchByID() {
+ System.out.println("searchByID");
+ return null;
+
+ }
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/TestBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/TestListener.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/TestListener.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/TestListener.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,34 @@
+package org.ajax4jsf.bean;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.faces.context.FacesContext;
+
+import org.ajax4jsf.context.AjaxContext;
+import org.ajax4jsf.context.AjaxContextImpl;
+import org.ajax4jsf.event.AjaxEvent;
+import org.ajax4jsf.event.AjaxListener;
+
+public class TestListener implements AjaxListener {
+
+ @SuppressWarnings("unchecked")
+ public void processAjax(AjaxEvent event) {
+ System.out.println("TestListener");
+ FacesContext context = FacesContext.getCurrentInstance();
+ if (context != null) {
+ AjaxContext ajaxContext = AjaxContextImpl.getCurrentInstance(context);
+ if (ajaxContext != null) {
+ Map<String, Object> data = (Map<String,
Object>)ajaxContext.getResponseData();
+ if (null == data) {
+ data = new HashMap<String, Object>();
+ ajaxContext.setResponseData(data);
+ }
+ data.put("FListener", true);
+ }
+
+ }
+
+ }
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/TestListener.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/TimerBean.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/TimerBean.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/TimerBean.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,43 @@
+/**
+ *
+ */
+package org.ajax4jsf.bean;
+
+import java.util.Date;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class TimerBean {
+
+ private boolean _enabled;
+
+ /**
+ * @return the enabled
+ */
+ public boolean isEnabled() {
+ return _enabled;
+ }
+
+ /**
+ * @param enabled the enabled to set
+ */
+ public void setEnabled(boolean enabled) {
+ _enabled = enabled;
+ }
+
+ public Date getTimer(){
+ return new Date(System.currentTimeMillis());
+ }
+
+ public String go() {
+ setEnabled(true);
+ return null;
+ }
+
+ public String stop() {
+ setEnabled(false);
+ return null;
+ }
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/TimerBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ToolBarTestBean.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ToolBarTestBean.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ToolBarTestBean.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,46 @@
+package org.ajax4jsf.bean;
+
+public class ToolBarTestBean {
+
+ private String groupSeparator = "";
+
+ private String groupItemSeparator = "";
+
+ /**
+ * Gets value of groupSeparator field.
+ *
+ * @return value of groupSeparator field
+ */
+ public String getGroupSeparator() {
+ return groupSeparator;
+ }
+
+ /**
+ * Set a new value for groupSeparator field.
+ *
+ * @param groupSeparator
+ * a new value for groupSeparator field
+ */
+ public void setGroupSeparator(String groupSeparator) {
+ this.groupSeparator = groupSeparator;
+ }
+
+ /**
+ * Gets value of groupItemSeparator field.
+ *
+ * @return value of groupItemSeparator field
+ */
+ public String getGroupItemSeparator() {
+ return groupItemSeparator;
+ }
+
+ /**
+ * Set a new value for groupItemSeparator field.
+ *
+ * @param groupItemSeparator
+ * a new value for groupItemSeparator field
+ */
+ public void setGroupItemSeparator(String groupItemSeparator) {
+ this.groupItemSeparator = groupItemSeparator;
+ }
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ToolBarTestBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/model/Column.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/model/Column.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/model/Column.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,85 @@
+package org.ajax4jsf.model;
+
+import org.richfaces.model.Ordering;
+
+public class Column {
+
+ private int i;
+
+ private String header;
+
+ private String footer;
+
+ private Ordering ordering;
+
+
+ /**
+ * @param header
+ * @param footer
+ */
+ public Column(String header, String footer, int i) {
+ super();
+ this.i = i;
+ this.header = header;
+ this.footer = footer;
+ }
+
+ /**
+ * @return the header
+ */
+ public String getHeader() {
+ return header + i;
+ }
+
+ /**
+ * @param header the header to set
+ */
+ public void setHeader(String header) {
+ this.header = header;
+ }
+
+ /**
+ * @return the footer
+ */
+ public String getFooter() {
+ return footer + i;
+ }
+
+ /**
+ * @param footer the footer to set
+ */
+ public void setFooter(String footer) {
+ this.footer = footer;
+ }
+
+ /**
+ * @return the ordering
+ */
+ public Ordering getOrdering() {
+ return ordering;
+ }
+
+ /**
+ * @param ordering the ordering to set
+ */
+ public void setOrdering(Ordering ordering) {
+ this.ordering = ordering;
+ }
+
+ /**
+ * @return the i
+ */
+ public int getI() {
+ return i;
+ }
+
+ /**
+ * @param i the i to set
+ */
+ public void setI(int i) {
+ this.i = i;
+ }
+
+
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/model/Column.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/model/ListShuttleConverter.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/model/ListShuttleConverter.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/model/ListShuttleConverter.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,23 @@
+package org.ajax4jsf.model;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+
+public class ListShuttleConverter implements javax.faces.convert.Converter{
+
+ public Object getAsObject(FacesContext context, UIComponent component,
+ String value) {
+
+ int index = value.indexOf(':');
+ return new ListShuttleItem(Integer.valueOf(value.substring(0, index)),
value.substring(index + 1));
+ }
+
+ public String getAsString(FacesContext context, UIComponent component,
+ Object value) {
+ ListShuttleItem optionItem = (ListShuttleItem) value;
+ return optionItem.getNumder() + ":" + optionItem.getName();
+
+ }
+
+
+}
\ No newline at end of file
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/model/ListShuttleConverter.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/model/ListShuttleItem.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/model/ListShuttleItem.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/model/ListShuttleItem.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,79 @@
+package org.ajax4jsf.model;
+
+import java.io.Serializable;
+
+public class ListShuttleItem implements Serializable {
+
+ private static final long serialVersionUID = -7540977992693127759L;
+
+ private Integer numder;
+
+ private String name;
+
+ public ListShuttleItem() {
+
+ }
+
+ public ListShuttleItem(Integer i, String name) {
+ this.numder = i;
+ this.name = name;
+ }
+
+ /**
+ * @return the numder
+ */
+ public Integer getNumder() {
+ return numder;
+ }
+
+ /**
+ * @param numder the numder to set
+ */
+ public void setNumder(Integer numder) {
+ this.numder = numder;
+ }
+
+ /**
+ * @return the name
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * @param name the name to set
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object obj) {
+ if (obj == null) {
+ return false;
+ }
+ if (!(obj instanceof ListShuttleItem)) {
+ return false;
+ }
+ ListShuttleItem o = (ListShuttleItem)obj;
+ if (!o.name.equals(name) || !o.numder.equals(numder)) {
+ return false;
+ }
+ return true;
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode() {
+ return name.hashCode() + numder;
+ }
+
+
+
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/model/ListShuttleItem.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/template/Template.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/template/Template.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/template/Template.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,55 @@
+package org.ajax4jsf.template;
+
+/**
+ * Kids of templates that can be put in harness.
+ * @author carcasser
+ *
+ */
+public enum Template implements TestConstants {
+ SIMPLE (SIMPLE_TEMPLATE_NAME, COMPONENT_PREFIX_SIMPLE, SIMPLE_TEMPLATE_DESC),
+ DATA_TABLE (DATA_TABLE_TEMPLATE_NAME, COMPONENT_PREFIX_INSIDE_TABLE,
DATA_TABLE_TEMPLATE_DESC),
+ MODAL_PANEL (MODAL_PANEL_TEMPLATE_NAME, COMPONENT_PREFIX_SIMPLE,
MODAL_PANEL_TEMPLATE_DESC);
+
+ private String name;
+
+ private String prefix;
+
+ private String desc;
+
+ /**
+ * Private constructor.
+ *
+ * @param name
+ * @param prefix
+ */
+ private Template(String name, String prefix, String desc) {
+ this.name = name;
+ this.prefix = prefix;
+ this.desc = desc;
+ }
+
+ /**
+ * Gets value of name field.
+ * @return value of name field
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * Gets value of prefix field.
+ * @return value of prefix field
+ */
+ public String getPrefix() {
+ return prefix;
+ }
+
+ /**
+ * Gets value of desc field.
+ * @return value of desc field
+ */
+ public String getDesc() {
+ return desc;
+ }
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/template/Template.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/template/TestConstants.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/template/TestConstants.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/template/TestConstants.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,23 @@
+package org.ajax4jsf.template;
+
+public interface TestConstants {
+
+ /* Constants of component prefixes */
+ public static final String COMPONENT_PREFIX_INSIDE_TABLE =
"_Selenium_Test_DataTable:0:";
+ public static final String COMPONENT_PREFIX_SIMPLE = "";
+
+ /* Constants of template names */
+ public static final String SIMPLE_TEMPLATE_NAME = "simple";
+ public static final String DATA_TABLE_TEMPLATE_NAME = "dataTable";
+ public static final String MODAL_PANEL_TEMPLATE_NAME = "modalPanel";
+
+ /* Constants of template descriptions */
+ public static final String SIMPLE_TEMPLATE_DESC = "Simple";
+ public static final String DATA_TABLE_TEMPLATE_DESC = "DataTable";
+ public static final String MODAL_PANEL_TEMPLATE_DESC = "Modal Panel";
+
+ /* Constants of test configuration */
+ public final static String HOST = "localhost";
+ public final static String PROTOCOL = "http";
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/template/TestConstants.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/resources/org/ajax4jsf/css/loadStyleTest.css
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/main/resources/org/ajax4jsf/css/loadStyleTest.css
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/resources/org/ajax4jsf/css/loadStyleTest.css 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,5 @@
+.rectangle {
+ background-color: blue;
+ width: 50px;
+ height: 100px;
+}
\ No newline at end of file
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/resources/org/ajax4jsf/css/loadStyleTest.css
___________________________________________________________________
Name: svn:mime-type
+ text/css
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/resources/org/ajax4jsf/js/loadScriptTest.js
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/main/resources/org/ajax4jsf/js/loadScriptTest.js
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/resources/org/ajax4jsf/js/loadScriptTest.js 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,3 @@
+function summarize (operand1, operand2) {
+ return operand1 + operand2;
+}
\ No newline at end of file
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/resources/org/ajax4jsf/js/loadScriptTest.js
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/resources/org/ajax4jsf/message/resources_en_US.properties
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/main/resources/org/ajax4jsf/message/resources_en_US.properties
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/resources/org/ajax4jsf/message/resources_en_US.properties 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,2 @@
+test=It is sample message from resourceBundle
+error=Error was occured.
\ No newline at end of file
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/resources/org/ajax4jsf/message/resources_en_US.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/META-INF/MANIFEST.MF
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/webapp/META-INF/MANIFEST.MF
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/META-INF/MANIFEST.MF 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,2 @@
+Manifest-Version: 1.0
+
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/META-INF/MANIFEST.MF
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/WEB-INF/.faces-config.xml.jsfdia
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/WEB-INF/.faces-config.xml.jsfdia
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/WEB-INF/.faces-config.xml.jsfdia 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<PROCESS ENTITY="JSFProcess"/>
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/WEB-INF/faces-config.xml
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/WEB-INF/faces-config.xml 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,238 @@
+<?xml version="1.0"?>
+<!DOCTYPE faces-config PUBLIC
+ "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
+ "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
+
+
+<faces-config>
+ <application>
+ <locale-config>
+ <default-locale>en_US</default-locale>
+ </locale-config>
+ <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
+ <message-bundle>
+ org.ajax4jsf.message.resources
+ </message-bundle>
+ </application>
+
+ <converter>
+ <converter-id>listShuttleconverter</converter-id>
+
<converter-class>org.ajax4jsf.model.ListShuttleConverter</converter-class>
+ </converter>
+
+ <managed-bean>
+ <managed-bean-name>configurator</managed-bean-name>
+ <managed-bean-class>org.ajax4jsf.bean.Configurator</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+
+ <managed-bean>
+ <managed-bean-name>indexBean</managed-bean-name>
+ <managed-bean-class>org.ajax4jsf.bean.IndexBean</managed-bean-class>
+ <managed-bean-scope>application</managed-bean-scope>
+ </managed-bean>
+
+ <!-- queue.xhtml -->
+ <managed-bean>
+ <managed-bean-name>bean</managed-bean-name>
+ <managed-bean-class>org.ajax4jsf.bean.Bean</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ <managed-property>
+ <property-name>text</property-name>
+ <property-class>java.lang.String</property-class>
+ <null-value />
+ </managed-property>
+ </managed-bean>
+
+ <managed-bean>
+ <managed-bean-name>templateBean</managed-bean-name>
+ <managed-bean-class>org.ajax4jsf.bean.TemplateBean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+
+ <managed-bean>
+ <managed-bean-name>commandBean</managed-bean-name>
+ <managed-bean-class>org.ajax4jsf.bean.A4JCommandTestBean</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
+
+ <managed-bean>
+ <managed-bean-name>progressBarBean</managed-bean-name>
+ <managed-bean-class>org.ajax4jsf.bean.ProgressBarTestBean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>panelBean</managed-bean-name>
+ <managed-bean-class>org.ajax4jsf.bean.RichPanelTestBean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>jsFunctionBean</managed-bean-name>
+ <managed-bean-class>org.ajax4jsf.bean.JSFunctionBean</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>statusBean</managed-bean-name>
+ <managed-bean-class>org.ajax4jsf.bean.A4JStatusTestBean</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>pollBean</managed-bean-name>
+ <managed-bean-class>org.ajax4jsf.bean.A4JPollTestBean</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>keepAliveBean</managed-bean-name>
+ <managed-bean-class>org.ajax4jsf.bean.A4JKeepAliveTestBean</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>keepAliveAjaxOnlyBean</managed-bean-name>
+ <managed-bean-class>org.ajax4jsf.bean.A4JKeepAliveTestBean</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>regionBean</managed-bean-name>
+ <managed-bean-class>org.ajax4jsf.bean.A4JRegionTestBean</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>comboBean</managed-bean-name>
+ <managed-bean-class>org.ajax4jsf.bean.ComboBoxTestBean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>ddmenuBean</managed-bean-name>
+ <managed-bean-class>org.ajax4jsf.bean.DropDownMenuTestBean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>contextMenuBean</managed-bean-name>
+ <managed-bean-class>org.ajax4jsf.bean.ContextMenuTestBean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>pickListBean</managed-bean-name>
+ <managed-bean-class>org.ajax4jsf.bean.PickListTestBean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>inplaceSelectBean</managed-bean-name>
+ <managed-bean-class>org.ajax4jsf.bean.InplaceSelectTestBean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>orderingListBean</managed-bean-name>
+ <managed-bean-class>org.ajax4jsf.bean.OrderingListTestBean</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>dataTableBean</managed-bean-name>
+ <managed-bean-class>org.ajax4jsf.bean.DataTableBean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>sliderBean</managed-bean-name>
+ <managed-bean-class>org.ajax4jsf.bean.InputNumberSliderBean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>a4jOutputPanelBean</managed-bean-name>
+ <managed-bean-class>org.ajax4jsf.bean.A4JOutputPanelTestBean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>a4jRepeatBean</managed-bean-name>
+ <managed-bean-class>org.ajax4jsf.bean.A4JRepeatTestBean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>a4jIncludeBean</managed-bean-name>
+ <managed-bean-class>org.ajax4jsf.bean.A4JIncludeTestBean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>a4jMediaBean</managed-bean-name>
+ <managed-bean-class>org.ajax4jsf.bean.MediaBean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>calendarBean</managed-bean-name>
+ <managed-bean-class>org.ajax4jsf.bean.CalendarTestBean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>formBean</managed-bean-name>
+ <managed-bean-class>org.ajax4jsf.bean.A4JFormTestBean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>ajaxListenerBean</managed-bean-name>
+ <managed-bean-class>org.ajax4jsf.bean.AjaxListenerTestBean</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>actionParam</managed-bean-name>
+ <managed-bean-class>org.ajax4jsf.bean.A4JActionParam</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>ajaxSupport</managed-bean-name>
+ <managed-bean-class>org.ajax4jsf.bean.A4JSupport</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>ajaxPushBean</managed-bean-name>
+ <managed-bean-class>org.ajax4jsf.bean.AjaxPushTestBean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>loadBundleBean</managed-bean-name>
+ <managed-bean-class>org.ajax4jsf.bean.LoadBundleTestBean</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>listShuttle</managed-bean-name>
+
<managed-bean-class>org.ajax4jsf.bean.ListShuttleBean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>inplaceInputBean</managed-bean-name>
+ <managed-bean-class>org.ajax4jsf.bean.InplaceInputTestBean</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>toolBarBean</managed-bean-name>
+ <managed-bean-class>org.ajax4jsf.bean.ToolBarTestBean</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>modalPanelBean</managed-bean-name>
+ <managed-bean-class>org.ajax4jsf.bean.ModalPanelTestBean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>a4jHtmlCommandLinkBean</managed-bean-name>
+ <managed-bean-class>org.ajax4jsf.bean.A4JHTMLCommandLinkTestBean</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>dataFilterSliderBean</managed-bean-name>
+ <managed-bean-class>org.ajax4jsf.bean.DataFilterSliderBean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+ <navigation-rule>
+ <from-view-id>/pages/ajaxInclude/step1.xhtml</from-view-id>
+ <navigation-case>
+ <from-outcome>next</from-outcome>
+ <to-view-id>/pages/ajaxInclude/step2.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>/pages/ajaxInclude/step2.xhtml</from-view-id>
+ <navigation-case>
+ <from-outcome>previous</from-outcome>
+ <to-view-id>/pages/ajaxInclude/step1.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+</faces-config>
\ No newline at end of file
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/WEB-INF/faces-config.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Added: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/webapp/WEB-INF/web.xml
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/WEB-INF/web.xml 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,113 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+ <display-name>Archetype Created Web Application</display-name>
+ <context-param>
+ <param-name>facelets.REFRESH_PERIOD</param-name>
+ <param-value>2</param-value>
+ </context-param>
+ <context-param>
+ <param-name>facelets.DEVELOPMENT</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <context-param>
+ <param-name>com.sun.faces.validateXml</param-name>
+ <param-value>false</param-value>
+ </context-param>
+ <context-param>
+ <param-name>com.sun.faces.verifyObjects</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <context-param>
+ <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
+ <param-value>server</param-value>
+ </context-param>
+ <!--
+ <context-param>
+ <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
+ <param-value>com.sun.facelets.FaceletViewHandler</param-value>
+ </context-param>
+ -->
+ <context-param>
+ <param-name>facelets.VIEW_MAPPINGS</param-name>
+ <param-value>*.xhtml</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name>
+ <param-value>false</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.ajax4jsf.xmlparser.ORDER</param-name>
+ <param-value>NONE,TIDY,NEKO</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.ajax4jsf.xmlparser.TIDY</param-name>
+ <param-value>
+ /faces/TIDY/*
+ </param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.ajax4jsf.xmlparser.NEKO</param-name>
+ <param-value>
+ /faces/NEKO/*
+ </param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.ajax4jsf.xmlparser.NONE</param-name>
+ <param-value>
+ /faces/NONE/*
+ </param-value>
+ </context-param>
+ <!--
+ <context-param>
+ <param-name>org.ajax4jsf.SKIN</param-name>
+ <param-value>#{skinBean.skin}</param-value>
+ </context-param>
+ -->
+ <context-param>
+ <param-name>org.richfaces.LoadStyleStrategy</param-name>
+ <param-value>#{configurator.loadStyleStrategy}</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.richfaces.LoadScriptStrategy</param-name>
+ <param-value>#{configurator.loadScriptStrategy}</param-value>
+ </context-param>
+ <!--
+ -->
+ <filter>
+ <display-name>Ajax4jsf Filter</display-name>
+ <filter-name>ajax4jsf</filter-name>
+ <filter-class>org.ajax4jsf.Filter</filter-class>
+ <init-param>
+ <param-name>forceparser</param-name>
+ <param-value>true</param-value>
+ </init-param>
+ </filter>
+ <filter-mapping>
+ <filter-name>ajax4jsf</filter-name>
+ <servlet-name>Faces Servlet</servlet-name>
+ <dispatcher>REQUEST</dispatcher>
+ <dispatcher>FORWARD</dispatcher>
+ <dispatcher>INCLUDE</dispatcher>
+ <dispatcher>ERROR</dispatcher>
+ </filter-mapping>
+ <servlet>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>/faces/NEKO/*</url-pattern>
+ <url-pattern>/faces/TIDY/*</url-pattern>
+ <url-pattern>/faces/NONE/*</url-pattern>
+ </servlet-mapping>
+ <error-page>
+ <exception-type>javax.servlet.ServletException</exception-type>
+ <location>/faces/error.xhtml</location>
+ </error-page>
+ <login-config>
+ <auth-method>BASIC</auth-method>
+ </login-config>
+</web-app>
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/WEB-INF/web.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Added: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/index.jsp
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/webapp/index.jsp
(rev 0)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/webapp/index.jsp 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1 @@
+<jsp:forward page="faces/TIDY/index.xhtml"></jsp:forward>
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/index.jsp
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
Added: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/index.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/index.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/layout/controlLayout.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/layout/controlLayout.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/layout/layout.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/layout/layout.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/actionParam/actionParam.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/actionParam/actionParam.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxCommandButton/ajaxButtonTest.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxCommandButton/ajaxButtonTest.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxCommandLink/ajaxLinkTest.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxCommandLink/ajaxLinkTest.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxForm/ajaxFormTest.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxForm/ajaxFormTest.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxHTMLCommandLink/ajaxHTMLLinkTest.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxHTMLCommandLink/ajaxHTMLLinkTest.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxInclude/ajaxIncludeTest.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxInclude/ajaxIncludeTest.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxInclude/include1.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxInclude/include1.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxInclude/include2.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxInclude/include2.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxInclude/include3.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxInclude/include3.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxInclude/step1.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxInclude/step1.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxInclude/step2.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxInclude/step2.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxListener/ajaxListenerTest.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxListener/ajaxListenerTest.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxLog/ajaxLogTest.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxLog/ajaxLogTest.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxMediaOutput/ajaxMediaOutputTest.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxMediaOutput/ajaxMediaOutputTest.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxOutputPanel/ajaxOutputPanelTest.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxOutputPanel/ajaxOutputPanelTest.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxPoll/ajaxPollTest.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxPoll/ajaxPollTest.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxPush/ajaxPushTest.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxPush/ajaxPushTest.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxRegion/ajaxRegionTest.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxRegion/ajaxRegionTest.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxRepeat/ajaxRepeatTest.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxRepeat/ajaxRepeatTest.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxStatus/ajaxStatusDescription.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxStatus/ajaxStatusDescription.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxStatus/ajaxStatusTest.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxStatus/ajaxStatusTest.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxSupport/ajaxSupport.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxSupport/ajaxSupport.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/calendar/calendarTest.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/calendar/calendarTest.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/columns/columnsTest.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/columns/columnsTest.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/comboBox/comboBoxTest.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/comboBox/comboBoxTest.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/contextMenu/contextMenu.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/contextMenu/contextMenu.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/contextMenu/contextMenuDescription.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/contextMenu/contextMenuDescription.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/dataFilterSlider/dataFilterSliderTest.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/dataFilterSlider/dataFilterSliderTest.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/dataTable/dataTableTest.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/dataTable/dataTableTest.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/dropDownMenu/dropDownMenuTest.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/dropDownMenu/dropDownMenuTest.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/inplaceInput/inplaceInputTest.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/inplaceInput/inplaceInputTest.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/inplaceSelect/inplaceSelectTest.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/inplaceSelect/inplaceSelectTest.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/inputNumberSlider/inputNumberSliderTest.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/inputNumberSlider/inputNumberSliderTest.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/inputNumberSpinner/inputNumberSpinnerTest.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/inputNumberSpinner/inputNumberSpinnerTest.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/jsFunction/jsFunctionDescription.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/jsFunction/jsFunctionDescription.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/jsFunction/jsFunctionTest.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/jsFunction/jsFunctionTest.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/keepAlive/keepAliveTest.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/keepAlive/keepAliveTest.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/listShuttle/listShuttleTest.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/listShuttle/listShuttleTest.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/loadBundle/loadBundle.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/loadBundle/loadBundle.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/loadScript/loadScriptDescription.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/loadScript/loadScriptDescription.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/loadScript/loadScriptTest.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/loadScript/loadScriptTest.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/loadStyle/loadStyleDescription.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/loadStyle/loadStyleDescription.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/loadStyle/loadStyleTest.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/loadStyle/loadStyleTest.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/modalPanel/modalPanelTest.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/modalPanel/modalPanelTest.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/orderingList/orderingListDescription.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/orderingList/orderingListDescription.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/orderingList/orderingListTest.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/orderingList/orderingListTest.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/panelBar/panelBarDescription.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/panelBar/panelBarDescription.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/panelBar/panelBarTest.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/panelBar/panelBarTest.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/panelMenu/panelMenuDescription.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/panelMenu/panelMenuDescription.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/panelMenu/panelMenuTest.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/panelMenu/panelMenuTest.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/pickList/pickListTest.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/pickList/pickListTest.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/progressBar/progressBarDescription.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/progressBar/progressBarDescription.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/progressBar/progressBarTest.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/progressBar/progressBarTest.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/simpleTogglePanel/simpleTogglePanel.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/simpleTogglePanel/simpleTogglePanel.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/simpleTogglePanel/simpleTogglePanelDescription.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/simpleTogglePanel/simpleTogglePanelDescription.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/spacer/spacerTest.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/spacer/spacerTest.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/tabPanel/tabPanelDescription.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/tabPanel/tabPanelDescription.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/tabPanel/tabPanelTest.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/tabPanel/tabPanelTest.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/togglePanel/togglePanelDescription.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/togglePanel/togglePanelDescription.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/togglePanel/togglePanelTest.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/togglePanel/togglePanelTest.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/toolBar/eventTest.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/toolBar/eventTest.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/toolBar/toolBarTest.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/toolBar/toolBarTest.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/template/dataTable.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/template/dataTable.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/template/modalPanel.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/template/modalPanel.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/template/simple.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/template/simple.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/test.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/test.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/RichSeleniumTest.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/RichSeleniumTest.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/RichSeleniumTest.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,11 @@
+package org.richfaces;
+
+public interface RichSeleniumTest {
+
+ public void startSelenium(String browser, String filterPrefix);
+
+ public void stopSelenium();
+
+ public String getTestUrl();
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/RichSeleniumTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/SeleniumTestBase.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/SeleniumTestBase.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/SeleniumTestBase.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,848 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library 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 library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.ajax4jsf.bean.Configurator;
+import org.ajax4jsf.javascript.ScriptUtils;
+import org.ajax4jsf.template.Template;
+import org.openqa.selenium.server.RemoteControlConfiguration;
+import org.openqa.selenium.server.SeleniumServer;
+import org.testng.Assert;
+import org.testng.annotations.AfterClass;
+import org.testng.annotations.AfterSuite;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.BeforeSuite;
+import org.testng.annotations.BeforeTest;
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Parameters;
+
+import com.thoughtworks.selenium.DefaultSelenium;
+
+/**
+ * The base java class for selenium tests implementation.
+ *
+ * @author Andrey Markavtsov
+ *
+ */
+public abstract class SeleniumTestBase implements RichSeleniumTest {
+
+ /** Specifies the time to wait for page rendering */
+ private static final Integer pageRenderTime = 5000;
+
+ /** Specifies the time to wait for ajax processing */
+ protected static final int ajaxCompletionTime = 3000;
+
+ protected static final String serverPort = "8085";
+
+ protected static final String WINDOW_JS_RESOLVER =
"selenium.browserbot.getCurrentWindow().";
+
+ /** Parent component id */
+ private String parentId;
+
+ /** The default selenium instance */
+ public DefaultSelenium selenium;
+
+ /** Host */
+ public String host;
+
+ /** Port */
+ public String port;
+
+ /** Protocol */
+ public String protocol;
+
+ private String filterPrefix;
+
+ private SeleniumServer seleniumServer;
+
+ private Object[][] data;
+
+ /** Defines the name of current j2ee application name */
+ public static final String APPLICATION_NAME = "seleniumTest";
+
+ public SeleniumTestBase() {
+ this("http", "localhost", serverPort);
+ }
+
+ public SeleniumTestBase(String protocol, String host, String port) {
+ this.host = host;
+ this.port = port;
+ this.protocol = protocol;
+ }
+
+ @BeforeSuite
+ public void startSeleniumServer() throws Exception {
+ RemoteControlConfiguration config = new RemoteControlConfiguration();
+ config.setMultiWindow(false);
+ seleniumServer = new SeleniumServer(false, config);
+ seleniumServer.start();
+ }
+
+ @DataProvider(name = "templates")
+ protected Object[][] templates() {
+ return new Object[][] { { Template.SIMPLE }, { Template.DATA_TABLE }, {
Template.MODAL_PANEL } };
+ //return this.data;
+ }
+
+ /**
+ * This method are invoked before selenium tests started
+ */
+ @BeforeClass
+ @Parameters({"browser", "filterPrefix"})
+ public void startSelenium(String browser, String filterPrefix) {
+ synchronized (MUTEX) {
+ this.filterPrefix = filterPrefix;
+ selenium = createSeleniumClient(protocol + "://" + host +
":" + port + "/", browser);
+ selenium.start();
+ selenium.allowNativeXpath("false");
+ }
+ }
+
+ @BeforeTest
+ @Parameters({"loadStyleStrategy", "loadScriptStrategy"})
+ protected void loadConfiguration(String loadStyleStrategy, String loadScriptStrategy)
throws Exception {
+ Configurator.setLoadScriptStrategy(loadScriptStrategy);
+ Configurator.setLoadStyleStrategy(loadStyleStrategy);
+ }
+
+ /**
+ * This method are invoked after selenium tests completed
+ */
+ @AfterClass(alwaysRun=true)
+ public void stopSelenium() {
+ synchronized (MUTEX) {
+ selenium.stop();
+ selenium = null;
+ }
+ }
+
+ protected void loadTemplates(String templateExpr) {
+ String[] array = new String[]{};
+ if(null != templateExpr) {
+ array = templateExpr.split(",");
+ }
+
+ List<Object[]> list = new ArrayList<Object[]>();
+ for (String string : array) {
+ Object[] elem = new Object[] {Template.valueOf(string)};
+ list.add(elem);
+ }
+
+ this.data = (Object[][]) list.toArray(new Object[0][0]);
+ }
+
+ @AfterSuite
+ public void stopSeleniumServer() throws Exception {
+ seleniumServer.stop();
+ }
+
+ /**
+ * @param url
+ * @param browser
+ * @return
+ */
+ private DefaultSelenium createSeleniumClient(String url, String browser) {
+ return new DefaultSelenium(host, 4444, browser, url);
+ }
+
+ private static final Object MUTEX = new Object();
+
+ /**
+ * Renders page
+ */
+ protected void renderPage(Template template) {
+ selenium.open(protocol + "://" + host + ":" + port +
"/" + APPLICATION_NAME + filterPrefix + getTestUrl());
+ selenium.waitForPageToLoad(String.valueOf(pageRenderTime));
+
+ setParentId(template.getPrefix());
+ runScript("loadTemplate('" + template + "');",
false);
+ waitForPageToLoad();
+
+ checkPageRendering(); // At the first we check if page has been
+ // rendered
+ checkJSError(); // At the second we check if JS errors occurred
+
+ reRenderForm(); // ReRender component
+
+ checkPageRendering(); // Check all again
+ checkJSError();
+
+ }
+
+ /**
+ * Writes status message on client side
+ *
+ * @param message
+ */
+ public void writeStatus(String message, boolean isError) {
+ message = message.replace("'", "\\'");
+ StringBuffer buffer = new StringBuffer("writeStatus('");
+ buffer.append(message);
+ if (!isError) {
+ buffer.append("')");
+ }else {
+ buffer.append("',true)");
+ }
+ runScript(buffer.toString());
+ }
+
+ /**
+ * Writes status message on client side
+ *
+ * @param message
+ */
+ public void writeStatus(String message) {
+ writeStatus(message, false);
+ }
+
+ /**
+ * ReRenders the component
+ */
+ public void reRenderForm() {
+
selenium.getEval("selenium.browserbot.getCurrentWindow().reRenderAll();");
+ // clickById("_Selenium_Test_ReRender_Form:_reRender");
+ waitForAjaxCompletion(3000);
+ }
+
+ /**
+ * Performs script defined in parameter
+ *
+ * @param script
+ * @return
+ */
+ public String runScript(String script) {
+ String result = selenium.getEval(WINDOW_JS_RESOLVER + script);
+ checkJSError();
+ return result;
+ }
+
+ /**
+ * Performs script defined in parameter
+ *
+ * @param script
+ * @return
+ */
+ public String runScript(String script, boolean checkEerror) {
+ String result = selenium.getEval(WINDOW_JS_RESOLVER + script);
+ if (checkEerror) {
+ checkJSError();
+ }
+ return result;
+ }
+
+ /**
+ * Checks if JS error occurred. Fails test if yes. This method should be
+ * invoked after each event or any thing which can be a cause of JS error.
+ */
+ public void checkJSError() {
+ String error = selenium.getEval(WINDOW_JS_RESOLVER + "checkError();");
+ if (error != null && !("null".equals(error)) &&
!("".equals(error))) {
+ Assert.fail("Failure by the following Javascript error: " +
error);
+ }
+ }
+
+ /**
+ * Checks if page containing component test has been rendered completely
+ */
+ public void checkPageRendering() {
+ try {
+ String t1 = getTextById("_Selenium_Test_ControlPoint1");
+ String t2 = getTextById("_Selenium_Test_ControlPoint2");
+ if (t1 == null || t2 == null || !"Control1".equals(t1) ||
!"Control2".equals(t2)) {
+ Assert.fail("The page has been not rendered properlly");
+ }
+ } catch (Exception e) {
+ Assert.fail("The page has not been rendered properly due the following
error: " + e);
+ }
+ }
+
+ /**
+ * Waits while AJAX request will be completed
+ *
+ * @param miliseconds -
+ * time to wait
+ */
+ public void waitForAjaxCompletion(int miliseconds) {
+ selenium.waitForCondition(WINDOW_JS_RESOLVER + "done==true",
String.valueOf(miliseconds));
+ runScript("window.done=false");
+ }
+
+ /**
+ * Waits while AJAX request will be completed
+ *
+ * @param miliseconds -
+ * time to wait
+ */
+ public void waitForAjaxCompletion() {
+ waitForAjaxCompletion(ajaxCompletionTime);
+ }
+
+ /**
+ * Waits while simple request will be completed
+ *
+ * @param miliseconds -
+ * time to wait
+ */
+ public void waitForPageToLoad(int miliseconds) {
+ selenium.waitForPageToLoad(String.valueOf(miliseconds));
+ }
+
+ /**
+ * Waits for condition
+ *
+ * @param condition
+ * @param miliseconds
+ */
+ public void waiteForCondition(String condition, int miliseconds) {
+ selenium.waitForCondition(WINDOW_JS_RESOLVER + condition,
String.valueOf(miliseconds));
+ checkJSError();
+ }
+
+ /**
+ * Waits while simple request will be completed
+ *
+ */
+ public void waitForPageToLoad() {
+ selenium.waitForPageToLoad(String.valueOf(pageRenderTime));
+ }
+
+ /**
+ * Asserts DOM node value equals to value defined
+ *
+ * @param id -
+ * DOM element id
+ * @param value -
+ * value defined
+ */
+ public void AssertValueEquals(String id, String value) {
+ String _v = getValueById(id);
+ Assert.assertEquals(_v, value);
+ }
+
+ /**
+ * Asserts DOM node value equals to value defined
+ *
+ * @param id -
+ * DOM element id
+ * @param value -
+ * value defined
+ * @param message = message to be displayed in failure case
+ */
+ public void AssertValueEquals(String id, String value, String message) {
+ String _v = getValueById(id);
+ Assert.assertEquals(_v, value, message);
+ }
+
+ /**
+ * Asserts DOM node value does not equal to value defined
+ *
+ * @param id -
+ * DOM element id
+ * @param value -
+ * value defined
+ */
+ public void AssertValueNotEquals(String id, String value) {
+ String _v = getValueById(id);
+ Assert.assertNotSame(_v, value);
+ }
+
+
+ /**
+ * Asserts DOM node value does not equal to value defined
+ *
+ * @param id -
+ * DOM element id
+ * @param value -
+ * value defined
+ * @param message = message to be displayed in failure case
+ */
+ public void AssertValueNotEquals(String id, String value, String message) {
+ String _v = getValueById(id);
+ Assert.assertNotSame(_v, value, message);
+ }
+
+
+ /**
+ * Asserts DOM node text equals to text defined
+ *
+ * @param locator -
+ * locator an element locator
+ * @param value -
+ * text defined
+ */
+ public void AssertTextEquals(String locator, String value) {
+ String _v = selenium.getText(locator);
+ Assert.assertEquals(_v, value);
+ }
+
+ /**
+ * Asserts DOM node text equals to text defined
+ *
+ * @param id -
+ * DOM element id
+ * @param value -
+ * text defined
+ * @param message = message to be displayed in failure case
+ */
+ public void AssertTextEquals(String id, String value, String message) {
+ String _v = getTextById(id);
+ Assert.assertEquals(_v, value, message);
+ }
+
+
+ /**
+ * Asserts DOM node text does not equal to text defined
+ *
+ * @param id -
+ * DOM element id
+ * @param value -
+ * text defined
+ */
+ public void AssertTextNotEquals(String id, String value) {
+ String _v = getTextById(id);
+ Assert.assertNotSame(_v, value);
+ }
+
+ /**
+ * Asserts DOM node text does not equal to text defined
+ *
+ * @param id -
+ * DOM element id
+ * @param value -
+ * text defined
+ * @param message = message to be displayed in failure case
+ */
+ public void AssertTextNotEquals(String id, String value, String message) {
+ String _v = getTextById(id);
+ Assert.assertNotSame(_v, value, message);
+ }
+
+ /**
+ * Asserts DOM node is visible
+ *
+ * @param id -
+ * DOM element id
+ */
+ public void AssertVisible(String id) {
+ Assert.assertTrue(isVisibleById(id));
+ }
+
+ /**
+ * Asserts DOM node is not present
+ *
+ * @param id -
+ * DOM element id
+ */
+ public void AssertNotPresent(String id) {
+ Assert.assertFalse(isPresentById(id));
+ }
+
+ /**
+ * Asserts DOM node is not visible
+ *
+ * @param id -
+ * DOM element id
+ */
+ public void AssertNotVisible(String id) {
+ Assert.assertFalse(isVisibleById(id));
+ }
+
+ /**
+ * Asserts DOM node is present
+ *
+ * @param id -
+ * DOM element id
+ */
+ public void AssertPresent(String id) {
+ Assert.assertTrue(isPresentById(id));
+ }
+
+ /**
+ * Asserts DOM node is present
+ * @param id - DOM element id
+ */
+ public void AssertRendered(String id) {
+ if (!isPresentById(id)) {
+ Assert.fail("Component " + id + " should be rendered on page");
+ }
+ }
+
+ /**
+ * Asserts DOM node is not present
+ * @param id - DOM element id
+ */
+ public void AssertNotRendered(String id) {
+ if (isPresentById(id)) {
+ Assert.fail("Component " + id + " should not be rendered on
page");
+ }
+ }
+
+ /**
+ * Returns element's text
+ *
+ * @param id -
+ * DOM element id
+ * @return
+ */
+ public String getTextById(String id) {
+ return selenium.getText("id=" + id);
+ }
+
+ /**
+ * Returns element's value
+ *
+ * @param id -
+ * DOM element id
+ * @return
+ */
+ public String getValueById(String id) {
+ return selenium.getValue("id=" + id);
+ }
+
+ /**
+ * Sets a new value for DOM node with specified id.
+ *
+ * @param id -
+ * DOM element id
+ * @param value -
+ * a new DOM element's value
+ */
+ public void setValueById(String id, String value) {
+
runScript(String.format("document.getElementById('%1$s').value='%2$s';",
id, value));
+ }
+
+ /**
+ * Returns element's width
+ *
+ * @param id -
+ * DOM element id
+ * @return
+ */
+ public Number getWidthById(String id) {
+ return selenium.getElementWidth("id=" + id);
+ }
+
+ /**
+ * Returns element's height
+ *
+ * @param id -
+ * DOM element id
+ * @return
+ */
+ public Number getHeightById(String id) {
+ return selenium.getElementHeight("id=" + id);
+ }
+
+ /**
+ * Clicks on element
+ *
+ * @param id -
+ * DOM element id
+ * @return
+ */
+ public void clickById(String id) {
+ selenium.click("id=" + id);
+ checkJSError();
+ }
+
+ /**
+ * Clicks an ajax command and wait for ajax request completion.
+ * @param locator an element locator
+ */
+ public void clickAjaxCommandAndWait(String locator) {
+ selenium.click(locator);
+ waitForAjaxCompletion();
+ }
+
+ /**
+ * This method should be used for click on command controls instead of
+ * 'clickById' method.
+ *
+ * @param commandId
+ */
+ public void clickCommandAndWait(String commandId) {
+ selenium.click("id=" + commandId);
+ waitForPageToLoad();
+ }
+
+ /**
+ * Return true if element is visible
+ *
+ * @param id -
+ * DOM element id
+ * @return
+ */
+ public boolean isVisibleById(String id) {
+ return selenium.isVisible("id=" + id);
+ }
+
+ /**
+ * Returns true if element with given id is present.
+ *
+ * @param id -
+ * DOM element id
+ * @return true if element with given id is present, otherwise - false
+ */
+ public boolean isPresentById(String id) {
+ return selenium.isElementPresent("id=" + id);
+ }
+
+ /**
+ * Invokes JS method on client.
+ *
+ * @param id -
+ * DOM id of component
+ * @param method -
+ * string method name
+ * @param parameters -
+ * parameters
+ * @return
+ */
+ public String invokeFromComponent(String id, String method, Object parameters) {
+ String _return = null;
+ StringBuffer buffer = new StringBuffer();
+ buffer.append("$('");
+ buffer.append(id);
+ buffer.append("').component.");
+ buffer.append(method);
+ buffer.append("(");
+ buffer.append(ScriptUtils.toScript(parameters));
+ buffer.append(");");
+ _return = runScript(buffer.toString());
+ return _return;
+ }
+
+ /**
+ * Creates delay
+ *
+ * @param miliSeconds
+ * @throws InterruptedException
+ */
+ public void delay(int miliSeconds) {
+ try {
+ Thread.sleep(miliSeconds);
+ } catch (Exception e) {
+
+ }
+ }
+
+ /**
+ * Creates pause for defined time in miliSeconds
+ *
+ * @param miliSeconds
+ */
+ public void pause(int miliSeconds, String id) {
+ StringBuffer script = new StringBuffer("pause(");
+ script.append(miliSeconds);
+ script.append(",'");
+ script.append(id);
+ script.append("');");
+ runScript(script.toString());
+ selenium.waitForCondition(WINDOW_JS_RESOLVER + "pauseHolder['" + id
+ "'] == true;", String
+ .valueOf(miliSeconds + 1000));
+ }
+
+ /**
+ * @return the parentId
+ */
+ public String getParentId() {
+ return parentId;
+ }
+
+ /**
+ * @param parentId
+ * the parentId to set
+ */
+ public void setParentId(String parentId) {
+ this.parentId = parentId;
+ }
+
+ /**
+ * Workaround for selenium.type/selenium.typeKeys
+ * @param locator
+ * @param string
+ */
+ public void type(String locator, String string) {
+ selenium.type(locator, "");
+ StringBuffer value = new StringBuffer(selenium.getValue(locator));
+ char[] chars = string.toCharArray();
+ for (int i = 0; i < chars.length; i++) {
+ String key = Character.toString(chars[i]);
+ value.append(key);
+
+ selenium.keyDown(locator, key);
+
+ if(!isFF()) {
+ selenium.type(locator, value.toString());
+ }
+
+ selenium.keyPress(locator, key);
+ selenium.keyUp(locator, key);
+
+ }
+ }
+
+ public void testOnclickEvent(String testElementId, String testElementResultId, String
beforeResult, String afterResult) {
+ writeStatus("Testing onclick event");
+ AssertTextEquals(testElementResultId, beforeResult);
+ selenium.click(testElementId);
+ AssertTextEquals(testElementResultId, afterResult);
+ }
+
+ public void testOnDblclickEvent(String testElementId, String testElementResultId,
String beforeResult, String afterResult) {
+ writeStatus("Testing ondblclick event");
+ AssertTextEquals(testElementResultId, beforeResult);
+ selenium.doubleClick(testElementId);
+ AssertTextEquals(testElementResultId, afterResult);
+ }
+
+ public void testOnfocusEvent(String testElementId, String testElementResultId, String
beforeResult, String afterResult) {
+ writeStatus("Testing onfocus event");
+ AssertTextEquals(testElementResultId, beforeResult);
+ selenium.focus(testElementId);
+ AssertTextEquals(testElementResultId, afterResult);
+ }
+
+ public void testOnkeydownEvent(String testElementId, String testElementResultId,
String beforeResult, String afterResult) {
+ writeStatus("Testing onkeydown event");
+ AssertTextEquals(testElementResultId, beforeResult);
+ selenium.keyDown(testElementId, "1");
+ AssertTextEquals(testElementResultId, afterResult);
+ }
+
+ public void testOnkeypressEvent(String testElementId, String testElementResultId,
String beforeResult, String afterResult) {
+ writeStatus("Testing onkeypress event");
+ AssertTextEquals(testElementResultId, beforeResult);
+ selenium.keyPress(testElementId, "1");
+ AssertTextEquals(testElementResultId, afterResult);
+ }
+
+ public void testOnkeyupEvent(String testElementId, String testElementResultId, String
beforeResult, String afterResult) {
+ writeStatus("Testing onkeyup event");
+ AssertTextEquals(testElementResultId, beforeResult);
+ selenium.keyUp(testElementId, "1");
+ AssertTextEquals(testElementResultId, afterResult);
+ }
+
+ public void testOnmousedownEvent(String testElementId, String testElementResultId,
String beforeResult, String afterResult) {
+ writeStatus("Testing onmousedown event");
+ AssertTextEquals(testElementResultId, beforeResult);
+ selenium.mouseDown(testElementId);
+ AssertTextEquals(testElementResultId, afterResult);
+ }
+
+ public void testOnmousemoveEvent(String testElementId, String testElementResultId,
String beforeResult, String afterResult) {
+ writeStatus("Testing onmousemove event");
+ AssertTextEquals(testElementResultId, beforeResult);
+ selenium.mouseMove(testElementId);
+ AssertTextEquals(testElementResultId, afterResult);
+ }
+
+ public void testOnmouseoutEvent(String testElementId, String testElementResultId,
String beforeResult, String afterResult) {
+ writeStatus("Testing onmouseout event");
+ AssertTextEquals(testElementResultId, beforeResult);
+ selenium.mouseOut(testElementId);
+ AssertTextEquals(testElementResultId, afterResult);
+ }
+
+ public void testOnmouseoverEvent(String testElementId, String testElementResultId,
String beforeResult, String afterResult) {
+ writeStatus("Testing onmouseover event");
+ AssertTextEquals(testElementResultId, beforeResult);
+ selenium.mouseOver(testElementId);
+ AssertTextEquals(testElementResultId, afterResult);
+ }
+
+ public void testOnmouseupEvent(String testElementId, String testElementResultId,
String beforeResult, String afterResult) {
+ writeStatus("Testing onmouseup event");
+ AssertTextEquals(testElementResultId, beforeResult);
+ selenium.mouseUp(testElementId);
+ AssertTextEquals(testElementResultId, afterResult);
+ }
+
+ /**
+ * Method to assert element style attribute with expected
+ * @param elementId - tested element id
+ * @param expectedExpression - expected style attribute
+ */
+ public void assertStyleAttribute(String elementId, String expectedExpression) {
+ String styleAttribute = selenium.getAttribute("//*[@id='" + elementId +
"']/@style");
+ if (!styleAttribute.toLowerCase().contains(expectedExpression.toLowerCase())) {
+ Assert.fail("Element '" + elementId + "' with style
'" + styleAttribute + "' doesn't contain '" +
expectedExpression + "'");
+ }
+ }
+
+ /**
+ * Asserts that expected columns count equals actual one.
+ * @param i the expected columns count
+ * @param tableId id of table to be checked
+ */
+ public void assertColumnsCount(int i, String tableId) {
+ StringBuffer script = new StringBuffer("$('");
+ script.append(tableId);
+ script.append("').rows[0].cells.length");
+
+ String count = runScript(script.toString());
+ Assert.assertEquals(count, String.valueOf(i));
+ }
+
+ /**
+ * Asserts that expected rows count equals actual one.
+ * @param i the expected rows count
+ * @param tableId id of table to be checked
+ */
+ public void assertRowsCount(int i, String tableId) {
+ int count = selenium.getXpathCount("//table[@id='" + tableId +
"']/tbody/tr").intValue();
+ Assert.assertEquals(count, i);
+ }
+
+ /**
+ * Checks whether client is FireFox
+ *
+ * @return true if client is FireFox
+ */
+ public boolean isFF() {
+ return new
Boolean(selenium.getEval("navigator.userAgent.indexOf('Firefox') >
-1"));
+ }
+
+ /**
+ * Returns the url to test page to be opened by selenium
+ *
+ * @return
+ */
+ public abstract String getTestUrl();
+
+ /**
+ * Simulates mouse event for element
+ * @param id - Element ID
+ * @param eventName - Mouse event Name
+ * @param x - X mouse position
+ * @param y - Y mouse position
+ * @return - Event
+ */
+ public String fireMouseEvent(String id, String eventName, int x, int y, boolean ctrl)
{
+ return runScript("fireMouseEvent('" + id + "','" +
eventName + "', "
+ + x + "," + y + ","+ctrl+");");
+ }
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/SeleniumTestBase.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/TestAnnotationTransformer.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/TestAnnotationTransformer.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/TestAnnotationTransformer.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,28 @@
+package org.richfaces;
+
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Method;
+
+import org.testng.internal.annotations.IAnnotationTransformer;
+import org.testng.internal.annotations.ITest;
+import org.testng.internal.annotations.TestAnnotation;
+
+/**
+ * This transformer sets necessary data provider for each test method.
+ *
+ * @author carcasser
+ */
+public class TestAnnotationTransformer implements IAnnotationTransformer {
+
+ /**
+ * @see IAnnotationTransformer#transform(ITest, Class, Constructor, Method)
+ */
+ public void transform(ITest annotation, Class testClass, Constructor testConstructor,
Method testMethod) {
+
+ if ((testClass == null || RichSeleniumTest.class.isAssignableFrom(testClass))
+ && (annotation instanceof TestAnnotation)) {
+ ((TestAnnotation) annotation).setDataProvider("templates");
+ }
+ }
+
+}
\ No newline at end of file
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/TestAnnotationTransformer.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxActionParameterTest.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxActionParameterTest.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxActionParameterTest.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,67 @@
+package org.richfaces.testng;
+
+import org.ajax4jsf.bean.A4JActionParam;
+import org.ajax4jsf.template.Template;
+import org.richfaces.SeleniumTestBase;
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+public class AjaxActionParameterTest extends SeleniumTestBase {
+
+ /**
+ * Tests ajax action parameter component
+ *
+ * @param template
+ */
+ @Test
+ public void testAjaxActionParameterComponent(Template template) {
+ renderPage(template);
+ String parentId = getParentId();
+ String parameter = null;
+
+ String paramID = parentId + "_parameter";
+ String ajaxButttonID = parentId + "_form1:ajaxSubmit";
+ String htmlButttonID = parentId + "_form2:htmlSubmit";
+
+ // test ajax submit
+ clickById(ajaxButttonID);
+ waitForAjaxCompletion();
+ parameter = getTextById(paramID);
+ checkParameter(parameter);
+
+ // test html submit
+ clickCommandAndWait(htmlButttonID);
+ parameter = getTextById(paramID);
+ checkParameter(parameter);
+ }
+
+ /**
+ * Checks action parameter
+ *
+ * @param parameter -
+ * Action Parameter value
+ */
+ private void checkParameter(String parameter) {
+ if ("".equals(parameter)) {
+ writeStatus("<a4j:actionParameter> failed. ActionListener
skipped.", true);
+ Assert.fail("<a4j:actionParameter> failed. ActionListener
skipped.");
+ } else if (parameter.equals(A4JActionParam.ERRORS.NO_PARAM)) {
+ writeStatus("<a4j:actionParameter> failed. Parameter has been not
sent with ajax request.", true);
+ Assert.fail("<a4j:actionParameter> failed. Parameter has been not
sent with ajax request.");
+ } else if (parameter.equals(A4JActionParam.ERRORS.NOT_ASSIGNED)) {
+ writeStatus("<a4j:actionParameter> failed. Parameter value has
been not assigned to bean", true);
+ Assert.fail("<a4j:actionParameter> failed. Parameter value has
been not assigned to bean");
+ } else if (parameter.equals(A4JActionParam.ERRORS.INVALID_VALUE)) {
+ writeStatus("<a4j:actionParameter> failed. Parameter value is
incorrect", true);
+ Assert.fail("<a4j:actionParameter> failed. Parameter value is
incorrect");
+ } else {
+ writeStatus("<a4j:actionParameter> passed successfully");
+ }
+ }
+
+ @Override
+ public String getTestUrl() {
+ return "pages/actionParam/actionParam.xhtml";
+ }
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxActionParameterTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxCommandButtonTest.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxCommandButtonTest.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxCommandButtonTest.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,106 @@
+package org.richfaces.testng;
+
+import org.ajax4jsf.template.Template;
+import org.richfaces.SeleniumTestBase;
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+
+public class AjaxCommandButtonTest extends SeleniumTestBase {
+
+ @Test
+ public void testAjaxCommandButtonComponent(Template template) {
+ renderPage(template);
+
+ String parentId = getParentId() + "_form:";
+
+ String buttonId = parentId + "b1";
+
+ String rerenderId = parentId + "_rerender";
+ String rerenderStr = getTextById(rerenderId);
+ boolean ajaxSingle = false;
+ boolean immediate = false;
+ writeStatus("Click button 1");
+ setValidation(true);
+ clickById(buttonId);
+ waitForAjaxCompletion();
+ waitForOnCompleteHndler();
+ checkButton(buttonId, true, ajaxSingle, immediate, true, true, true, true);
+ checkRerendering(rerenderStr, rerenderId);
+
+ buttonId = parentId + "b2";
+ ajaxSingle = false;
+ immediate = false;
+ writeStatus("Click button 2");
+ setValidation(false);
+ clickById(buttonId);
+ waitForAjaxCompletion();
+ waitForOnCompleteHndler();
+ checkButton(buttonId, false, ajaxSingle, immediate, false, false, false, false);
+
+ buttonId = parentId + "b3";
+ ajaxSingle = false;
+ immediate = true;
+ writeStatus("Click button 3");
+ setValidation(true);
+ clickById(buttonId);
+ waitForAjaxCompletion();
+ waitForOnCompleteHndler();
+ checkButton(buttonId, true, ajaxSingle, immediate, true, true, true, false);
+
+ buttonId = parentId + "b4";
+ ajaxSingle = true;
+ immediate = true;
+ writeStatus("Click button 4");
+ setValidation(false);
+ clickById(buttonId);
+ waitForAjaxCompletion();
+ waitForOnCompleteHndler();
+ checkButton(buttonId, true, ajaxSingle, immediate, true, true, true, false);
+ }
+
+ private void setValidation(boolean success) {
+ StringBuffer buffer = new StringBuffer("setValidation(");
+ buffer.append(success);
+ buffer.append(");");
+ runScript(buffer.toString());
+ }
+
+ private void waitForOnCompleteHndler () {
+ waiteForCondition("_onCompleteHandler == true;", 3000);
+ runScript("_onCompleteHandler = false;");
+ }
+
+ private void checkRerendering(String oldRerender, String rerenderId) {
+ String newRerender = getTextById(rerenderId);
+ if (oldRerender.equals(newRerender)) {
+ Assert.fail("<a4j:commandButton> failed. Rerender does not
work.");
+ }
+ }
+
+ private void checkButton(String id, boolean testData, boolean ajaxSingle, boolean
immediate, boolean testAction, boolean testActionListener, boolean testFListener, boolean
testInput) {
+ writeStatus("Checking button...");
+ StringBuffer buffer = new StringBuffer("checkButton('");
+ buffer.append(id);
+ buffer.append("',");
+ buffer.append(testData);
+ buffer.append(",");
+ buffer.append(testAction);
+ buffer.append(",");
+ buffer.append(testActionListener);
+ buffer.append(",");
+ buffer.append(testFListener);
+ buffer.append(",");
+ buffer.append(testInput);
+ buffer.append(");");
+ String result = runScript(buffer.toString());
+ if (result != null && result.length() > 0) {
+ Assert.fail("<a4j:commandButton> [ajaxSingle="+ajaxSingle+" ;
immediate="+immediate+"] test failure caused by " + result);
+ }
+ }
+
+ public String getTestUrl() {
+ return "pages/ajaxCommandButton/ajaxButtonTest.xhtml";
+ }
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxCommandButtonTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxCommandLinkTest.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxCommandLinkTest.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxCommandLinkTest.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,109 @@
+package org.richfaces.testng;
+
+import org.ajax4jsf.template.Template;
+import org.richfaces.SeleniumTestBase;
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+
+public class AjaxCommandLinkTest extends SeleniumTestBase {
+
+ @Test
+ public void testAjaxCommandLinkComponent(Template template) {
+ renderPage(template);
+
+ String parentId = getParentId() + "_form:";
+
+ String rerenderId = parentId + "_rerender";
+ String rerenderStr = getTextById(rerenderId);
+
+ String linkId = parentId + "l1";
+ boolean ajaxSingle = false;
+ boolean immediate = false;
+ writeStatus("Click link 1");
+ setValidation(true);
+ clickById(linkId);
+ waitForAjaxCompletion();
+ waitForOnCompleteHndler();
+ checkButton(linkId, true, ajaxSingle, immediate, true, true, true, true);
+ checkRerendering(rerenderStr, rerenderId);
+
+ linkId = parentId + "l2";
+ ajaxSingle = false;
+ immediate = false;
+ writeStatus("Click link 2");
+ setValidation(false);
+ clickById(linkId);
+ waitForAjaxCompletion();
+ waitForOnCompleteHndler();
+ checkButton(linkId, false, ajaxSingle, immediate, false, false, false, false);
+
+ linkId = parentId + "l3";
+ ajaxSingle = false;
+ immediate = true;
+ writeStatus("Click link 3");
+ setValidation(true);
+ clickById(linkId);
+ waitForAjaxCompletion();
+ waitForOnCompleteHndler();
+ checkButton(linkId, true, ajaxSingle, immediate, true, true, true, false);
+
+ linkId = parentId + "l4";
+ ajaxSingle = true;
+ immediate = true;
+ writeStatus("Click link 4");
+ setValidation(false);
+ clickById(linkId);
+ waitForAjaxCompletion();
+ waitForOnCompleteHndler();
+ checkButton(linkId, true, ajaxSingle, immediate, true, true, true, false);
+
+
+ }
+
+ private void setValidation(boolean success) {
+ StringBuffer buffer = new StringBuffer("setValidation(");
+ buffer.append(success);
+ buffer.append(");");
+ runScript(buffer.toString());
+ }
+
+ private void waitForOnCompleteHndler () {
+ waiteForCondition("_onCompleteHandler == true;", 3000);
+ runScript("_onCompleteHandler = false;");
+ }
+
+ private void checkRerendering(String oldRerender, String rerenderId) {
+ String newRerender = getTextById(rerenderId);
+ if (oldRerender.equals(newRerender)) {
+ Assert.fail("<a4j:commandButton> failed. Rerender does not
work.");
+ }
+ }
+
+ private void checkButton(String id, boolean testData, boolean ajaxSingle, boolean
immediate, boolean testAction, boolean testActionListener, boolean testFListener, boolean
testInput) {
+ writeStatus("Checking link...");
+ StringBuffer buffer = new StringBuffer("checkLink('");
+ buffer.append(id);
+ buffer.append("',");
+ buffer.append(testData);
+ buffer.append(",");
+ buffer.append(testAction);
+ buffer.append(",");
+ buffer.append(testActionListener);
+ buffer.append(",");
+ buffer.append(testFListener);
+ buffer.append(",");
+ buffer.append(testInput);
+ buffer.append(");");
+ String result = runScript(buffer.toString());
+ if (result != null && result.length() > 0) {
+ Assert.fail("<a4j:commandLink> [ajaxSingle="+ajaxSingle+" ;
immediate="+immediate+"] test failure caused by " + result);
+ }
+
+ }
+
+ public String getTestUrl() {
+ return "pages/ajaxCommandLink/ajaxLinkTest.xhtml";
+ }
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxCommandLinkTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxFormTest.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxFormTest.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxFormTest.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,131 @@
+package org.richfaces.testng;
+
+import org.ajax4jsf.template.Template;
+import org.richfaces.SeleniumTestBase;
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+public class AjaxFormTest extends SeleniumTestBase {
+
+ private final static String TEST_URL =
"pages/ajaxForm/ajaxFormTest.xhtml";
+
+ private final static String FORM_ID = "a4j_form";
+
+ private static final String STANDART_FORM = "staticForm";
+
+ private final static String INNER_INPUT_ID = "inner_name";
+
+ private final static String OUTER_INPUT_ID = "outer_name";
+
+ private final static String TEST_FIELD_ID = "test_field_name";
+
+ private final static String BUTTON_ID = "submit";
+
+ private final static String PREV_TEXT = "before submit";
+
+ private final static String NEXT_TEXT = "after submit";
+
+ private final static String CHECK_ID_AJAXSUBMIT = "ajaxSubmit";
+
+ private final static String CHECK_ID_IGNOREDUPRESPONSES =
"ignoreDupResponses";
+
+ private final static String CHECK_ID_PREPENDID = "prependId";
+
+ private final static String CHECK_ID_RENDERED = "rendered";
+
+ private final static String PANEL_GROUP = "content";
+
+ private final static String RERENDER_ID = "rerender";
+
+ private final static String LINK_ID = "link";
+
+ @Test
+ public void testAttrAjaxSubmit(Template template) throws Exception {
+ renderPage(template);
+
+ // clickOnCheckbox(CHECK_ID_AJAXSUBMIT, BUTTON_ID);
+ test(BUTTON_ID, INNER_INPUT_ID,
STANDART_FORM.concat(":").concat(OUTER_INPUT_ID), TEST_FIELD_ID, true, null,
+ null, null, "testAttrAjaxSubmit");
+
+ resetTestData();
+ }
+
+ @Test
+ public void testAttrPrependId(Template template) {
+ renderPage(template);
+
+ if (!PREV_TEXT.equals(getValueById(getFullComponentId(INNER_INPUT_ID,
"1")))) {
+ assertFail(null, null, true, null, "testAttrPrependId");
+ }
+
+ resetTestData();
+ }
+
+ /*
+ * @Test public void testAttrIgnoreDupResponses() { //TODO: will be
+ * implemented in future }
+ */
+
+ /*
+ * @Test public void testAttrTimeout() { //TODO: will be implemented in
+ * future }
+ */
+
+ @Test
+ public void testProcessingLinks(Template template) {
+ renderPage(template);
+
+ clickOnCheckbox(CHECK_ID_RENDERED, BUTTON_ID, "2");
+ clickById(getParentId() + LINK_ID.concat("2"));
+ waitForAjaxCompletion();
+ if (!NEXT_TEXT.equals(getTextById(getParentId() +
TEST_FIELD_ID.concat("2")))) {
+ assertFail(null, null, null, null, "testProcessingLinks");
+ }
+
+ resetTestData();
+ }
+
+ private String getFullComponentId(String componentId, String index) {
+ return getParentId() + FORM_ID + index + ":" + componentId + index;
+ }
+
+ private boolean isAjaxSubmitSuccessfull(String innerInputId, String outerInputId) {
+ String innerText = getTextById(getParentId() + innerInputId);
+ String outerText = getValueById(getParentId() + outerInputId);
+ return (NEXT_TEXT.equals(innerText) && (PREV_TEXT.equals(outerText)));
+ }
+
+ private void submitForm(String buttonId) {
+ writeStatus("Submit form");
+ clickAjaxCommandAndWait(getParentId() + buttonId);
+ }
+
+ private void test(String buttonId, String innerInputId, String outerInputId, String
testInputId,
+ Boolean ajaxSubmit, Boolean ignoreDupResponses, Integer timeout, Boolean
prependId, String testName) {
+ setValueById(getParentId() + innerInputId, NEXT_TEXT);
+ submitForm(buttonId);
+ if (!isAjaxSubmitSuccessfull(testInputId, outerInputId)) {
+ assertFail(ajaxSubmit, ignoreDupResponses, prependId, timeout, testName);
+ }
+ }
+
+ private void assertFail(Boolean ajaxSubmit, Boolean ignoreDupResponses, Boolean
prependId, Integer timeout,
+ String testName) {
+ Assert.fail("<a4j:form> [ajaxSubmit=" + ajaxSubmit + " ;
ignoreDupResponses=" + ignoreDupResponses
+ + " ; timeout=" + timeout + " ; prependId=" +
prependId + "] test '" + testName + "' failure.");
+ }
+
+ private void clickOnCheckbox(String checkId, String bottonId, String index) {
+ clickById(getParentId() + checkId + index);
+ clickById(getParentId() + bottonId +index);
+ waitForAjaxCompletion();
+ }
+
+ private void resetTestData() {
+ clickAjaxCommandAndWait(getParentId() + "_form:reset");
+ }
+
+ public String getTestUrl() {
+ return TEST_URL;
+ }
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxFormTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxHTMLCommandLinkTest.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxHTMLCommandLinkTest.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxHTMLCommandLinkTest.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,86 @@
+package org.richfaces.testng;
+
+import org.ajax4jsf.template.Template;
+import org.richfaces.SeleniumTestBase;
+import org.testng.annotations.Test;
+
+public class AjaxHTMLCommandLinkTest extends SeleniumTestBase {
+
+ private final static String IS_ACTION_INVOKED = "_form:_action";
+
+ private final static String IS_LISTENER_INVOKED = "_form:_listener";
+
+ private final static String SUBMITTED_VALUE = "_form:_submittedValue";
+
+ @Test
+ public void testAjaxHTMLCommandLinkComponent(Template template) {
+ renderPage(template);
+
+ String parentId = getParentId() + "_form:";
+ String linkId = null;
+
+ linkId = parentId + "l2";
+ writeStatus("Click link 2");
+ clickCommandAndWait(linkId);
+ assertValueSubmitted(false);
+ assertActionInvoked(false);
+ assertListenerInvoked(false);
+
+ linkId = parentId + "l3";
+ writeStatus("Click link 3");
+ clickCommandAndWait(linkId);
+ assertValueSubmitted(false);
+ assertActionInvoked(true);
+ assertListenerInvoked(true);
+
+ linkId = parentId + "l4";
+ writeStatus("Click link 4");
+ clickCommandAndWait(linkId);
+ assertValueSubmitted(false);
+ assertActionInvoked(true);
+ assertListenerInvoked(true);
+
+// linkId = parentId + "l1";
+// writeStatus("Click link 1");
+// clickCommandAndWait(linkId);
+// assertValueSubmitted(true);
+// assertActionInvoked(true);
+// assertListenerInvoked(true);
+ }
+
+ private void assertValueSubmitted(boolean submitted) {
+ if (submitted) {
+ writeStatus("Check that a new value is submitted");
+ AssertTextEquals(getParentId() + SUBMITTED_VALUE, "text", "A
new value is not submitted");
+ } else {
+ writeStatus("Check that a new value is not submitted");
+ AssertTextEquals(getParentId() + SUBMITTED_VALUE, "", "A new
value is submitted");
+ }
+ }
+
+ private void assertActionInvoked(boolean invoked) {
+ if(invoked) {
+ writeStatus("Check that action is invoked");
+ AssertTextEquals(getParentId() + IS_ACTION_INVOKED, "true",
"An action is not invoked");
+ } else {
+ writeStatus("Check that action is not invoked");
+ AssertTextEquals(getParentId() + IS_ACTION_INVOKED, "false",
"An action is invoked");
+ }
+ }
+
+ private void assertListenerInvoked(boolean invoked) {
+ if(invoked) {
+ writeStatus("Check that listener is invoked");
+ AssertTextEquals(getParentId() + IS_LISTENER_INVOKED, "true",
"A listener is not invoked");
+ } else {
+ writeStatus("Check that listener is not invoked");
+ AssertTextEquals(getParentId() + IS_LISTENER_INVOKED, "false",
"A listener is invoked");
+ }
+ }
+
+ @Override
+ public String getTestUrl() {
+ return "pages/ajaxHTMLCommandLink/ajaxHTMLLinkTest.xhtml";
+ }
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxHTMLCommandLinkTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxIncludeTest.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxIncludeTest.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxIncludeTest.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,146 @@
+/*
+ * AjaxIncludeTest.java Date created: 26.06.2008
+ * Last modified by: $Author$
+ * $Revision$ $Date$
+ */
+
+package org.richfaces.testng;
+
+import org.ajax4jsf.template.Template;
+import org.richfaces.SeleniumTestBase;
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+/**
+ * ajaxInclude component sselenium test
+ * @author Alexandr Levkovsky
+ *
+ */
+public class AjaxIncludeTest extends SeleniumTestBase {
+
+ private final static String FORM1_ID = "form1:";
+ private final static String FORM2_ID = "form2:";
+
+ private final static String INCLUDE1_ID = "include1";
+ private final static String INCLUDE2_ID = "include2";
+ private final static String INCLUDE3_ID = "include3";
+ private final static String INCLUDE4_ID = "include4";
+
+ private final static String BUTTON4_ID = "b4";
+
+ private final static String INPUT_ID = "input";
+ private final static String OUTPUT_ID = "output";
+
+ private final static String NEXT_BUTTON_ID = "next";
+ private final static String PREVIOUS_BUTTON_ID = "previous";
+
+ private final static String RESET_BUTTON_ID = "reset";
+
+ private final static String STEP1_PANEL_ID = "step1_panel";
+ private final static String STEP2_PANEL_ID = "step2_panel";
+
+ /**
+ * @see org.richfaces.SeleniumTestBase#getTestUrl()
+ */
+ @Override
+ public String getTestUrl() {
+ return "pages/ajaxInclude/ajaxIncludeTest.xhtml";
+ }
+
+ @Test
+ public void testAjaxInclude(Template template) throws Exception {
+ renderPage(template);
+ String include1Prefix = getParentId() + FORM2_ID + INCLUDE4_ID + ":";
+
+ AssertRendered(include1Prefix + STEP1_PANEL_ID);
+ AssertNotRendered(include1Prefix + STEP2_PANEL_ID);
+
+ String text = "1";
+ type(include1Prefix + INPUT_ID, text);
+ clickNext();
+
+ AssertRendered(include1Prefix + STEP2_PANEL_ID);
+ AssertNotRendered(include1Prefix + STEP1_PANEL_ID);
+ AssertTextEquals(include1Prefix + OUTPUT_ID, text);
+
+ clickPrevious();
+
+ AssertRendered(include1Prefix + STEP1_PANEL_ID);
+ AssertNotRendered(include1Prefix + STEP2_PANEL_ID);
+ AssertValueEquals(include1Prefix + INPUT_ID, text);
+
+ }
+
+ @Test
+ public void testLayoutAttribute(Template template) throws Exception {
+ renderPage(template);
+ // inlude_1 has layout=inline(default)
+ // include_2 has layout=block
+ // include_3 has layout=none
+ writeStatus("Testing layout attribute...");
+
+ String inlude1Id = getParentId() + FORM1_ID + INCLUDE1_ID;
+ String inlude2Id = getParentId() + FORM1_ID + INCLUDE2_ID;
+ String inlude3Id = getParentId() + FORM1_ID + INCLUDE3_ID;
+
+ Assert.assertTrue(isPresentById(inlude1Id));
+ Number type = selenium.getXpathCount("//*[@id='" + inlude1Id + "'
and (name()='span' or name()='SPAN')]");
+ Assert.assertTrue(type.intValue() == 1, "panel_1 has layout=inline(default) and
should be 'span' element");
+
+ Assert.assertTrue(isPresentById(inlude2Id));
+ type = selenium.getXpathCount("//*[@id='" + inlude2Id + "' and
(name()='DIV' or name()='div')]");
+ Assert.assertTrue(type.intValue() == 1, "panel_2 has layout=block and should be
'div' element");
+
+ // panel_3 has layout=none and should not present if a child component
+ // is rendered
+ Assert.assertFalse(isPresentById(inlude3Id), "panel_3 has layout=none and should
not peresent if a child component is rendered ");
+
+ // // remove child component rendering
+ // writeStatus("Click button 3");
+ // String buttonId = getParentId() + FORM1_ID + BUTTON3_ID;
+ // clickById(buttonId);
+ // waitForAjaxCompletion();
+ //
+ // // panel_3 has layout=none and should present if no child component is
+ // // rendered with id of a child component and display:none style
+ // Assert.assertTrue(isPresentById(inlude3Id + "_text"), "panel_3 has
layout=none and should peresent if no child component is rendered with id of a child
component");
+ // Assert.assertFalse(isVisibleById(inlude3Id + "_text"), "panel_3 has
layout=none and should peresent if no child component is rendered with display:none
style");
+ clickReset();
+ }
+
+ @Test
+ public void testRenderedAttribute(Template template) throws Exception {
+ renderPage(template);
+ writeStatus("Testing rendered attribute...");
+
+ String panelId = getParentId() + FORM2_ID + INCLUDE4_ID;
+
+ // panel_4 has rendered=true and should present on page
+ AssertRendered(panelId);
+
+ // change rendered attribute to false
+ writeStatus("Click button 4");
+ String buttonId = getParentId() + FORM2_ID + BUTTON4_ID;
+ clickCommandAndWait(buttonId);
+
+ // panel_4 has rendered=false and should not present on page
+ AssertNotRendered(panelId);
+ clickReset();
+ }
+
+ private void clickNext() {
+ String buttonId = getParentId() + FORM2_ID + INCLUDE4_ID + ":" +
NEXT_BUTTON_ID;
+ clickAjaxCommandAndWait(buttonId);
+ }
+
+ private void clickPrevious() {
+ String buttonId = getParentId() + FORM2_ID + INCLUDE4_ID + ":" +
PREVIOUS_BUTTON_ID;
+ clickAjaxCommandAndWait(buttonId);
+ }
+
+ private void clickReset() {
+ String buttonId = getParentId() + FORM1_ID + RESET_BUTTON_ID;
+ writeStatus("Click reset button");
+ clickCommandAndWait(buttonId);
+ }
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxIncludeTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxListenerTest.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxListenerTest.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxListenerTest.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,39 @@
+package org.richfaces.testng;
+
+import org.ajax4jsf.template.Template;
+import org.richfaces.SeleniumTestBase;
+import org.testng.annotations.Test;
+
+public class AjaxListenerTest extends SeleniumTestBase {
+
+ @Test
+ public void testAjaxListenerComponent(Template template) {
+ renderPage(template);
+
+ String parentId = getParentId() + "_form:";
+
+ String inputElemId = parentId + "input";
+ String outputElemId = parentId + "output";
+ String ajaxSubmitElemId = outputElemId;
+
+ writeStatus("Try to submit form with invalid input. In contrast to
<f:actionListener> and "
+ + "<f:valueChangeListener> ajax listener must be invoked
anyway");
+
+ clickAjaxCommandAndWait(ajaxSubmitElemId);
+ AssertTextEquals(outputElemId, "Validation failed, but ajax listener is
invoked anyway",
+ "Ajax listener must be invoked even through validation
failed");
+
+ writeStatus("Correct input and try to submit again");
+ type(inputElemId, "5");
+
+ clickAjaxCommandAndWait(ajaxSubmitElemId);
+ AssertTextEquals(outputElemId, "Ajax listener has been invoked
successfully", "Ajax listener has not been invoked");
+
+ }
+
+ @Override
+ public String getTestUrl() {
+ return "pages/ajaxListener/ajaxListenerTest.xhtml";
+ }
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxListenerTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxLoadBundleTest.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxLoadBundleTest.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxLoadBundleTest.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,49 @@
+package org.richfaces.testng;
+
+import junit.framework.Assert;
+
+import org.ajax4jsf.template.Template;
+import org.richfaces.SeleniumTestBase;
+import org.testng.annotations.Test;
+
+public class AjaxLoadBundleTest extends SeleniumTestBase {
+ private static final String URL = "pages/loadBundle/loadBundle.xhtml";
+
+ private static final String BUTTON_ID = "b1";
+
+ private static final String SAMPLE_MESSAGE = "Error was occured.";
+
+ private final static String FORM_ID = "form:";
+
+ private final static String FIRST_LINK_ID = FORM_ID + "error";
+
+ private final static String SECOND_LINK_ID = FORM_ID + "_link";
+
+ /**
+ * @see org.richfaces.SeleniumTestBase#getTestUrl()
+ */
+ @Override
+ public String getTestUrl() {
+ return URL;
+ }
+
+ @Test
+ public void testAjaxLoadBundleComponent(Template template) throws Exception {
+ renderPage(template);
+ writeStatus("Testing loadBundle component");
+ String textId = getParentId() + FIRST_LINK_ID;
+ AssertPresent(textId);
+ AssertNotPresent(getParentId() + SECOND_LINK_ID);
+ Assert.assertEquals(getTextById(textId), SAMPLE_MESSAGE);
+ }
+
+ @Test
+ public void testAjaxReRender(Template template) throws Exception {
+ renderPage(template);
+ writeStatus("Testing loadBundle component after ajax rerender");
+ String buttonId = getParentId() + FORM_ID + BUTTON_ID;
+ clickById(buttonId);
+ waitForAjaxCompletion();
+ AssertPresent(getParentId() + SECOND_LINK_ID);
+ }
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxLoadBundleTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxLogTest.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxLogTest.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxLogTest.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,68 @@
+package org.richfaces.testng;
+
+import org.ajax4jsf.template.Template;
+import org.richfaces.SeleniumTestBase;
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+public class AjaxLogTest extends SeleniumTestBase {
+
+ @Test
+ public void testAjaxLogLayout(Template template) {
+ renderPage(template);
+
+ String parentId = getParentId() + "_form:";
+
+ String inputElemId = parentId + "input";
+ String logElemId = "logConsole";
+
+ writeStatus("Type smth. All typing is being logged");
+
+ type(inputElemId, "typing");
+ waitForAjaxCompletion();
+
+ writeStatus("test that log element is present");
+ AssertRendered(logElemId);
+
+ writeStatus("test that clear button is present and has proper label");
+
+ if
(selenium.isElementPresent("//div[@id='logConsole']/button")) {
+ String clearBtnLabel =
selenium.getText("//div[@id='logConsole']/button");
+ if (null == clearBtnLabel ||
!clearBtnLabel.trim().equalsIgnoreCase("Clear")) {
+ Assert.fail("Clear button has obscure label");
+ }
+ } else {
+ Assert.fail("Clear button is not rendered");
+ }
+
+ writeStatus("at least dozen messages have to be logged");
+ int logCount =
selenium.getXpathCount("//div[(a)id='logConsole']/div").intValue();
+ if (logCount < 12) {
+ Assert.fail("There are suspiciously few log messages here");
+ }
+
+ writeStatus("check clear button");
+ selenium.click("//div[@id='logConsole']/button");
+
+ logCount =
selenium.getXpathCount("//div[(a)id='logConsole']/div").intValue();
+ if (logCount > 0) {
+ Assert.fail("log must be empty");
+ }
+
+ writeStatus("test style attribute");
+
+ //String style =
selenium.getAttribute("//div[@id='logConsole']/@style");
+ int w =
selenium.getElementWidth("//div[(a)id='logConsole']").intValue();
+ int h =
selenium.getElementHeight("//div[(a)id='logConsole']").intValue();
+
+ if (800 != w || 300 != h) {
+ Assert.fail("Style does not affect ajax log component");
+ }
+ }
+
+ @Override
+ public String getTestUrl() {
+ return "pages/ajaxLog/ajaxLogTest.xhtml";
+ }
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxLogTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxMediaOutputTest.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxMediaOutputTest.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxMediaOutputTest.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,105 @@
+/*
+ * AjaxMediaOutputTest.java Date created: 26.06.2008
+ * Last modified by: $Author$
+ * $Revision$ $Date$
+ */
+
+package org.richfaces.testng;
+
+import junit.framework.Assert;
+
+import org.ajax4jsf.template.Template;
+import org.richfaces.SeleniumTestBase;
+import org.testng.annotations.Test;
+
+/**
+ * ajaxMediaOutput component selenium test
+ * @author Alexandr Levkovsky
+ *
+ */
+public class AjaxMediaOutputTest extends SeleniumTestBase {
+
+ private final static String FORM_ID = "form:";
+ private final static String IMAGE_ID = FORM_ID + "media_data";
+ private final static String IMAGE_EVENT_ID = FORM_ID +
"media_data_event_";
+ private final static String EVENT_RESULT_ID = "_result";
+ private final static String EVENT_TEST_RESULT_FAILED_TEXT = "No";
+ private final static String EVENT_TEST_RESULT_PASSED_TEXT = "Passed";
+ /**
+ * @see org.richfaces.SeleniumTestBase#getTestUrl()
+ */
+ @Override
+ public String getTestUrl() {
+ return "pages/ajaxMediaOutput/ajaxMediaOutputTest.xhtml";
+ }
+
+ @Test
+ public void testAjaxMediaOutput(Template template) throws Exception {
+ renderPage(template);
+ writeStatus("Testing media output");
+
+ String imageId = getParentId() + IMAGE_ID;
+
+ AssertPresent(imageId);
+
+ String tagName = runScript("getElementType('" + imageId
+"');");
+ Assert.assertEquals(tagName.toLowerCase(), "img");
+ }
+
+ @Test
+ public void testOnclickEvent(Template template) throws Exception {
+ renderPage(template);
+ String imageId = getParentId() + IMAGE_EVENT_ID + 1;
+ super.testOnclickEvent(imageId, imageId + EVENT_RESULT_ID,
EVENT_TEST_RESULT_FAILED_TEXT, EVENT_TEST_RESULT_PASSED_TEXT);
+ runScript("resetEventTestResult('" + imageId + EVENT_RESULT_ID +
"');");
+ }
+
+ @Test
+ public void testOnDblclickEvent(Template template) throws Exception {
+ renderPage(template);
+ String imageId = getParentId() + IMAGE_EVENT_ID + 2;
+ super.testOnDblclickEvent(imageId, imageId + EVENT_RESULT_ID,
EVENT_TEST_RESULT_FAILED_TEXT, EVENT_TEST_RESULT_PASSED_TEXT);
+ runScript("resetEventTestResult('" + imageId + EVENT_RESULT_ID +
"');");
+ }
+
+ @Test
+ public void testOnmousedownEvent(Template template) throws Exception {
+ renderPage(template);
+ String imageId = getParentId() + IMAGE_EVENT_ID + 7;
+ super.testOnmousedownEvent(imageId, imageId + EVENT_RESULT_ID,
EVENT_TEST_RESULT_FAILED_TEXT, EVENT_TEST_RESULT_PASSED_TEXT);
+ runScript("resetEventTestResult('" + imageId + EVENT_RESULT_ID +
"');");
+ }
+
+ @Test
+ public void testOnmousemoveEvent(Template template) throws Exception {
+ renderPage(template);
+ String imageId = getParentId() + IMAGE_EVENT_ID + 8;
+ super.testOnmousemoveEvent(imageId, imageId + EVENT_RESULT_ID,
EVENT_TEST_RESULT_FAILED_TEXT, EVENT_TEST_RESULT_PASSED_TEXT);
+ runScript("resetEventTestResult('" + imageId + EVENT_RESULT_ID +
"');");
+ }
+
+ @Test
+ public void testOnmouseoutEvent(Template template) throws Exception {
+ renderPage(template);
+ String imageId = getParentId() + IMAGE_EVENT_ID + 9;
+ super.testOnmouseoutEvent(imageId, imageId + EVENT_RESULT_ID,
EVENT_TEST_RESULT_FAILED_TEXT, EVENT_TEST_RESULT_PASSED_TEXT);
+ runScript("resetEventTestResult('" + imageId + EVENT_RESULT_ID +
"');");
+ }
+
+ @Test
+ public void testOnmouseoverEvent(Template template) throws Exception {
+ renderPage(template);
+ String imageId = getParentId() + IMAGE_EVENT_ID + 10;
+ super.testOnmouseoverEvent(imageId, imageId + EVENT_RESULT_ID,
EVENT_TEST_RESULT_FAILED_TEXT, EVENT_TEST_RESULT_PASSED_TEXT);
+ runScript("resetEventTestResult('" + imageId + EVENT_RESULT_ID +
"');");
+ }
+
+ @Test
+ public void testOnmouseupEvent(Template template) throws Exception {
+ renderPage(template);
+ String imageId = getParentId() + IMAGE_EVENT_ID + 11;
+ super.testOnmouseupEvent(imageId, imageId + EVENT_RESULT_ID,
EVENT_TEST_RESULT_FAILED_TEXT, EVENT_TEST_RESULT_PASSED_TEXT);
+ runScript("resetEventTestResult('" + imageId + EVENT_RESULT_ID +
"');");
+ }
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxMediaOutputTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxOutputPanelTest.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxOutputPanelTest.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxOutputPanelTest.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,293 @@
+/*
+ * AjaxOutputPanel.java Date created: 10.06.2008
+ * Last modified by: $Author$
+ * $Revision$ $Date$
+ */
+
+package org.richfaces.testng;
+
+import org.ajax4jsf.template.Template;
+import org.richfaces.SeleniumTestBase;
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+/**
+ * Ajax Output Panel selenium test
+ *
+ * @author Alexandr Levkovsky
+ *
+ */
+public class AjaxOutputPanelTest extends SeleniumTestBase {
+
+ private final static String FORM_ID = "form:";
+
+ private final static String PANEL1_ID = "panel_1";
+
+ private final static String PANEL2_ID = "panel_2";
+
+ private final static String PANEL3_ID = "panel_3";
+
+ private final static String PANEL4_ID = "panel_4";
+
+ private final static String BUTTON1_ID = "b1";
+
+ private final static String BUTTON2_ID = "b2";
+
+ private final static String BUTTON3_ID = "b3";
+
+ private final static String BUTTON4_ID = "b4";
+
+ private final static String RESET_BUTTON_ID = "reset";
+
+ private final static String TEXT_SUFFIX = "_text";
+
+ private final static String RESULT_SUFFIX = "_result";
+
+ public String getTestUrl() {
+ return "pages/ajaxOutputPanel/ajaxOutputPanelTest.xhtml";
+ }
+
+ @Test
+ public void testLayoutAttribute(Template template) throws Exception {
+ renderPage(template);
+ // panel_1 has layout=inline(default)
+ // panel_2 has layout=block
+ // panel_3 has layout=none
+ writeStatus("Testing layout attribute...");
+
+ String panelId = getParentId() + FORM_ID + PANEL1_ID;
+ String panel2Id = getParentId() + FORM_ID + PANEL2_ID;
+ String panel3Id = getParentId() + FORM_ID + PANEL3_ID;
+
+ Assert.assertTrue(isPresentById(panelId));
+ Number type = selenium.getXpathCount("//*[@id='" + panelId + "'
and (name()='span' or name()='SPAN')]");
+ Assert.assertTrue(type.intValue() == 1, "panel_1 has layout=inline(default) and
should be 'span' element");
+
+ Assert.assertTrue(isPresentById(panel2Id));
+ type = selenium.getXpathCount("//*[@id='" + panel2Id + "' and
(name()='DIV' or name()='div')]");
+ Assert.assertTrue(type.intValue() == 1, "panel_2 has layout=block and should be
'div' element");
+
+ // panel_3 has layout=none and should not present if a child component
+ // is rendered
+ Assert.assertFalse(isPresentById(panel3Id), "panel_3 has layout=none and should not
peresent if a child component is rendered ");
+
+ // remove child component rendering
+ writeStatus("Click button 3");
+ String buttonId = getParentId() + FORM_ID + BUTTON3_ID;
+ clickById(buttonId);
+ waitForAjaxCompletion();
+
+ // panel_3 has layout=none and should present if no child component is
+ // rendered with id of a child component and display:none style
+ Assert.assertTrue(isPresentById(panel3Id + "_text"), "panel_3 has
layout=none and should peresent if no child component is rendered with id of a child
component");
+ Assert.assertFalse(isVisibleById(panel3Id + "_text"), "panel_3 has
layout=none and should peresent if no child component is rendered with display:none
style");
+ clickReset();
+ }
+
+ @Test
+ public void testRenderedAttribute(Template template) throws Exception {
+ renderPage(template);
+ writeStatus("Testing rendered attribute...");
+
+ String panelId = getParentId() + FORM_ID + PANEL4_ID;
+
+ // panel_4 has rendered=true and should present on page
+ AssertRendered(panelId);
+
+ // change rendered attribute to false
+ writeStatus("Click button 4");
+ String buttonId = getParentId() + FORM_ID + BUTTON4_ID;
+ clickCommandAndWait(buttonId);
+
+ // panel_4 has rendered=false and should not present on page
+ AssertNotRendered(panelId);
+ clickReset();
+ }
+
+ @Test
+ public void testAjaxRenderedAttribute(Template template) throws Exception {
+ renderPage(template);
+ // panel_1 has ajaxRendered=false and is reRender by b1
+ // panel_2 has ajaxRendered=true
+ writeStatus("Testing ajaxRendered attribute...");
+
+ String parentId = getParentId() + FORM_ID;
+ String panelId = parentId + PANEL1_ID + TEXT_SUFFIX;
+ String panelId2 = parentId + PANEL2_ID + TEXT_SUFFIX;
+ String buttonId = parentId + BUTTON2_ID;
+ writeStatus("Click button 2");
+ // set panel_1 text visible flag to false
+ clickById(buttonId);
+ waitForAjaxCompletion();
+ // panel_1 text should be visible as it reRendered only by b1
+ Assert.assertTrue(isPresentById(panelId), "panel_1 text should be visible as it
reRendered only by b1");
+
+ // panel_2 text should not be visible as it has ajaxRendered=true
+ Assert.assertFalse(isPresentById(panelId2), "panel_2 text should not be visible as
it has ajaxRendered=true");
+
+ buttonId = parentId + BUTTON1_ID;
+ writeStatus("Click button 1");
+ clickById(buttonId);
+ waitForAjaxCompletion();
+ // panel text should NOT be visible as it reRendered by b1
+ Assert.assertFalse(isPresentById(panelId), "panel_1 text should not be visible as
it reRendered by b1");
+ clickReset();
+
+ }
+
+ @Test
+ public void testAjaxRenderedAttributeWithLimitToList(Template template) throws
Exception {
+ renderPage(template);
+ // panel_1 has ajaxRendered=false and is reRender by b1 with
+ // limitToList=true
+ // panel_2 has ajaxRendered=true
+ writeStatus("Testing ajaxRendered attribute with limitToList=true...");
+
+ String parentId = getParentId() + FORM_ID;
+ String panelId2 = parentId + PANEL2_ID + TEXT_SUFFIX;
+ String buttonId = parentId + BUTTON1_ID;
+ String button2Id = parentId + BUTTON2_ID;
+
+ Assert.assertTrue(isPresentById(panelId2));
+ writeStatus("Click button 1");
+ // set panel_2 text visible flag to false
+ clickById(buttonId);
+ waitForAjaxCompletion();
+ // panel_2 text should be visible as b1 has limitToList=true and
+ // rerender only panel_1
+ Assert.assertTrue(isPresentById(panelId2), "panel_2 text should be visible as b1
has limitToList=true and rerender only panel_1");
+ writeStatus("Click button 2");
+ clickById(button2Id);
+ waitForAjaxCompletion();
+ // panel_2 text should not be visible as it has ajaxRendered=true and b2
+ // has limitToList=false
+ Assert.assertFalse(isPresentById(panelId2), "panel_2 text should not be visible as
it has ajaxRendered=true and b2 has limitToList=false");
+ clickReset();
+ }
+
+ @Test
+ public void testOnDoubleClickEvent(Template template) throws Exception {
+ renderPage(template);
+ String parentId = getParentId() + FORM_ID;
+ String panelId = parentId + "panel_5";
+ String panelResultId = panelId + RESULT_SUFFIX;
+ writeStatus("Check ondoubleclick event");
+ AssertTextEquals(panelResultId, "No");
+ selenium.doubleClick(panelId);
+ AssertTextEquals(panelResultId, "Yes");
+ }
+
+ @Test
+ public void testOnKeyDownEvent(Template template) throws Exception {
+ renderPage(template);
+ String parentId = getParentId() + FORM_ID;
+ String panelId = parentId + "panel_6";
+ String panelResultId = panelId + RESULT_SUFFIX;
+ writeStatus("Check onkeydown event");
+ AssertTextEquals(panelResultId, "No");
+ selenium.keyDown(panelId, "1");
+ AssertTextEquals(panelResultId, "Yes");
+ }
+
+ @Test
+ public void testOnKeyPressEvent(Template template) throws Exception {
+ renderPage(template);
+ String parentId = getParentId() + FORM_ID;
+ String panelId = parentId + "panel_7";
+ String panelResultId = panelId + RESULT_SUFFIX;
+ writeStatus("Check onkeypress event");
+ AssertTextEquals(panelResultId, "No");
+ selenium.keyPress(panelId, "1");
+ AssertTextEquals(panelResultId, "Yes");
+ }
+
+ @Test
+ public void testOnKeyUpEvent(Template template) throws Exception {
+ renderPage(template);
+ String parentId = getParentId() + FORM_ID;
+ String panelId = parentId + "panel_8";
+ String panelResultId = panelId + RESULT_SUFFIX;
+ writeStatus("Check onkeyup event");
+ AssertTextEquals(panelResultId, "No");
+ selenium.keyUp(panelId, "1");
+ AssertTextEquals(panelResultId, "Yes");
+ }
+
+ @Test
+ public void testOnMouseDownEvent(Template template) throws Exception {
+ renderPage(template);
+ String parentId = getParentId() + FORM_ID;
+ String panelId = parentId + "panel_9";
+ String panelResultId = panelId + RESULT_SUFFIX;
+ writeStatus("Check onmousedown event");
+ AssertTextEquals(panelResultId, "No");
+ selenium.mouseDown(panelId);
+ AssertTextEquals(panelResultId, "Yes");
+ }
+
+ @Test
+ public void testOnMouseMoveEvent(Template template) throws Exception {
+ renderPage(template);
+ String parentId = getParentId() + FORM_ID;
+ String panelId = parentId + "panel_10";
+ String panelResultId = panelId + RESULT_SUFFIX;
+ writeStatus("Check onmousemove event");
+ AssertTextEquals(panelResultId, "No");
+ selenium.mouseMove(panelId);
+ AssertTextEquals(panelResultId, "Yes");
+ }
+
+ @Test
+ public void testOnMouseOutEvent(Template template) throws Exception {
+ renderPage(template);
+ String parentId = getParentId() + FORM_ID;
+ String panelId = parentId + "panel_11";
+ String panelResultId = panelId + RESULT_SUFFIX;
+ writeStatus("Check onmouseout event");
+ AssertTextEquals(panelResultId, "No");
+ selenium.mouseOut(panelId);
+ AssertTextEquals(panelResultId, "Yes");
+ }
+
+ @Test
+ public void testOnMouseOverEvent(Template template) throws Exception {
+ renderPage(template);
+ String parentId = getParentId() + FORM_ID;
+ String panelId = parentId + "panel_12";
+ String panelResultId = panelId + RESULT_SUFFIX;
+ writeStatus("Check onmouseover event");
+ AssertTextEquals(panelResultId, "No");
+ selenium.mouseOver(panelId);
+ AssertTextEquals(panelResultId, "Yes");
+ }
+
+ @Test
+ public void testOnMouseUpEvent(Template template) throws Exception {
+ renderPage(template);
+ String parentId = getParentId() + FORM_ID;
+ String panelId = parentId + "panel_13";
+ String panelResultId = panelId + RESULT_SUFFIX;
+ writeStatus("Check onmouseup event");
+ AssertTextEquals(panelResultId, "No");
+ selenium.mouseUp(panelId);
+ AssertTextEquals(panelResultId, "Yes");
+ }
+
+ @Test
+ public void testOnClickEvent(Template template) throws Exception {
+ renderPage(template);
+ String parentId = getParentId() + FORM_ID;
+ String panelId = parentId + "panel_14";
+ String panelResultId = panelId + RESULT_SUFFIX;
+ writeStatus("Check onclick event");
+ AssertTextEquals(panelResultId, "No");
+ selenium.click(panelId);
+ AssertTextEquals(panelResultId, "Yes");
+ }
+
+ private void clickReset() {
+ String buttonId = getParentId() + FORM_ID + RESET_BUTTON_ID;
+ writeStatus("Click reset button");
+ clickCommandAndWait(buttonId);
+ }
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxOutputPanelTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxPollTest.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxPollTest.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxPollTest.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,62 @@
+/**
+ *
+ */
+package org.richfaces.testng;
+
+import org.ajax4jsf.template.Template;
+import org.richfaces.SeleniumTestBase;
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+/**
+ * @author Andrey Markavstov
+ *
+ */
+public class AjaxPollTest extends SeleniumTestBase {
+
+ @Test
+ public void testAjaxPollComponent(Template template) {
+ renderPage(template);
+ String parentId = getParentId() + "_form:";
+ String pollId = parentId + "poll";
+ String inputId = parentId + "_value";
+
+ enablePoll(parentId + "_enabled");
+ AssertValueEquals(inputId, "1");
+
+ writeStatus("Polling in progress...");
+ pause(1500, pollId);
+ AssertValueNotEquals(inputId, "1",
+ "Polling does not fire after component was enabled. Or
'ReRender' attribute does not work");
+
+ waiteForCondition("document.getElementById('" + inputId +
"').value == 8", 7000);
+
+ pause(1500, pollId);
+ writeStatus("Polling should be stopped...");
+
+ AssertValueEquals(inputId, "8", "Polling should be stopped. It
continues to poll after component was disabled.");
+ AssertTextEquals(parentId + "_text", "Polling",
+ "Polling terminated abnormal or invalid count of ajax requests has
been submitted");
+
+ }
+
+ private void enablePoll(String id) {
+ writeStatus("Enable polling...");
+ try {
+ clickById(id);
+ waitForAjaxCompletion();
+ } catch (Exception e) {
+ Assert.fail("Poll component failed after attempt to enable polling.
Caused by " + e);
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.ajax4jsf.test.base.RichSeleniumTest#getTestUrl()
+ */
+ public String getTestUrl() {
+ return "pages/ajaxPoll/ajaxPollTest.xhtml";
+ }
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxPollTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxPushTest.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxPushTest.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxPushTest.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,83 @@
+package org.richfaces.testng;
+
+import org.ajax4jsf.template.Template;
+import org.richfaces.SeleniumTestBase;
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+public class AjaxPushTest extends SeleniumTestBase {
+
+ @Test
+ public void testAjaxPushComponent(Template template) throws Exception {
+ renderPage(template);
+
+ String parentId = getParentId() + "_form:";
+
+ String startBtnID = parentId + "startButton";
+ String stopBtnID = parentId + "stopButton";
+
+ String startPanelID = parentId + "startPanel";
+ String progressPanelID = parentId + "progressPanel";
+
+ writeStatus("Check layout before start pushing");
+
+ AssertRendered(startBtnID);
+ AssertRendered(startPanelID);
+
+ AssertNotRendered(stopBtnID);
+ AssertNotRendered(progressPanelID);
+
+ writeStatus("Start push component. Test bean has to start sending events to
registered PushEventListener");
+
+ clickAjaxCommandAndWait(startBtnID);
+
+ writeStatus("Check layout after pushing started");
+
+ AssertNotRendered(startBtnID);
+ AssertNotRendered(startPanelID);
+
+ AssertRendered(stopBtnID);
+ AssertRendered(progressPanelID);
+
+ writeStatus("check whether push events are being fired");
+
+ int eventBefore = getEventsCount();
+
+ delay(3000);
+
+ int eventAfter = getEventsCount();
+
+ if(eventBefore >= eventAfter) {
+ Assert.fail("PushEvents are not fired");
+ }
+
+ writeStatus("stop pushing");
+
+ clickAjaxCommandAndWait(stopBtnID);
+
+ writeStatus("Check layout after pushing stopped");
+
+ AssertRendered(startBtnID);
+ AssertRendered(startPanelID);
+
+ AssertNotRendered(stopBtnID);
+ AssertNotRendered(progressPanelID);
+
+ }
+
+ private int getEventsCount() throws Exception {
+ String events = getTextById(getParentId() + "_form:events");
+ try {
+ return Integer.parseInt(events);
+ } catch (Exception e) {
+ Assert.fail("Quantity of sent events is not numeric :" +
e.getMessage());
+ throw new Exception(e);
+ }
+ }
+
+ @Override
+ public String getTestUrl() {
+ return "pages/ajaxPush/ajaxPushTest.xhtml";
+ }
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxPushTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxRegionTest.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxRegionTest.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxRegionTest.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,68 @@
+package org.richfaces.testng;
+
+import org.ajax4jsf.template.Template;
+import org.richfaces.SeleniumTestBase;
+import org.testng.annotations.Test;
+
+public class AjaxRegionTest extends SeleniumTestBase {
+
+ @Test
+ public void testAjaxRegionComponent(Template template) {
+ renderPage(template);
+
+ String parentId = getParentId() + "_form:";
+
+ writeStatus("check nested regions");
+
+ String externalLink = parentId + "externalLink";
+ String internalLink = parentId + "internalLink";
+
+ String internalElemId = parentId + "internal";
+ String externalElemId = parentId + "external";
+
+ type(internalElemId, "5");
+ type(externalElemId, "5");
+
+ clickAjaxCommandAndWait(internalLink);
+ AssertValueEquals(internalElemId, "5");
+ AssertValueEquals(externalElemId, "0");
+
+ type(internalElemId, "10");
+ type(externalElemId, "10");
+
+ clickAjaxCommandAndWait(externalLink);
+ AssertValueEquals(internalElemId, "10");
+ AssertValueEquals(externalElemId, "10");
+
+ writeStatus("verify \"selfRendered\" component's
attribute");
+
+ String selfRenderedLink = parentId + "selfRenderedLink";
+ clickAjaxCommandAndWait(selfRenderedLink);
+ AssertNotPresent("transientText");
+
+ writeStatus("verify \"renderRegionOnly\" component's
attribute");
+
+ String renderOnlyLink = parentId + "renderOnlyLink";
+ String renderLink = parentId + "renderLink";
+
+ String renderOnlyElemId = parentId + "renderOnly";
+ String renderElemId = parentId + "render";
+
+ type(renderOnlyElemId, "7");
+
+ clickAjaxCommandAndWait(renderOnlyLink);
+ AssertValueEquals(renderOnlyElemId, "7");
+ AssertValueEquals(renderElemId, "0");
+
+ type(renderElemId, "11");
+ clickAjaxCommandAndWait(renderLink);
+
+ AssertValueEquals(renderOnlyElemId, "11");
+ AssertValueEquals(renderElemId, "11");
+ }
+
+ public String getTestUrl() {
+ return "pages/ajaxRegion/ajaxRegionTest.xhtml";
+ }
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxRegionTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
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
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxRepeatTest.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,279 @@
+/*
+ * AjaxRepeatTest.java Date created: 19.06.2008
+ * Last modified by: $Author$
+ * $Revision$ $Date$
+ */
+
+package org.richfaces.testng;
+
+import org.ajax4jsf.template.Template;
+import org.richfaces.SeleniumTestBase;
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+/**
+ * a4j:repeat component selenium test
+ *
+ * @author Alexandr Levkovsky
+ *
+ */
+public class AjaxRepeatTest extends SeleniumTestBase {
+
+ private final static Integer DEFAULT_ROWS_COUNT = 5;
+
+ private final static String FORM1_ID = "form1:";
+
+ private final static String FORM2_ID = "form2:";
+
+ private final static String FIRST_INPUT_ID = "first_input";
+
+ private final static String ROWS_INPUT_ID = "rows_input";
+
+ private final static String RESET_BUTTON_ID = "reset";
+
+ private final static String ROWS_COUNT_INPUT_ID = "rows_count_input";
+
+ private final static String TABLE_ID = "repeat_table";
+
+ private final static String REPEAT_ID = "repeat";
+
+ private final static String INPUT_ID = "input";
+
+ private final static String OUTPUT_ID = "output";
+
+ private final static String APPLY_BUTTON_ID = "apply";
+
+ private final static String RENDERED_CHECKBOX_ID = "rendered_checkbox";
+
+ private final static String LINK_ID = "link";
+
+ private final static String BUTTON_ID = "button";
+
+ private final static String RERENDERED_COUNTER_ID =
"rerendered_change_counter";
+
+ private final static String NOT_RERENDERED_COUNTER_ID =
"not_rerendered_change_counter";
+
+ private final static String INPUT_VALUE_OUTPUT_ID = "input_output";
+
+ @Override
+ public String getTestUrl() {
+ return "pages/ajaxRepeat/ajaxRepeatTest.xhtml";
+ }
+
+ @Test
+ public void testRerenderingRowsWithAjaxKeysAttribute(Template template) throws
Exception {
+ renderPage(template);
+ writeStatus("Testing rerendering rows with ajaxKeys attribute...");
+ // link action update counter fields in all rows but add only current
+ // row number to ajaxKeys so only current row counter should be
+ // rerendered
+ clickReset();
+ AssertRendered(TABLE_ID);
+ assertRowsCount(DEFAULT_ROWS_COUNT, TABLE_ID);
+
+ for (int i = 0; i < DEFAULT_ROWS_COUNT; i++) {
+ for (int j = 0; j < DEFAULT_ROWS_COUNT; j++) {
+ if (j < i) {
+ assertOutputText(j, RERENDERED_COUNTER_ID, new Integer(j + 1).toString());
+ } else {
+ assertOutputText(j, RERENDERED_COUNTER_ID, "0");
+ }
+ assertOutputText(j, NOT_RERENDERED_COUNTER_ID, "0");
+ }
+
+ writeStatus("click link " + i);
+ String linkId = getFullTableElementId(i, LINK_ID);
+ clickAjaxCommandAndWait(linkId);
+
+ for (int j = 0; j < DEFAULT_ROWS_COUNT; j++) {
+ if (j < i) {
+ assertOutputText(j, RERENDERED_COUNTER_ID, new Integer(j + 1).toString());
+ } else if (j == i) {
+ assertOutputText(j, RERENDERED_COUNTER_ID, new Integer(j + 1).toString());
+ } else {
+ assertOutputText(j, RERENDERED_COUNTER_ID, "0");
+ }
+ assertOutputText(i, NOT_RERENDERED_COUNTER_ID, "0");
+ }
+ }
+ }
+
+ @Test
+ public void testRerenderingRowsWithoutAjaxKeysAttribute(Template template) throws
Exception {
+ renderPage(template);
+ writeStatus("Testing rerendering rows without ajaxKeys attribute...");
+ // button action update counter fields in all rows and sets ajaxKeys to
+ // null so counters in all rows should be rerendered.
+ clickReset();
+ AssertRendered(TABLE_ID);
+ assertRowsCount(DEFAULT_ROWS_COUNT, TABLE_ID);
+
+ for (int i = 0; i < DEFAULT_ROWS_COUNT; i++) {
+ for (int j = 0; j < DEFAULT_ROWS_COUNT; j++) {
+ assertOutputText(j, RERENDERED_COUNTER_ID, new Integer(i).toString());
+ assertOutputText(j, NOT_RERENDERED_COUNTER_ID, "0");
+ }
+
+ writeStatus("click button " + i);
+ String buttonId = getFullTableElementId(i, BUTTON_ID);
+ clickAjaxCommandAndWait(buttonId);
+
+ for (int j = 0; j < DEFAULT_ROWS_COUNT; j++) {
+ assertOutputText(j, RERENDERED_COUNTER_ID, new Integer(i + 1).toString());
+ assertOutputText(j, NOT_RERENDERED_COUNTER_ID, "0");
+ }
+ }
+ }
+
+ @Test
+ public void testRerenderingRowsWithValidation(Template template) throws Exception {
+ renderPage(template);
+ writeStatus("Testing rerendering rows with validation...");
+ clickReset();
+ AssertRendered(TABLE_ID);
+ assertRowsCount(DEFAULT_ROWS_COUNT, TABLE_ID);
+
+ for (Integer i = 0; i < DEFAULT_ROWS_COUNT; i++) {
+ assertInputValue(i, INPUT_ID, i.toString());
+ assertOutputText(i, INPUT_VALUE_OUTPUT_ID, i.toString());
+ assertOutputText(i, RERENDERED_COUNTER_ID, "0");
+
+ writeStatus("set not valid value for row " + i + " input...");
+ type(getFullTableElementId(i, INPUT_ID), "200");
+ writeStatus("click link " + i);
+ String linkId = getFullTableElementId(i, LINK_ID);
+ clickAjaxCommandAndWait(linkId);
+
+ assertInputValue(i, INPUT_ID, "200");
+ assertOutputText(i, INPUT_VALUE_OUTPUT_ID, i.toString());
+ assertOutputText(i, RERENDERED_COUNTER_ID, "0");
+
+ writeStatus("set valid value for row " + i + " input...");
+ type(getFullTableElementId(i, INPUT_ID), "99");
+ writeStatus("click link " + i);
+ clickAjaxCommandAndWait(linkId);
+
+ assertInputValue(i, INPUT_ID, "99");
+ assertOutputText(i, INPUT_VALUE_OUTPUT_ID, "99");
+ assertOutputText(i, RERENDERED_COUNTER_ID, new Integer(i + 1).toString());
+ }
+ }
+
+ @Test
+ public void testRenderedAttribute(Template template) throws Exception {
+ renderPage(template);
+ writeStatus("Testing rendered attribute...");
+ clickReset();
+ AssertRendered(TABLE_ID);
+ // repeat has rendered=true and should present on page as table with
+ // default 5 rows
+ assertRowsCount(5, TABLE_ID);
+
+ writeStatus("change rendered attribute to false");
+ // change rendered attribute to false
+ String checkboxId = getParentId() + FORM1_ID + RENDERED_CHECKBOX_ID;
+ selenium.click(checkboxId);
+ writeStatus("Click apply");
+ clickApply();
+
+ // repeat now has rendered=false and should not present on page as table
+ // with default 0 rows
+ assertRowsCount(0, TABLE_ID);
+ }
+
+ @Test
+ public void testFirstAttribute(Template template) throws Exception {
+ renderPage(template);
+ writeStatus("Testing first attribute...");
+ clickReset();
+ AssertRendered(TABLE_ID);
+ // repeat has rendered=true and should present on page as table with
+ // default 5 rows
+ assertRowsCount(5, TABLE_ID);
+ // first row default value 0
+ String fullInput0Id = getParentId() + FORM2_ID + REPEAT_ID + ":" + 0 +
":" + OUTPUT_ID;
+ String fullInput1Id = getParentId() + FORM2_ID + REPEAT_ID + ":" + 1 +
":" + OUTPUT_ID;
+ AssertPresent(fullInput0Id);
+ AssertPresent(fullInput1Id);
+ writeStatus("change first attribute to 1");
+
+ String inputId = getParentId() + FORM1_ID + FIRST_INPUT_ID;
+ type(inputId, "1");
+ writeStatus("Click apply");
+ clickApply();
+
+ // now first row value should be 1
+ AssertNotPresent(fullInput0Id);
+ AssertPresent(fullInput1Id);
+ }
+
+ @Test
+ public void testRowsAttribute(Template template) throws Exception {
+ renderPage(template);
+ writeStatus("Testing rows attribute...");
+ clickReset();
+ AssertRendered(TABLE_ID);
+ // repeat has rows=0 and table with all default 5 rows should present on
+ // page
+ assertRowsCount(5, TABLE_ID);
+
+ writeStatus("change rendered attribute to false");
+ // change rows attribute to 3
+ String inputId = getParentId() + FORM1_ID + ROWS_INPUT_ID;
+ type(inputId, "3");
+ writeStatus("Click apply");
+ clickApply();
+
+ // repeat now has rendered=false and should not present on page as table
+ // with default 0 rows
+ assertRowsCount(3, TABLE_ID);
+ // last row should have value 2
+ assertInputValue(2, INPUT_ID, "2");
+ }
+
+ @Test
+ public void testRowKeyVarAttribute(Template template) throws Exception {
+ renderPage(template);
+ writeStatus("Testing rowKeyVar attribute...");
+ clickReset();
+ AssertRendered(TABLE_ID);
+ String inputId = getParentId() + FORM1_ID + ROWS_COUNT_INPUT_ID;
+ Integer rowsCount = new Integer(getValueById(inputId));
+ // repeat has rows=0 and table with all default 5 rows should present on
+ // page
+ assertRowsCount(rowsCount, TABLE_ID);
+
+ // output text has value="#{rowKey % 2 == 0 ? '0' : '1'}"
+ for (int i = 0; i < rowsCount; i++) {
+ assertOutputText(i, OUTPUT_ID, i % 2 == 0 ? "0" : "1");
+ }
+ }
+
+ private void clickReset() {
+ String buttonId = getParentId() + FORM2_ID + RESET_BUTTON_ID;
+ writeStatus("Click reset button");
+ clickCommandAndWait(buttonId);
+ }
+
+ private void clickApply() {
+ String buttonId = getParentId() + FORM1_ID + APPLY_BUTTON_ID;
+ clickCommandAndWait(buttonId);
+ }
+
+ private void assertInputValue(int row, String inputId, String value) {
+ String fullInputId = getFullTableElementId(row, inputId);
+ String elementValue = getValueById(fullInputId);
+ Assert.assertEquals(elementValue, value);
+ }
+
+ private void assertOutputText(int row, String outputId, String value) {
+ String fullInputId = getFullTableElementId(row, outputId);
+ String elementValue = getTextById(fullInputId);
+ Assert.assertEquals(elementValue, value);
+ }
+
+ private String getFullTableElementId(int row, String elementId) {
+ return getParentId() + FORM2_ID + REPEAT_ID + ":" + row + ":" +
elementId;
+ }
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxRepeatTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxStatusTest.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxStatusTest.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxStatusTest.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,60 @@
+package org.richfaces.testng;
+
+import org.ajax4jsf.template.Template;
+import org.richfaces.SeleniumTestBase;
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+public class AjaxStatusTest extends SeleniumTestBase {
+
+ @Test
+ public void testAjaxStatusComponent(Template template) {
+ renderPage(template);
+
+ String parentId = getParentId() + "_form:";
+ String btn1 = parentId + "button1";
+ clickById(btn1);
+
+ String reg1Status = parentId + "region1:status";
+
+ writeStatus("Ajax request is in progress");
+
+ AssertVisible(reg1Status + ".start");
+ AssertNotVisible(reg1Status + ".stop");
+ String start = getTextById(reg1Status + ".start");
+ Assert.assertTrue(start.startsWith("In progress..."));
+ pause(3000, reg1Status);
+
+ writeStatus("Ajax request completed");
+
+ AssertNotVisible(reg1Status + ".start");
+ AssertVisible(reg1Status + ".stop");
+ String stop = getTextById(reg1Status + ".stop");
+ Assert.assertTrue(stop.startsWith("Complete"));
+
+ String btn2 = parentId + "button2";
+ clickById(btn2);
+
+ String reg2Status = parentId + "region2:status";
+
+ writeStatus("Ajax request is in progress");
+
+ AssertVisible(reg2Status + ".start");
+ AssertNotVisible(reg2Status + ".stop");
+ start = getTextById(reg2Status + ".start");
+ Assert.assertTrue(start.startsWith("In progress..."));
+ pause(3000, reg2Status);
+
+ writeStatus("Ajax request completed");
+
+ AssertNotVisible(reg2Status + ".start");
+ AssertVisible(reg2Status + ".stop");
+ stop = getTextById(reg1Status + ".stop");
+ Assert.assertTrue(stop.startsWith("Complete"));
+
+ }
+
+ public String getTestUrl() {
+ return "pages/ajaxStatus/ajaxStatusTest.xhtml";
+ }
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxStatusTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxSupportTest.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxSupportTest.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxSupportTest.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,77 @@
+/**
+ *
+ */
+package org.richfaces.testng;
+
+import org.ajax4jsf.bean.A4JSupport;
+import org.ajax4jsf.template.Template;
+import org.richfaces.SeleniumTestBase;
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+/**
+ * @author Andrey Markavstov
+ *
+ */
+public class AjaxSupportTest extends SeleniumTestBase {
+
+ @Test
+ public void testAjaxSupportComponent(Template template) {
+ renderPage(template);
+ String parentId = getParentId() + "_form:";
+
+ String dataId = parentId + "data";
+ String linkId = parentId + "link";
+ String checkBoxId = parentId + "checkbox";
+ String command = parentId + "command";
+
+ clickById(linkId);
+ waitForAjaxCompletion();
+ String data = getTextById(dataId);
+ checkMessage(data, A4JSupport.Messages.FOR_LINK, "'onclick' ajax
support for link[id='_form:link'] failed.",
+ A4JSupport.Messages.FOR_LINK + " successful");
+
+ clickById(checkBoxId);
+ waitForAjaxCompletion();
+ data = getTextById(dataId);
+ checkMessage(data, A4JSupport.Messages.FOR_CHECKBOX,
+ "'onchange' ajax support for
checkbox[id='_form:checkbox'] failed.", A4JSupport.Messages.FOR_CHECKBOX
+ + " successful");
+
+ clickById(command);
+ pause(1000, command);
+ if (!data.equals(getTextById(dataId))) {
+ writeStatus("<a4j:support failed. 'requestDelay' attribute
does not work.");
+ Assert.fail("<a4j:support failed. 'requestDelay' attribute
does not work.");
+ }
+ waitForAjaxCompletion();
+ data = getTextById(dataId);
+ checkMessage(data, A4JSupport.Messages.FOR_COMMAND,
+ "'onclick' ajax support for command
link[id='_form:command'] failed.", A4JSupport.Messages.FOR_COMMAND
+ + " successful");
+
+ if (A4JSupport.Messages.FOR_SUBMIT.equals(data)) {
+ writeStatus("<a4j:support failed. 'disableDefault' attribute
does not work");
+ Assert.fail("<a4j:support failed. 'disableDefault' attribute
does not work.");
+ }
+
+ }
+
+ private void checkMessage(String data, String message, String errorMessage, String
okMessage) {
+ if (message.equals(data)) {
+ writeStatus(okMessage);
+ } else if (A4JSupport.Messages.NO_DATA.equals(data)) {
+ writeStatus(errorMessage + " Caused by: action listener for
<a4j:support> skipped", true);
+ Assert.fail(errorMessage + " Caused by: action listener for
<a4j:support> skipped");
+ } else if ("".equals(data)) {
+ writeStatus(errorMessage + "Caused by: no ajax request has been
sent.", true);
+ Assert.fail(errorMessage + "Caused by: no ajax request has been
sent.");
+ }
+ }
+
+ @Override
+ public String getTestUrl() {
+ return "pages/ajaxSupport/ajaxSupport.xhtml";
+ }
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxSupportTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,112 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library 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 library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.testng;
+
+import java.text.ParseException;
+import java.util.Date;
+
+import org.ajax4jsf.bean.CalendarTestBean;
+import org.ajax4jsf.template.Template;
+import org.richfaces.SeleniumTestBase;
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+public class CalendarTest extends SeleniumTestBase {
+
+ @Test
+ public void testCalendarComponent(Template template) {
+ renderPage(template);
+
+ String containerId = getParentId() + "_form:";
+ String calendarOpenedId = containerId + "calendar";
+ String calendarCollapsedId = calendarOpenedId + "Popup";
+ String calendarInputDate = calendarOpenedId + "InputDate";
+ String calendarPopupButton = calendarCollapsedId + "Button";
+ String outputPanel = containerId + "outputPanel";
+
+ Assert.assertFalse(isVisibleById(calendarOpenedId), "Calendar window should NOT be
visible on the component!");
+
+ writeStatus("Mouse click on calendar InputDate field");
+ clickById(calendarInputDate);
+
+ Assert.assertTrue(isVisibleById(calendarOpenedId), "Calendar window should be
visible on the component!");
+
+ writeStatus("Mouse click outside calendar");
+ clickById(outputPanel);
+
+ Assert.assertFalse(isVisibleById(calendarOpenedId), "Calendar window should NOT be
visible on the component!");
+
+ writeStatus("Mouse click on calendar popup button");
+ clickById(calendarPopupButton);
+
+ Assert.assertTrue(isVisibleById(calendarOpenedId), "Calendar window should be
visible on the component!");
+ }
+
+ @Test
+ public void testSelectDateComponent(Template template) {
+ renderPage(template);
+
+ Date newSelectedDate = CalendarTestBean.getDayInMay(15);
+
+ String containerId = getParentId() + "_form:";
+ String calendarOpenedId = containerId + "calendar";
+ String calendarCollapsedId = calendarOpenedId + "Popup";
+ String calendarInputDate = calendarOpenedId + "InputDate";
+ String calendarPopupButton = calendarCollapsedId + "Button";
+ String outputPanel = containerId + "outputPanel";
+
+ Assert.assertFalse(isVisibleById(calendarOpenedId), "Calendar window should NOT be
visible on the component!");
+ writeStatus("Mouse click on calendar popup button");
+ clickById(calendarPopupButton);
+ Assert.assertTrue(isVisibleById(calendarOpenedId), "Calendar window should be
visible on the component!");
+
+ String inputDateString = getValueById(calendarInputDate);
+ Date readDate = null;
+ try {
+ readDate = CalendarTestBean.DATE_FORMAT.parse(inputDateString);
+ } catch(ParseException parseException) {
+ // skip exception
+ }
+ Assert.assertEquals(readDate, CalendarTestBean.DEFAULT_DATE, "Default date
representation is wrong!");
+
+ // click on 15th of May
+ String newSelectedDateId = calendarOpenedId + "DayCell18";
+ clickById(newSelectedDateId);
+
+ writeStatus("Mouse click outside calendar");
+ clickById(outputPanel);
+
+ inputDateString = getValueById(calendarInputDate);
+ try {
+ readDate = CalendarTestBean.DATE_FORMAT.parse(inputDateString);
+ } catch(ParseException parseException) {
+ // skip exception
+ }
+ Assert.assertEquals(readDate, newSelectedDate, "Date representation after selecting
15.May.2008 is wrong!");
+
+ Assert.assertFalse(isVisibleById(calendarOpenedId), "Calendar window should NOT be
visible on the component!");
+ }
+
+ public String getTestUrl() {
+ return "pages/calendar/calendarTest.xhtml";
+ }
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ColumnsTest.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ColumnsTest.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ColumnsTest.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,102 @@
+package org.richfaces.testng;
+
+import org.ajax4jsf.template.Template;
+import org.richfaces.SeleniumTestBase;
+import org.testng.annotations.Test;
+
+public class ColumnsTest extends SeleniumTestBase {
+
+ private static final String DATA_TABLE = "table";
+
+ private static final String APPLY_BUTTON = "apply";
+
+ private static final String RESET_BUTTON = "reset";
+
+ private static final String CTRL_FORM = "_controls";
+
+ private static final String ROWS_COUNT_CTRL = "rows";
+
+ private static final String COLUMNS_COUNT_CTRL = "rows";
+
+ private static final String BEGIN_ROW = "begin";
+
+ private static final String END_ROW = "end";
+
+ @Test
+ public void testColumnsComponentLayout(Template template) {
+ renderPage(template);
+ writeStatus("Testing columns component layout");
+
+ String parentId = getParentId() + "_form:";
+ String tableId = parentId + DATA_TABLE;
+
+ writeStatus("Check columns count equals to 3 ");
+ assertColumnsCount(3, tableId);
+
+ writeStatus("Check rows count equals to 20 ");
+ assertRowsCount(20, tableId);
+
+ writeStatus("Check columns headers");
+
+ AssertTextEquals("xpath=//table[@id='" + tableId +
"']/tHead/tr[1]/th[1]", "header0");
+ AssertTextEquals("xpath=//table[@id='" + tableId +
"']/tHead/tr[1]/th[2]", "header1");
+ AssertTextEquals("xpath=//table[@id='" + tableId +
"']/tHead/tr[1]/th[3]", "header2");
+
+ writeStatus("Check columns footers");
+
+ AssertTextEquals("xpath=//table[@id='" + tableId +
"']/tFoot/tr[1]/td[1]", "footer0");
+ AssertTextEquals("xpath=//table[@id='" + tableId +
"']/tFoot/tr[1]/td[2]", "footer1");
+ AssertTextEquals("xpath=//table[@id='" + tableId +
"']/tFoot/tr[1]/td[3]", "footer2");
+
+ }
+
+ @Test
+ public void testColumnsComponentCoreAttributes(Template template) {
+ renderPage(template);
+
+ writeStatus("Testing columns component core attributes");
+
+ String parentId = getParentId() + "_form:";
+ String tableId = parentId + DATA_TABLE;
+
+ writeStatus("Set columns count == 5, rows count == 10");
+ adjustTableParams(10, 5, 0, 10);
+
+ writeStatus("Check columns count equals to 5 ");
+ assertColumnsCount(5, tableId);
+ writeStatus("Check rows count equals to 10 ");
+ assertRowsCount(10, tableId);
+
+ writeStatus("Set begin column == 2, end column == 2, rows count = 2");
+ adjustTableParams(2, 5, 2, 2);
+
+ writeStatus("Only one column has to be rendered");
+ assertColumnsCount(1, tableId);
+ assertRowsCount(2, tableId);
+
+ writeStatus("Set end column == 0. there have to be no rows and no columns in
the table");
+ adjustTableParams(10, 5, 10, 0);
+ assertRowsCount(0, tableId);
+
+ reset();
+ }
+
+ private void adjustTableParams(int rows, int columns, int begin, int end) {
+ String ctrlForm = getParentId() + CTRL_FORM;
+ type(ctrlForm + ":rows", String.valueOf(rows));
+ type(ctrlForm + ":columns", String.valueOf(columns));
+ type(ctrlForm + ":begin", String.valueOf(begin));
+ type(ctrlForm + ":end", String.valueOf(end));
+ clickAjaxCommandAndWait(ctrlForm + ":apply");
+ }
+
+ private void reset() {
+ clickAjaxCommandAndWait(getParentId() + CTRL_FORM + ":reset");
+ }
+
+ @Override
+ public String getTestUrl() {
+ return "pages/columns/columnsTest.xhtml";
+ }
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ColumnsTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ComboBoxTest.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ComboBoxTest.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ComboBoxTest.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,71 @@
+package org.richfaces.testng;
+
+import org.ajax4jsf.template.Template;
+import org.richfaces.SeleniumTestBase;
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+public class ComboBoxTest extends SeleniumTestBase {
+
+ @Test
+ public void testComboBoxComponent(Template template) {
+ renderPage(template);
+
+ String parentId = getParentId() + "_form:";
+
+ String predefinedCBId = parentId + "predefined";
+ String selectItemsCBId = parentId + "selectItems";
+ String suggestionValuesCBId = parentId + "suggestionValues";
+
+ writeStatus("check components' default labels");
+
+ getTextById(predefinedCBId + "comboboxField").startsWith("Select
a");
+ getTextById(selectItemsCBId + "comboboxField").startsWith("Select
a");
+ getTextById(suggestionValuesCBId +
"comboboxField").startsWith("Select a");
+
+ writeStatus("check a combobox with predefined suggestions");
+
+ clickById(predefinedCBId);
+ writeStatus("type \"Hunt\"");
+
+ type(predefinedCBId + "comboboxField", "Hunt");
+
+ Assert.assertTrue(isVisibleById(predefinedCBId + "list"),
"Component's pop-up must show up on key typing");
+
+ clickById(predefinedCBId + "list");
+
+ Assert.assertFalse(isVisibleById(predefinedCBId + "list"),
"Component's pop-up has to be closed");
+ AssertValueEquals(predefinedCBId + "comboboxValue",
"Hunter");
+
+ writeStatus("check a combobox with dynamic suggestions list");
+
+ clickById(selectItemsCBId);
+
+ writeStatus("verify \"directInputSuggestions\" component's
attribute");
+
+ writeStatus("type \"O\"");
+
+ type(selectItemsCBId + "comboboxField", "O");
+
+ Assert.assertTrue(isVisibleById(selectItemsCBId + "list"),
"Component's pop-up must show up on key typing");
+ AssertValueEquals(selectItemsCBId + "comboboxValue", "Oak");
+
+ writeStatus("check a combobox with a simple String list as suggestions
list");
+
+ clickById(suggestionValuesCBId);
+ writeStatus("type \"Ma\"");
+
+ type(suggestionValuesCBId + "comboboxField", "Ma");
+ Assert.assertTrue(isVisibleById(suggestionValuesCBId + "list"),
"Component's pop-up must show up on key typing");
+
+ clickById(suggestionValuesCBId + "list");
+
+ Assert.assertFalse(isVisibleById(suggestionValuesCBId + "list"),
"Component's pop-up has to be closed");
+ AssertValueEquals(suggestionValuesCBId + "comboboxValue",
"Maple");
+ }
+
+ public String getTestUrl() {
+ return "pages/comboBox/comboBoxTest.xhtml";
+ }
+
+}
\ No newline at end of file
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ComboBoxTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ContextMenuTest.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ContextMenuTest.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ContextMenuTest.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,98 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library 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 library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.testng;
+
+import org.ajax4jsf.template.Template;
+import org.richfaces.SeleniumTestBase;
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+public class ContextMenuTest extends SeleniumTestBase {
+
+ @Test
+ public void testContextMenuComponent(Template template) {
+ renderPage(template);
+
+ String parentId = getParentId() + "_form:";
+ String inputId = parentId + "input";
+ String input2Id = parentId + "input2";
+ String outputId = parentId + "_value2";
+ String menuId = parentId + "menu_input_menu";
+ String menu2Id = parentId + "menu_input2_menu";
+
+ String menu1_item_ajax = parentId + "menu1_item1";
+ String menu1_item_server = parentId + "menu1_item2";
+ String menu2_item_ajax = parentId + "menu2_item1";
+ String menu2_item_server = parentId + "menu2_item2";
+
+ writeStatus("Click on first input");
+ clickById(inputId);
+ antifast(menuId);
+ Assert.assertTrue(isVisibleById(menuId));
+
+ writeStatus("Click on second input");
+ clickById(input2Id);
+ antifast(menu2Id);
+ Assert.assertFalse(isVisibleById(menuId));
+ Assert.assertTrue(isVisibleById(menu2Id));
+
+ writeStatus("Click on first input again");
+ clickById(inputId);
+ antifast(menuId);
+ Assert.assertTrue(isVisibleById(menuId));
+ Assert.assertFalse(isVisibleById(menu2Id));
+
+ writeStatus("Click on ajax item in first menu");
+ clickAjaxCommandAndWait(menu1_item_ajax);
+ AssertValueEquals(inputId, "menu1_item1");
+ AssertTextEquals(outputId, "1");
+
+ writeStatus("Click on server item in first menu");
+ clickCommandAndWait(menu1_item_server);
+ AssertValueEquals(inputId, "menu1_item2");
+ AssertTextEquals(outputId, "2");
+
+ writeStatus("Click on second input again");
+ clickById(input2Id);
+ antifast(menu2Id);
+ Assert.assertTrue(isVisibleById(menu2Id));
+
+ writeStatus("Click on ajax item in first menu");
+ clickAjaxCommandAndWait(menu2_item_ajax);
+ AssertValueEquals(inputId, "menu2_item1");
+ AssertTextEquals(outputId, "3");
+
+ writeStatus("Click on server item in second menu");
+ clickCommandAndWait(menu2_item_server);
+ AssertValueEquals(inputId, "menu2_item2");
+ AssertTextEquals(outputId, "4");
+ }
+
+ public String getTestUrl() {
+ return "pages/contextMenu/contextMenu.xhtml";
+ }
+
+ private void antifast(String id) {
+ waiteForCondition("document.getElementById('" + id + "')
!= undefined", 500);
+ }
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ContextMenuTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/DataFilterSliderTest.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/DataFilterSliderTest.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/DataFilterSliderTest.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,98 @@
+package org.richfaces.testng;
+
+import org.ajax4jsf.template.Template;
+import org.richfaces.SeleniumTestBase;
+import org.testng.annotations.Test;
+
+public class DataFilterSliderTest extends SeleniumTestBase {
+
+ private static final String DATA_FLT_SLIDER_ID = "dataFilterSlider";
+
+ private static final String DATA_FLT_SLIDER_INPUT = DATA_FLT_SLIDER_ID +
"slider_val";
+
+ private static final String DATA_FLT_SLIDER_TRACK = DATA_FLT_SLIDER_ID +
"slider-track";
+
+ private static final String TABLE = "planetList";
+
+ private static final int PLANETS_ALL = 11;
+
+ private static final int PLANETS_SMALLER_3 = 10;
+
+ private static final int PLANETS_SMALLER_2 = 9;
+
+ private static final int PLANETS_SMALLER_1 = 6;
+
+ @Test
+ public void testDataFilterSliderComponent(Template template) {
+ renderPage(template);
+
+ String parentId = getParentId() + "_form:";
+ String tableId = parentId + TABLE;
+
+ writeStatus("Check component core functionality");
+
+ writeStatus("In the beginning all planets have to be displayed");
+ assertColumnsCount(2, tableId);
+ assertRowsCount(PLANETS_ALL, tableId);
+
+ writeStatus("Set 1g! Only 6 planets have to meet this condition");
+ clickSlider(1);
+ assertRowsCount(PLANETS_SMALLER_1, tableId);
+
+ writeStatus("Set 2g! Only 9 planets have to meet this condition");
+ clickSlider(2);
+ assertRowsCount(PLANETS_SMALLER_2, tableId);
+
+ writeStatus("Set 5g! Only 10 planets have to meet this condition");
+ clickSlider(5);
+ assertRowsCount(PLANETS_SMALLER_3, tableId);
+
+ }
+
+ @Test
+ public void testDataFilterSliderComponentManualInput(Template template) {
+ renderPage(template);
+
+ String parentId = getParentId() + "_form:";
+ String tableId = parentId + TABLE;
+ String inputId = parentId + DATA_FLT_SLIDER_INPUT;
+
+ writeStatus("Check component manual input");
+
+ writeStatus("In the beginning all planets have to be displayed");
+ assertColumnsCount(2, tableId);
+ assertRowsCount(PLANETS_ALL, tableId);
+
+ writeStatus("Type 1g! Only 6 planets have to meet this condition");
+ selenium.type(inputId, "1");
+ waitForAjaxCompletion();
+ assertRowsCount(PLANETS_SMALLER_1, tableId);
+
+ writeStatus("Type 2g! Only 9 planets have to meet this condition");
+ selenium.type(inputId, "2");
+ waitForAjaxCompletion();
+ assertRowsCount(PLANETS_SMALLER_2, tableId);
+
+ writeStatus("Type 5g! Only 10 planets have to meet this condition");
+ selenium.type(inputId, "5");
+ waitForAjaxCompletion();
+ assertRowsCount(PLANETS_SMALLER_3, tableId);
+ }
+
+ private void clickSlider(int position) {
+ String trackId = getParentId() + "_form:" + DATA_FLT_SLIDER_TRACK;
+ int w = selenium.getElementWidth(trackId).intValue();
+ double step = w / 40.;
+ int pos = (int) (position * step + 1 + (isFF() ? step : 0));
+ selenium.mouseDownAt(trackId, pos + ",0");
+ selenium.mouseUpAt(trackId, pos + ",0");
+ waitForAjaxCompletion();
+ delay(500);
+ }
+
+ @Override
+ public String getTestUrl() {
+ return "pages/dataFilterSlider/dataFilterSliderTest.xhtml";
+ }
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/DataFilterSliderTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/DataTableTest.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/DataTableTest.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/DataTableTest.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,189 @@
+package org.richfaces.testng;
+
+import org.ajax4jsf.template.Template;
+import org.richfaces.SeleniumTestBase;
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+public class DataTableTest extends SeleniumTestBase {
+
+ public String getTestUrl() {
+ return "pages/dataTable/dataTableTest.xhtml";
+ }
+
+ @Test
+ public void testDataTable(Template template) {
+ renderPage(template);
+
+ String parentId = getParentId() + "_form:";
+ String dataTableId = parentId + "table";
+
+ reset(parentId + "reset");
+ reRenderForm();
+
+ writeStatus("Check columns count equals to 3 ");
+ assertColumnsCount(3, dataTableId);
+ writeStatus("Check rows count equals to 20 ");
+ assertRowsCount(20, dataTableId);
+
+ String columnsId = getColumnId(dataTableId, 0);
+
+ writeStatus("Check inputs' values ");
+ assertInputValue(dataTableId, 0, columnsId, "0");
+ assertInputValue(dataTableId, 5, columnsId, "5");
+ assertInputValue(dataTableId, 19, columnsId, "19");
+
+ columnsId = getColumnId(dataTableId, 1);
+
+ assertInputValue(dataTableId, 0, columnsId, "1");
+ assertInputValue(dataTableId, 7, columnsId, "8");
+ assertInputValue(dataTableId, 19, columnsId, "20");
+
+ columnsId = getColumnId(dataTableId, 2);
+
+ assertInputValue(dataTableId, 0, columnsId, "2");
+ assertInputValue(dataTableId, 11, columnsId, "13");
+ assertInputValue(dataTableId, 19, columnsId, "21");
+
+ writeStatus("Insert some values ");
+ insertInputValue(dataTableId, 0, getColumnId(dataTableId, 0), "000");
+ insertInputValue(dataTableId, 19, getColumnId(dataTableId, 2), "777");
+
+ writeStatus("Rerender table");
+ clickById(getParentId() + "_form:submit");
+ waitForAjaxCompletion();
+
+ writeStatus("Check values entered ");
+ assertInputValue(dataTableId, 0, getColumnId(dataTableId, 0), "000");
+ assertInputValue(dataTableId, 19, getColumnId(dataTableId, 2), "777");
+
+ columnsId = getColumnId(dataTableId, 0);
+
+ writeStatus("Sort ASC by 1'st column ");
+ sortColumn(dataTableId, columnsId);
+ writeStatus("Check ordering");
+ assertInputValue(dataTableId, 0, columnsId, "000");
+ assertInputValue(dataTableId, 1, columnsId, "1");
+ assertInputValue(dataTableId, 18, columnsId, "8");
+ assertInputValue(dataTableId, 19, columnsId, "9");
+
+ writeStatus("Sort DESC by 1'st column ");
+ sortColumn(dataTableId, columnsId);
+ writeStatus("Check ordering");
+ assertInputValue(dataTableId, 0, columnsId, "9");
+ assertInputValue(dataTableId, 1, columnsId, "8");
+ assertInputValue(dataTableId, 18, columnsId, "1");
+ assertInputValue(dataTableId, 19, columnsId, "000");
+
+ columnsId = getColumnId(dataTableId, 2);
+
+ writeStatus("Sort ASC by 3'st column ");
+ sortColumn(dataTableId, columnsId);
+ writeStatus("Check ordering");
+ assertInputValue(dataTableId, 0, columnsId, "10");
+ assertInputValue(dataTableId, 1, columnsId, "11");
+ assertInputValue(dataTableId, 18, columnsId, "8");
+ assertInputValue(dataTableId, 19, columnsId, "9");
+
+ writeStatus("Set columns count == 5, rows count == 10");
+ changeColumnCount(getParentId(), 10, 5, 0, 100);
+
+ writeStatus("Check columns count equals to 5 ");
+ assertColumnsCount(5, dataTableId);
+ writeStatus("Check rows count equals to 10 ");
+ assertRowsCount(10, dataTableId);
+
+ columnsId = getColumnId(dataTableId, 0);
+
+ writeStatus("Check inputs' values ");
+ assertInputValue(dataTableId, 0, columnsId, "0");
+ assertInputValue(dataTableId, 5, columnsId, "5");
+ assertInputValue(dataTableId, 9, columnsId, "9");
+
+ columnsId = getColumnId(dataTableId, 1);
+
+ assertInputValue(dataTableId, 0, columnsId, "1");
+ assertInputValue(dataTableId, 7, columnsId, "8");
+ assertInputValue(dataTableId, 9, columnsId, "10");
+
+ columnsId = getColumnId(dataTableId, 4);
+
+ assertInputValue(dataTableId, 0, columnsId, "4");
+ assertInputValue(dataTableId, 2, columnsId, "6");
+ assertInputValue(dataTableId, 9, columnsId, "13");
+
+ writeStatus("Sort ASC by the last column ");
+ sortColumn(dataTableId, columnsId);
+ writeStatus("Check ordering");
+ assertInputValue(dataTableId, 0, columnsId, "10");
+ assertInputValue(dataTableId, 2, columnsId, "12");
+ assertInputValue(dataTableId, 9, columnsId, "9");
+
+ writeStatus("Sort DESC by the last column ");
+ sortColumn(dataTableId, columnsId);
+ writeStatus("Check ordering");
+ assertInputValue(dataTableId, 0, columnsId, "9");
+ assertInputValue(dataTableId, 2, columnsId, "7");
+ assertInputValue(dataTableId, 9, columnsId, "10");
+
+ columnsId = getColumnId(dataTableId, 2);
+ writeStatus("Sort ASC by the 3d column ");
+ sortColumn(dataTableId, columnsId);
+
+ writeStatus("Check ordering");
+ assertInputValue(dataTableId, 0, columnsId, "10");
+ assertInputValue(dataTableId, 2, columnsId, "2");
+ assertInputValue(dataTableId, 9, columnsId, "9");
+
+ changeColumnCount(getParentId(),2, 5, 2, 2);
+ assertColumnsCount(1, dataTableId);
+ assertRowsCount(2, dataTableId);
+
+ changeColumnCount(getParentId(), 10, 5, 10, 0);
+ assertRowsCount(0, dataTableId);
+
+ }
+
+ public void reset(String id) {
+ clickAjaxCommandAndWait(id);
+ }
+
+ private String getColumnId(String tableId, int i) {
+ String script = "$('" + tableId + "').rows[0].cells["
+ String.valueOf(i) + "].id";
+ String id = runScript(script);
+ id = id.replace(tableId + ":", "");
+ id = id.replace("header", "");
+ return id;
+ }
+
+ private void changeColumnCount(String parentId, int rows, int columns, int begin, int
end) {
+ String script =
"$('"+parentId+"_controls:rows').value='" +
String.valueOf(rows) + "';";
+ runScript(script);
+ script =
"$('"+parentId+"_controls:column').value='" +
String.valueOf(columns) + "';";
+ runScript(script);
+ script =
"$('"+parentId+"_controls:begin').value='" +
String.valueOf(begin) + "';";
+ runScript(script);
+ script = "$('"+parentId+"_controls:end').value='"
+ String.valueOf(end) + "';";
+ runScript(script);
+ clickById(parentId +"_controls:apply");
+ waitForAjaxCompletion();
+ }
+
+ private void sortColumn(String tableId, String columnId) {
+ clickById(tableId + ":" + columnId + "header");
+ waitForAjaxCompletion();
+ }
+
+ private void insertInputValue(String tableId, int row, String inputId, String value)
{
+ String id = tableId + ":" + row + ":" + inputId;
+ String script = ("$('" + id +
"').firstChild.value='" + value + "';");
+ runScript(script);
+ }
+
+ private void assertInputValue(String tableId, int row, String inputId, String value)
{
+ String id = tableId + ":" + row + ":" + inputId;
+ String script = "$('" + id + "').firstChild.value";
+ Assert.assertEquals(runScript(script), value);
+ }
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/DataTableTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/DropDownMenuTest.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/DropDownMenuTest.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/DropDownMenuTest.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,64 @@
+package org.richfaces.testng;
+
+import org.ajax4jsf.template.Template;
+import org.richfaces.SeleniumTestBase;
+import org.testng.annotations.Test;
+
+public class DropDownMenuTest extends SeleniumTestBase {
+
+ @Test
+ public void testDropDownMenuComponent(Template template) {
+ renderPage(template);
+
+ String parentId = getParentId() + "_form:";
+ String file = parentId + "file";
+ String open = parentId + "open:anchor";
+ String saveAs = parentId + "saveAs:anchor";
+ String save = parentId + "save:anchor";
+ String saveAll = parentId + "saveAll:anchor";
+ String close = parentId + "close:anchor";
+ String exit = parentId + "exit:anchor";
+ String operation = parentId + "operation";
+
+ writeStatus("Check menu item in ajax mode");
+
+ selenium.mouseOver(file);
+ selenium.mouseOver(saveAs);
+ clickById(saveAll);
+
+ AssertTextEquals(operation, "Save All");
+
+ selenium.mouseOver(file);
+ selenium.mouseOver(saveAs);
+ clickById(save);
+
+ AssertTextEquals(operation, "Save");
+
+ writeStatus("Check the drop down menu closed");
+
+ AssertNotVisible(save);
+ AssertNotVisible(saveAs);
+
+ writeStatus("Check menu item in server mode");
+
+ selenium.mouseOver(file);
+ clickCommandAndWait(close);
+
+ AssertTextEquals(operation, "Close");
+
+ writeStatus("Check menu item in 'none' mode");
+
+ selenium.mouseOver(file);
+ selenium.mouseOver(exit);
+ clickById(exit);
+
+ AssertTextEquals(operation, "Close");
+ AssertNotVisible(exit);
+
+ }
+
+ public String getTestUrl() {
+ return "pages/dropDownMenu/dropDownMenuTest.xhtml";
+ }
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/DropDownMenuTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/InplaceInputTest.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/InplaceInputTest.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/InplaceInputTest.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,145 @@
+package org.richfaces.testng;
+
+import org.ajax4jsf.template.Template;
+import org.richfaces.SeleniumTestBase;
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+public class InplaceInputTest extends SeleniumTestBase {
+
+ private static final String INPLACE_INPUT_SIMPLE = "inplaceInput";
+
+ private static final String INPLACE_INPUT_DECORATED =
"inplaceInputDecorated";
+
+ private static final String INPLACE_INPUT_DECORATED_OK =
"inplaceInputDecoratedok";
+
+ private static final String INPLACE_INPUT_DECORATED_CANCEL =
"inplaceInputDecoratedcancel";
+
+ private static final String INPLACE_INPUT_FIELD_POSTFIX = "tempValue";
+
+ private final static String EVENT_TEST_RESULT_FAILED_TEXT = "No";
+
+ private final static String EVENT_TEST_RESULT_PASSED_TEXT = "Passed";
+
+ @Test
+ public void testInplaceInputComponentLayout(Template template) {
+ renderPage(template);
+ writeStatus("Check component layout");
+
+ String inplaceInputS = getParentId() + "_form:" +
INPLACE_INPUT_SIMPLE;
+ String inplaceInputD = getParentId() + "_form:" +
INPLACE_INPUT_DECORATED;
+
+ Assert.assertTrue(isPresentById(inplaceInputS));
+ int count = selenium.getXpathCount("//*[@id='" + inplaceInputS +
"' and (name()='span' or name()='SPAN')]").intValue();
+ Assert.assertTrue(count == 1, "InplaceInput[" + inplaceInputS + "]
has layout=inline(default) and should be rendered as 'span' element");
+
+ Assert.assertTrue(isPresentById(inplaceInputD));
+ count = selenium.getXpathCount("//*[@id='" + inplaceInputD +
"' and (name()='DIV' or name()='div')]").intValue();
+ Assert.assertTrue(count == 1, "InplaceInput [" + inplaceInputD +
"] has layout=block and should be rendered as 'div' element");
+
+ }
+
+ @Test
+ public void testInplaceInputClientAPI(Template template) {
+ renderPage(template);
+ writeStatus("Check component client API");
+ }
+
+ @Test
+ public void testInplaceInputEvents(Template template) {
+ renderPage(template);
+
+ writeStatus("Check component event triggering");
+
+ String inplaceInputS = getParentId() + "_form:" +
INPLACE_INPUT_SIMPLE;
+ String inplaceInputD = getParentId() + "_form:" +
INPLACE_INPUT_DECORATED;
+ String inplaceInputDOk = getParentId() + "_form:" +
INPLACE_INPUT_DECORATED_OK;
+ String inplaceInputDCancel = getParentId() + "_form:" +
INPLACE_INPUT_DECORATED_CANCEL;
+
+ writeStatus("Click first component being tested");
+
+ clickById(inplaceInputS);
+ AssertTextEquals(inplaceInputS + "_edit",
EVENT_TEST_RESULT_PASSED_TEXT, "oneditactivated event is not fired");
+
+ writeStatus("Stop editing first component being tested");
+
+ String inplaceInputSInput = inplaceInputS + INPLACE_INPUT_FIELD_POSTFIX;
+ selenium.fireEvent(inplaceInputSInput, "blur");
+
+ AssertTextEquals(inplaceInputS + "_view",
EVENT_TEST_RESULT_PASSED_TEXT, "onviewactivated event is not fired");
+
+ writeStatus("Double-click second component being tested");
+
+ selenium.doubleClick(inplaceInputD);
+ AssertTextEquals(inplaceInputD + "_edit",
EVENT_TEST_RESULT_PASSED_TEXT, "oneditactivated event is not fired");
+ type(inplaceInputSInput, "Hello");
+
+ writeStatus("Stop editing second component being tested");
+
+ selenium.mouseDown(inplaceInputDOk);
+
+ AssertTextEquals(inplaceInputD + "_view",
EVENT_TEST_RESULT_PASSED_TEXT, "onviewactivated event is not fired");
+ }
+
+ @Test
+ public void testInplaceInputKeyAttributes(Template template) {
+ renderPage(template);
+
+ String inplaceInputS = getParentId() + "_form:" +
INPLACE_INPUT_SIMPLE;
+ String inplaceInputD = getParentId() + "_form:" +
INPLACE_INPUT_DECORATED;
+
+ String inplaceInputSInput = inplaceInputS + INPLACE_INPUT_FIELD_POSTFIX;
+ String inplaceInputDInput = inplaceInputD + INPLACE_INPUT_FIELD_POSTFIX;
+
+ writeStatus("Check component's key attributes");
+
+ writeStatus("test 'editEvent' attribute");
+
+ writeStatus("The first component must change your state by single clicking
only");
+ clickById(inplaceInputS);
+ AssertVisible(inplaceInputSInput);
+
+ writeStatus("The second component must change your state by double clicking
only");
+ selenium.doubleClick(inplaceInputD);
+ AssertVisible(inplaceInputDInput);
+ }
+
+ @Test
+ public void testInplaceInputComponentCore(Template template) {
+ renderPage(template);
+
+ String inplaceInputD = getParentId() + "_form:" +
INPLACE_INPUT_DECORATED;
+ String inplaceInputDInput = inplaceInputD + INPLACE_INPUT_FIELD_POSTFIX;
+ String inplaceInputDOk = getParentId() + "_form:" +
INPLACE_INPUT_DECORATED_OK;
+ String inplaceInputDCancel = getParentId() + "_form:" +
INPLACE_INPUT_DECORATED_CANCEL;
+
+ writeStatus("Check component's core functionality");
+
+ writeStatus("Double-click the second component and type an initial
text");
+ selenium.doubleClick(inplaceInputD);
+ type(inplaceInputDInput, "Sun");
+
+ writeStatus("Stop editing with ok. The input has to be saved");
+ selenium.mouseDown(inplaceInputDOk);
+ String sun = invokeFromComponent(inplaceInputD, "getValue", null);
+ Assert.assertEquals(sun, "Sun", "An inputted text has not been
saved with ok");
+ //AssertTextEquals(inplaceInputD, "Sun", "An inputted text has not
been saved with ok");
+
+ writeStatus("Double-click the second component again and type a new
text");
+ selenium.doubleClick(inplaceInputD);
+ type(inplaceInputDInput, "Moon");
+
+ writeStatus("Stop editing with cancel. The input has not to be
saved");
+ selenium.mouseDown(inplaceInputDCancel);
+
+ sun = invokeFromComponent(inplaceInputD, "getValue", null);
+ Assert.assertEquals(sun, "Sun", "An inputted text has not to be
saved with cancel");
+ //AssertTextEquals(inplaceInputD, "Sun", "An inputted text has not
to be saved with cancel");
+
+ }
+
+ @Override
+ public String getTestUrl() {
+ return "pages/inplaceInput/inplaceInputTest.xhtml";
+ }
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/InplaceInputTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/InplaceSelectTest.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/InplaceSelectTest.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/InplaceSelectTest.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,77 @@
+package org.richfaces.testng;
+
+import org.ajax4jsf.template.Template;
+import org.richfaces.SeleniumTestBase;
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+public class InplaceSelectTest extends SeleniumTestBase {
+
+ @Test
+ public void testInplaceSelectComponent(Template template) {
+ renderPage(template);
+
+ String parentId = getParentId() + "_form:";
+ String inplaceSelectId = parentId + "inplaceSelect";
+ String okButton = parentId + "inplaceSelect" + "ok";
+ //String inplaceTmpValueElemId = parentId + "inplaceSelect" +
"inplaceTmpValue";
+ String cancelButton = parentId + "inplaceSelect" + "cancel";
+ String popupId = "list" + inplaceSelectId;
+
+ writeStatus("click the component");
+
+ clickById(inplaceSelectId);
+ Assert.assertFalse(isVisibleById(popupId), "Component pop-up should not show
up on solitary click");
+
+ writeStatus("double click the component");
+
+ selenium.doubleClick(inplaceSelectId);
+ Assert.assertTrue(isVisibleById(popupId), "Component pop-up should show up
on double click");
+
+ writeStatus("Check that controls buttons are present");
+
+ Assert.assertTrue(isPresentById(okButton));
+ Assert.assertTrue(isPresentById(cancelButton));
+
+ writeStatus("Select second element"); //Birch
+
+ selenium.mouseMove("xpath=//div[@id='list" + inplaceSelectId +
"']/span[2]");
+ selenium.mouseDown(okButton);
+
+ writeStatus("Check that a new element is selected");
+
+ AssertValueEquals(inplaceSelectId + "inplaceValue",
"Birch");
+
+ writeStatus("Select another element"); // Aspen
+
+ selenium.doubleClick(inplaceSelectId);
+
+ selenium.mouseMove("xpath=//div[@id='list" + inplaceSelectId +
"']/span[3]");
+ selenium.mouseDown(cancelButton);
+
+ writeStatus("Cancel selected value.");
+ AssertValueEquals(inplaceSelectId + "inplaceValue", "Birch",
"A value has not to be changed");
+
+ writeStatus("Verify javascript event triggering");
+
+ runScript("theLatestEvent='undefined'");
+
+ writeStatus("Double click the component");
+ selenium.doubleClick(inplaceSelectId);
+
+ Assert.assertEquals(runScript("theLatestEvent"),
"editactivated", "editactivated event has not been triggered");
+
+ writeStatus("Stop editing with ok");
+ selenium.mouseDown(okButton);
+ Assert.assertEquals(runScript("theLatestEvent"),
"viewactivated", "viewactivated event has not been triggered");
+
+ writeStatus("Stop editing with cancel");
+ selenium.mouseDown(cancelButton);
+ Assert.assertEquals(runScript("theLatestEvent"),
"viewactivated", "viewactivated event has not been triggered");
+ }
+
+ public String getTestUrl() {
+ return "pages/inplaceSelect/inplaceSelectTest.xhtml";
+ }
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/InplaceSelectTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
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
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/InputNumberSliderTest.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,110 @@
+/* License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library 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 library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.testng;
+
+import org.ajax4jsf.template.Template;
+import org.richfaces.SeleniumTestBase;
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+public class InputNumberSliderTest extends SeleniumTestBase {
+
+ private static final int BAR_SCALE = 10;
+
+ @Test
+ public void testInputNumberSlider(Template template) {
+ renderPage(template);
+
+ String parentId = getParentId() + "_form:";
+ String slider = parentId + "slider";
+
+ String input = slider + "Input";
+ String tip = slider + "Tip";
+ String track = slider + "Track";
+
+ String ajax = parentId + "ajax";
+ String server = parentId + "server";
+ String output = parentId + "output";
+
+ writeStatus("Checking initial rendering");
+ Assert.assertFalse(isVisibleById(tip));
+ checkSliderVisualState(slider, 40);
+ AssertTextEquals(output, "40");
+
+ writeStatus("Checking if tip is visible during click");
+ selenium.mouseDownAt("id=" + track, "800,1");
+ Assert.assertTrue(isVisibleById(tip));
+ selenium.mouseUpAt("id=" + track, "800,1");
+ Assert.assertFalse(isVisibleById(tip));
+
+ writeStatus("Checking if value is changed with previous click");
+ checkSliderVisualState(slider, 80);
+
+ writeStatus("Checking if value is changed with input field");
+ selenium.type(input, "22");
+ checkSliderVisualState(slider, 22);
+
+ writeStatus("Checking if slider is properly re-rendered and submitted with
ajax");
+ clickAjaxCommandAndWait(ajax);
+ checkSliderVisualState(slider, 32);
+ AssertTextEquals(output, "32");
+
+ writeStatus("Checking if slider is properly submitted");
+ clickCommandAndWait(server);
+ checkSliderVisualState(slider, 42);
+ AssertTextEquals(output, "42");
+
+ writeStatus("Checking validation");
+ selenium.mouseDownAt("id=" + track, "950,1");
+ selenium.mouseUpAt("id=" + track, "950,1");
+ clickAjaxCommandAndWait(ajax);
+ checkSliderVisualState(slider, 95);
+ AssertTextEquals(output, "42");
+
+ selenium.mouseDownAt("id=" + track, "300,1");
+ selenium.mouseUpAt("id=" + track, "300,1");
+ clickAjaxCommandAndWait(ajax);
+ checkSliderVisualState(slider, 40);
+ AssertTextEquals(output, "40");
+ }
+
+ private void checkSliderVisualState(String id, int value) {
+ writeStatus("Checking value in input field");
+ AssertValueEquals(id + "Input", Integer.toString(value));
+ AssertTextEquals(id + "Tip", Integer.toString(value));
+
+ writeStatus("Checking tip and tracker position");
+ String actualHandle = runScript("document.getElementById('" + id +
"Handle').style.left");
+ String actualTip = runScript("document.getElementById('" + id +
"Tip').style.left");
+
+ Assert.assertEquals(actualHandle, actualTip);
+ Assert.assertTrue(actualTip.endsWith("px"));
+
+ int actual = new Integer(actualTip.replace("px",
"")).intValue();
+ int expected = BAR_SCALE * value;
+ Assert.assertTrue(Math.abs(actual - expected) <= BAR_SCALE,
+ "Handle position is not syncronized with slider value!");
+ }
+
+ public String getTestUrl() {
+ return "pages/inputNumberSlider/inputNumberSliderTest.xhtml";
+ }
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/InputNumberSliderTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/InputNumberSpinnerTest.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/InputNumberSpinnerTest.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/InputNumberSpinnerTest.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,64 @@
+package org.richfaces.testng;
+
+import org.ajax4jsf.template.Template;
+import org.richfaces.SeleniumTestBase;
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+
+public class InputNumberSpinnerTest extends SeleniumTestBase {
+
+ @Test
+ public void testInputNumberSpinnerComponent(Template template) {
+ renderPage(template);
+
+ writeStatus("check whether the spinner is invariant with respect to pair of
sequential opposite operations");
+
+ //start value = 20
+ String before = getSpinnerValue();
+ clickUp();
+ clickDown();
+ String after = getSpinnerValue();
+ Assert.assertEquals(before, after);
+ Assert.assertEquals(after, "20");
+
+ writeStatus("check upper bound and cycling");
+
+ clickUp(); //+10
+ clickUp(); //+10
+ clickUp(); //+10
+ clickUp(); //+10
+ clickUp(); //+10
+ Assert.assertEquals(getSpinnerValue(), "10");
+
+ writeStatus("check lower bound and cycling");
+
+ clickDown(); //-10
+ Assert.assertEquals(getSpinnerValue(), "0");
+ clickDown(); //-10
+ Assert.assertEquals(getSpinnerValue(), "50");
+ clickDown(); //-10
+ Assert.assertEquals(getSpinnerValue(), "40");
+ }
+
+ private void clickUp() {
+ String id = getParentId() + "_form:" + "spinnerButtons";
+ selenium.fireEvent("xpath=//table[@id='" + id +
"']/tbody/tr[1]/td", "mousedown");
+ selenium.fireEvent("xpath=//table[@id='" + id +
"']/tbody/tr[1]/td", "mouseup");
+ }
+
+ private void clickDown() {
+ String id = getParentId() + "_form:" + "spinnerButtons";
+ selenium.fireEvent("xpath=//table[@id='" + id +
"']/tbody/tr[2]/td", "mousedown");
+ selenium.fireEvent("xpath=//table[@id='" + id +
"']/tbody/tr[2]/td", "mouseup");
+ }
+
+ private String getSpinnerValue() {
+ return selenium.getValue("name=" + getParentId() +
"_form:spinner");
+ }
+
+ public String getTestUrl() {
+ return "pages/inputNumberSpinner/inputNumberSpinnerTest.xhtml";
+ }
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/InputNumberSpinnerTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/JSFunctionTest.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/JSFunctionTest.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/JSFunctionTest.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,33 @@
+package org.richfaces.testng;
+
+import static org.testng.Assert.assertEquals;
+
+import org.ajax4jsf.template.Template;
+import org.richfaces.SeleniumTestBase;
+import org.testng.annotations.Test;
+
+public class JSFunctionTest extends SeleniumTestBase {
+
+ @Test
+ public void testJSFunctionComponent(Template template) {
+ renderPage(template);
+
+ String showNameElemId = getParentId() + "showname";
+ selenium.mouseOver("alex");
+ waitForAjaxCompletion();
+ assertEquals(getTextById(showNameElemId), "Alex");
+
+ selenium.mouseOver("jonh");
+ waitForAjaxCompletion();
+ assertEquals(getTextById(showNameElemId), "Jonh");
+
+ selenium.mouseOver("roger");
+ waitForAjaxCompletion();
+ assertEquals(getTextById(showNameElemId), "Roger");
+ }
+
+ public String getTestUrl() {
+ return "pages/jsFunction/jsFunctionTest.xhtml";
+ }
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/JSFunctionTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/KeepAliveTest.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/KeepAliveTest.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/KeepAliveTest.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,60 @@
+package org.richfaces.testng;
+
+import org.ajax4jsf.template.Template;
+import org.richfaces.SeleniumTestBase;
+import org.testng.annotations.Test;
+
+public class KeepAliveTest extends SeleniumTestBase {
+
+ @Test
+ public void _testKeepAliveComponent(Template template) {
+ renderPage(template);
+
+ String parentId = getParentId();
+
+ String sumElemId = parentId + "sum";
+ AssertValueEquals(sumElemId, "0");
+ String addButtonId = parentId + "form:add";
+ String addAjaxButtonId = parentId + "form:addAjax";
+
+ writeStatus("The sum has to be increased by 5 twice");
+
+ clickCommandAndWait(addButtonId);
+ clickCommandAndWait(addButtonId);
+ AssertValueEquals(sumElemId, "10");
+
+ writeStatus("The sum has to be increased by 5 twice again");
+
+ clickById(addAjaxButtonId);
+ clickById(addAjaxButtonId);
+ waitForAjaxCompletion();
+ AssertValueEquals(sumElemId, "20");
+
+ writeStatus("Test ajax only regime ... ");
+
+ String sumAjaxOnlyElemId = parentId + "sumAjaxOnly";
+ AssertValueEquals(sumAjaxOnlyElemId, "0");
+ addButtonId = parentId + "formAjaxOnly:add";
+ addAjaxButtonId = parentId + "formAjaxOnly:addAjax";
+
+ writeStatus("State is not saved between full submits. The sum always is
5");
+
+ clickCommandAndWait(addButtonId);
+ clickCommandAndWait(addButtonId);
+ AssertValueNotEquals(sumAjaxOnlyElemId, "10");
+
+ writeStatus("Ajax request! The sum has to be increased by 5 twice");
+
+// This test doesn't pass! Bug?!
+
+// clickById(addAjaxButtonId);
+// clickById(addAjaxButtonId);
+// waitForAjaxCompletion();
+// AssertValueEquals(sumAjaxOnlyElemId, "10");
+ }
+
+ public String getTestUrl() {
+ return "pages/keepAlive/keepAliveTest.xhtml";
+ }
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/KeepAliveTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ListShuttleTest.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ListShuttleTest.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ListShuttleTest.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,262 @@
+/**
+ *
+ */
+package org.richfaces.testng;
+
+import org.ajax4jsf.template.Template;
+import org.richfaces.SeleniumTestBase;
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+/**
+ * @author Andrey Markavstov
+ *
+ */
+public class ListShuttleTest extends SeleniumTestBase {
+
+ String parentId;
+
+ String availebleListId;
+
+ String targetListId;
+
+ String copyAllId;
+
+ String copyId;
+
+ String removeId;
+
+ String removeAllId;
+
+ String firstId;
+
+ String upId;
+
+ String downId;
+
+ String lastId;
+
+ String submitId;
+
+ String resetId;
+
+ String hideId;
+
+ private void init() {
+ parentId = getParentId() + "_form:";
+ availebleListId = parentId + "lstbody";
+ targetListId = parentId + "lstlTbody";
+ copyAllId = parentId + "lscopyAll";
+ copyId = parentId + "lscopy";
+ removeId = parentId + "lsremove";
+ removeAllId = parentId + "lsremoveAll";
+ firstId = parentId + "lsfirst";
+ upId = parentId + "lsup";
+ downId = parentId + "lsdown";
+ lastId = parentId + "lslast";
+ submitId = parentId + "submit";
+ resetId = parentId + "reset";
+ hideId = parentId + "hide";
+
+ }
+
+ @Test
+ public void testListShuttleComponent(Template template) {
+ renderPage(template);
+ init();
+ reset();
+
+ _checkVisibility(true);
+
+ // Check count
+ _assertTableRowsCount(availebleListId, 5);
+ _assertTableRowsCount(targetListId, 0);
+
+ // Copy all and check count
+ try {
+ clickById(copyAllId);
+ _assertTableRowsCount(availebleListId, 0);
+ _assertTableRowsCount(targetListId, 5);
+ } catch (Exception e) {
+ writeStatus("Test failed. Copy all does not work. Cause: " + e,
true);
+ Assert.fail("Test failed. Copy all does not work. Cause: " + e);
+ }
+
+ // Remove all and check count
+ try {
+ clickById(removeAllId);
+ _assertTableRowsCount(availebleListId, 5);
+ _assertTableRowsCount(targetListId, 0);
+ } catch (Exception e) {
+ writeStatus("Test failed. Remove all does not work. Cause: " + e,
true);
+ Assert.fail("Test failed. Remove all does not work. Cause: " + e);
+ }
+
+ try {
+ // Copy 1st & 2nd item
+ _doItemAction(parentId + "ls:0", copyId, "Copy");
+ _doItemAction(parentId + "ls:1", copyId, "Copy");
+ _doItemAction(parentId + "ls:2", copyId, "Copy");
+
+ // Check count
+ _assertTableRowsCount(availebleListId, 2);
+ _assertTableRowsCount(targetListId, 3);
+ } catch (Exception e) {
+ writeStatus("Test failed. Copy does not work. Cause: " + e, true);
+ Assert.fail("Test failed. Copy does not work. cause: " + e);
+ }
+
+ // Check posting to server
+ _checkDataPost2Server(2, 3);
+
+ // Check ordering
+ _checkOrdering(targetListId, "1Item1", "2Item2",
"3Item3", "");
+
+ // Move the first to to the last
+ _doItemAction(parentId + "ls:t0", downId, "Down");
+ _checkOrdering(targetListId, "2Item2", "1Item1",
"3Item3", "Test failed. Down control does not work");
+
+ _doItemAction(parentId + "ls:t0", lastId, "Last");
+ _checkOrdering(targetListId, "2Item2", "3Item3",
"1Item1", "Test failed. Last control does not work");
+
+ _doItemAction(parentId + "ls:t2", firstId, "first");
+ _checkOrdering(targetListId, "3Item3", "2Item2",
"1Item1", "Test failed. First control does not work");
+
+ _doItemAction(parentId + "ls:t0", upId, "Up");
+ _checkOrdering(targetListId, "3Item3", "1Item1",
"2Item2", "Test failed. Up control does not work");
+
+ _doItemAction(parentId + "ls:t1", removeId, "Remove");
+ _checkOrdering(targetListId, "3Item3", "1Item1", null,
"Test failed. Remove control does not work");
+
+ _assertTableRowsCount(targetListId, 2);
+
+ hideControls();
+ _checkVisibility(false);
+
+ }
+
+ private void hideControls() {
+ clickAjaxCommandAndWait(hideId);
+ }
+
+ private void _checkVisibility(boolean isVisible) {
+ if (isVisible) {
+ AssertVisible(copyAllId);
+ AssertVisible(parentId + "lsdisremoveAll");
+ AssertVisible(parentId + "lsdisremove");
+ AssertVisible(parentId + "lsdisremove");
+
+ AssertVisible(parentId + "lsdisfirst");
+ AssertVisible(parentId + "lsdisup");
+ AssertVisible(parentId + "lsdisdown");
+ AssertVisible(parentId + "lsdislast");
+ } else {
+ AssertNotRendered(copyAllId);
+ AssertNotRendered(removeAllId);
+ AssertNotRendered(copyId);
+ AssertNotRendered(removeId);
+ AssertNotRendered(firstId);
+ AssertNotRendered(lastId);
+ AssertNotRendered(downId);
+ AssertNotRendered(upId);
+ }
+ }
+
+ private void _checkOrdering(String listId, String first, String second, String fird,
String errorMessage) {
+ try {
+ if (first != null)
+ _checkItemText(first, listId, 0);
+ if (second != null) {
+ _checkItemText(second, listId, 1);
+ }
+ if (fird != null) {
+ _checkItemText(fird, listId, 2);
+ }
+ } catch (Exception e) {
+ writeStatus(errorMessage, true);
+ Assert.fail(errorMessage + e.getMessage());
+ }
+ }
+
+ private void reset() {
+ clickAjaxCommandAndWait(resetId);
+ }
+
+ private void _assertTableRowsCount(String tbId, int rows) {
+ writeStatus("Check items count for list id : " + tbId);
+ StringBuffer b = new StringBuffer("$('");
+ b.append(tbId);
+ b.append("').rows.length");
+ String l = runScript(b.toString());
+ int r;
+ try {
+ r = Integer.parseInt(l);
+ if (r != rows) {
+ writeStatus("Incorrect list item count in table id: " + tbId,
true);
+ Assert.fail("Incorrect list item count in table id: " + tbId);
+ }
+ } catch (Exception e) {
+ writeStatus("List shuttle test failed. Cause: " + e.getMessage(),
true);
+ Assert.fail("List shuttle test failed. Cause: " + e);
+ }
+ }
+
+ private void _doItemAction(String itemId, String actionId, String actionName) {
+ writeStatus(actionName + " the item id: " + itemId);
+ _selectItem(itemId);
+ clickById(actionId);
+ }
+
+ private void _checkDataPost2Server(int availableCount, int targetCount) {
+ writeStatus("Rerender form. List items should be changed.");
+ clickAjaxCommandAndWait(submitId);
+
+ try {
+ _assertTableRowsCount(availebleListId, availableCount);
+ _assertTableRowsCount(targetListId, targetCount);
+ } catch (Exception e) {
+ writeStatus("Data was post to server incorrectly. List data before
rerendering does not match after", true);
+ Assert
+ .fail("Data was post to server incorrectly. List data before
rerendering does not match after. Cause: "
+ + e);
+ }
+ }
+
+ private void _selectItem(String itemId) {
+ writeStatus("Select item id: " + itemId);
+ try {
+ fireMouseEvent(itemId, "click", 0, 0, false);
+ } catch (Exception e) {
+ writeStatus("Selection item id: " + itemId + "
failed.");
+ Assert.fail("No item was found. Item id: " + itemId + e);
+ }
+ }
+
+ private void _checkItemText(String text, String listId, int i) {
+ StringBuffer b = new StringBuffer("$('");
+ b.append(listId);
+ b.append("').rows[");
+ b.append(i);
+ b.append("].id");
+
+ String id = null;
+ try {
+ id = runScript(b.toString());
+ AssertTextEquals(id, text, "Invalid item's text");
+ } catch (Exception e) {
+ writeStatus("Invalid item text. Item id: " + id);
+ Assert.fail("Invalid item text. Item id: " + id);
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.richfaces.SeleniumTestBase#getTestUrl()
+ */
+ @Override
+ public String getTestUrl() {
+ return "pages/listShuttle/listShuttleTest.xhtml";
+ }
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ListShuttleTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/LoadScriptTest.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/LoadScriptTest.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/LoadScriptTest.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,25 @@
+package org.richfaces.testng;
+
+import static org.testng.Assert.assertEquals;
+
+import org.ajax4jsf.template.Template;
+import org.richfaces.SeleniumTestBase;
+import org.testng.annotations.Test;
+
+public class LoadScriptTest extends SeleniumTestBase {
+
+ @Test
+ public void testLoadScriptComponent(Template template) throws Exception {
+ renderPage(template);
+ String jsCall = "summarize(%1$s, %2$s);";
+ int opr1 = 1;
+ int opr2 = 2;
+ String result = runScript(String.format(jsCall, opr1, opr2));
+ assertEquals(Integer.parseInt(result), opr1 + opr2);
+ }
+
+ public String getTestUrl() {
+ return "pages/loadScript/loadScriptTest.xhtml";
+ }
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/LoadScriptTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/LoadStyleTest.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/LoadStyleTest.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/LoadStyleTest.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,24 @@
+package org.richfaces.testng;
+
+
+import static org.testng.Assert.assertEquals;
+
+import org.ajax4jsf.template.Template;
+import org.richfaces.SeleniumTestBase;
+import org.testng.annotations.Test;
+
+public class LoadStyleTest extends SeleniumTestBase {
+
+ @Test
+ public void testLoadStyleComponent(Template template) {
+ renderPage(template);
+ String divId = getParentId() + "rectangle";
+ assertEquals(50, getWidthById(divId));
+ assertEquals(100, getHeightById(divId));
+ }
+
+ public String getTestUrl() {
+ return "pages/loadStyle/loadStyleTest.xhtml";
+ }
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/LoadStyleTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ModalPanelTest.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ModalPanelTest.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ModalPanelTest.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,157 @@
+/*
+ * ModalPanelTest.java Date created: 30.07.2008
+ * Last modified by: $Author$
+ * $Revision$ $Date$
+ */
+
+package org.richfaces.testng;
+
+import org.ajax4jsf.template.Template;
+import org.richfaces.SeleniumTestBase;
+import org.testng.annotations.Test;
+
+/**
+ * rich:modalPannel component selenium test
+ * @author Alexandr Levkovsky
+ *
+ */
+public class ModalPanelTest extends SeleniumTestBase {
+
+ private final static String PANEL_ID="test_panel";
+ private final static String FORM_ID="form:";
+ private final static String RESET_ID="reset";
+ private final static String CHANGE_RENDERED_ID="change_rendered";
+ private final static String CHANGE_ATTRIBUTES_ID="change_attributes";
+ private final static String HIDE_ID="hide";
+ private final static String SHOW_ID="show";
+ private final static String PANEL_C_DIV_ID = PANEL_ID + "CDiv";
+ private final static String PANEL_CONTENT_DIV_ID = PANEL_ID +
"ContentDiv";
+ private final static String PANEL_CONTAINER_DIV_ID = PANEL_ID +
"Container";
+
+
+ /**
+ * @see org.richfaces.SeleniumTestBase#getTestUrl()
+ */
+ @Override
+ public String getTestUrl() {
+ return "pages/modalPanel/modalPanelTest.xhtml";
+ }
+
+ @Test
+ public void testModalPanel(Template template) throws Exception {
+ renderPage(template);
+ writeStatus("Testing modal panel");
+
+ String panelId = getParentId() + FORM_ID + PANEL_CONTAINER_DIV_ID;
+
+ AssertPresent(panelId);
+ AssertNotVisible(panelId);
+
+ clickShow();
+
+ AssertPresent(panelId);
+ AssertVisible(panelId);
+
+ clickHide();
+
+ AssertPresent(panelId);
+ AssertNotVisible(panelId);
+
+ }
+
+ @Test
+ public void testRenderedAttribute(Template template) throws Exception {
+ renderPage(template);
+ writeStatus("Testing rendered attribute");
+
+ String panelId = getParentId() + FORM_ID + PANEL_CONTAINER_DIV_ID;
+
+ AssertPresent(panelId);
+
+ clickChangeRendered();
+
+ AssertNotPresent(panelId);
+ clickReset();
+ }
+
+ @Test
+ public void testShowWhenRenderedAttribute(Template template) throws Exception {
+ renderPage(template);
+ writeStatus("Testing showWhenRendered attribute");
+
+ String panelId = getParentId() + FORM_ID + PANEL_CONTAINER_DIV_ID;
+
+ AssertPresent(panelId);
+ AssertNotVisible(panelId);
+
+ clickChangeAttributes();
+
+ AssertPresent(panelId);
+ AssertVisible(panelId);
+ clickReset();
+ }
+
+ @Test
+ public void testLayoutAttributes(Template template) throws Exception {
+ renderPage(template);
+ writeStatus("Testing layout attribute");
+
+ clickShow();
+
+ String panelContainerId = getParentId() + FORM_ID + PANEL_CONTAINER_DIV_ID;
+ String panelContentId = getParentId() + FORM_ID + PANEL_CONTENT_DIV_ID;
+ String panelCDivId = getParentId() + FORM_ID + PANEL_C_DIV_ID;
+
+ AssertPresent(panelContainerId);
+ AssertPresent(panelContentId);
+ AssertPresent(panelCDivId);
+
+ // test zindex attribute - should be 12
+ assertStyleAttribute(panelContainerId, "z-index: 12");
+
+ if (isFF()) {
+ // test top attribute - should be 101
+ assertStyleAttribute(panelCDivId, "top: 101");
+
+ // test left attribute - should be 102
+ assertStyleAttribute(panelCDivId, "left: 102");
+ }
+
+ // test width attribute - should be 103
+ assertStyleAttribute(panelContentId, "width: 103");
+
+ // test height attribute - should be 104
+ assertStyleAttribute(panelContentId, "height: 104");
+ }
+
+ private void clickReset() {
+ String buttonId = getParentId() + FORM_ID + RESET_ID;
+ writeStatus("Click reset button");
+ clickCommandAndWait(buttonId);
+ }
+
+ private void clickChangeRendered() {
+ String buttonId = getParentId() + FORM_ID + CHANGE_RENDERED_ID;
+ writeStatus("Click change rendered button");
+ clickCommandAndWait(buttonId);
+ }
+
+ private void clickChangeAttributes() {
+ String buttonId = getParentId() + FORM_ID + CHANGE_ATTRIBUTES_ID;
+ writeStatus("Click change attributes button");
+ clickCommandAndWait(buttonId);
+ }
+
+ private void clickShow() {
+ String buttonId = getParentId() + FORM_ID + SHOW_ID;
+ writeStatus("Click show button");
+ clickById(buttonId);
+ }
+
+ private void clickHide() {
+ String buttonId = getParentId() + FORM_ID + HIDE_ID;
+ writeStatus("Click hide button");
+ clickById(buttonId);
+ }
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ModalPanelTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/OrderingListTest.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/OrderingListTest.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/OrderingListTest.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,205 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library 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 library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.testng;
+
+import org.ajax4jsf.template.Template;
+import org.richfaces.SeleniumTestBase;
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+public class OrderingListTest extends SeleniumTestBase {
+ private String firstButton;
+
+ private String firstButtonDisabled;
+
+ private String upButton;
+
+ private String upButtonDisabled;
+
+ private String downButton;
+
+ private String downButtonDisabled;
+
+ private String lastButton;
+
+ private String lastButtonDisabled;
+
+ private String firstRow;
+
+ private String actionResultText;
+
+ private String ajax;
+
+ private String server;
+
+ private String thirdRow;
+
+ private String selectionText;
+
+ private String activeItemText;
+
+ @Test
+ public void testButtons(Template template) {
+ renderPage(template);
+ initFields();
+
+ writeStatus("Check if all buttons are disabled first time");
+ checkButtons(true, true, true, true);
+
+ writeStatus("Click on first row");
+ fireMouseEvent(firstRow, "click", 0, 0, false);
+ checkButtons(true, true, false, false);
+
+ writeStatus("Click on down button");
+ Assert.assertEquals(selenium.getElementIndex("id=" + firstRow), 0);
+ clickById(downButton);
+ checkButtons(false, false, false, false);
+ Assert.assertEquals(selenium.getElementIndex("id=" + firstRow), 1);
+
+ writeStatus("Click on last button");
+ clickById(lastButton);
+ checkButtons(false, false, true, true);
+ Assert.assertEquals(selenium.getElementIndex("id=" + firstRow), 3);
+
+ writeStatus("Click on first button");
+ clickById(firstButton);
+ checkButtons(true, true, false, false);
+ Assert.assertEquals(selenium.getElementIndex("id=" + firstRow), 0);
+ }
+
+ @Test
+ public void testActions(Template template) {
+ renderPage(template);
+ initFields();
+
+ writeStatus("Select two rows");
+
+ fireMouseEvent(firstRow, "click", 0, 0, false);
+ fireMouseEvent(thirdRow, "click", 0, 0, true);
+ checkButtons(true, true, false, false);
+
+ writeStatus("Click on ajax button");
+ clickById(ajax);
+ waitForAjaxCompletion();
+ AssertTextEquals(actionResultText, "item0");
+ AssertTextEquals(selectionText, "item0,item2");
+ //AssertTextEquals(activeItemText, "Item [item0]");
+
+ writeStatus("Select one row");
+ fireMouseEvent(firstRow, "click", 0, 0, false);
+ writeStatus("Click on server link");
+ clickCommandAndWait(server);
+ AssertTextEquals(actionResultText, "item1");
+ AssertTextEquals(selectionText, "item0");
+ //AssertTextEquals(activeItemText, "Item [item0]");
+ checkButtons(true, true, false, false);
+ }
+
+ @Test
+ public void testJSFunctions(Template template) {
+ renderPage(template);
+ initFields();
+
+ writeStatus("Select one row");
+ fireMouseEvent(thirdRow, "click", 0, 0, false);
+
+ writeStatus("Check if 'onupclick' event works");
+ clickById(upButton);
+ Assert.assertEquals(runScript("theLatestEvent"), "up
orderchanged");
+
+ writeStatus("Check if 'ondownclick' event works");
+ clickById(downButton);
+ Assert.assertEquals(runScript("theLatestEvent"), "down
orderchanged");
+
+ writeStatus("Check if 'ontopclick' event works");
+ clickById(firstButton);
+ Assert.assertEquals(runScript("theLatestEvent"), "top
orderchanged");
+
+ writeStatus("Check if 'onbottomclick' event works");
+ clickById(lastButton);
+ Assert.assertEquals(runScript("theLatestEvent"), "bottom
orderchanged");
+ }
+
+ private void checkButtons(boolean firstDisabled, boolean upDisabled, boolean
downDisabled, boolean lastDisabled) {
+ if (firstDisabled) {
+ Assert.assertTrue(isVisibleById(firstButtonDisabled));
+ Assert.assertFalse(isVisibleById(firstButton));
+ } else {
+ Assert.assertFalse(isVisibleById(firstButtonDisabled));
+ Assert.assertTrue(isVisibleById(firstButton));
+ }
+
+ if (upDisabled) {
+ Assert.assertTrue(isVisibleById(upButtonDisabled));
+ Assert.assertFalse(isVisibleById(upButton));
+ } else {
+ Assert.assertFalse(isVisibleById(upButtonDisabled));
+ Assert.assertTrue(isVisibleById(upButton));
+ }
+
+ if (downDisabled) {
+ Assert.assertTrue(isVisibleById(downButtonDisabled));
+ Assert.assertFalse(isVisibleById(downButton));
+ } else {
+ Assert.assertFalse(isVisibleById(downButtonDisabled));
+ Assert.assertTrue(isVisibleById(downButton));
+ }
+
+ if (lastDisabled) {
+ Assert.assertTrue(isVisibleById(lastButtonDisabled));
+ Assert.assertFalse(isVisibleById(lastButton));
+ } else {
+ Assert.assertFalse(isVisibleById(lastButtonDisabled));
+ Assert.assertTrue(isVisibleById(lastButton));
+ }
+ }
+
+ private void initFields() {
+ String parentId = getParentId() + "_form:orderingList";
+
+ firstButton = parentId + "first";
+ firstButtonDisabled = parentId + "disfirst";
+
+ upButton = parentId + "up";
+ upButtonDisabled = parentId + "disup";
+
+ downButton = parentId + "down";
+ downButtonDisabled = parentId + "disdown";
+
+ lastButton = parentId + "last";
+ lastButtonDisabled = parentId + "dislast";
+
+ firstRow = parentId + ":0";
+ thirdRow = parentId + ":2";
+
+ actionResultText = getParentId() + "_form:actionResult";
+ selectionText = getParentId() + "_form:selection";
+ activeItemText = getParentId() + "_form:activeItem";
+ ajax = firstRow + ":_ajax";
+ server = parentId + ":1:_server";
+ }
+
+ public String getTestUrl() {
+ return "pages/orderingList/orderingListTest.xhtml";
+ }
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/OrderingListTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/PanelBarTest.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/PanelBarTest.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/PanelBarTest.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,76 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library 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 library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.testng;
+
+import org.ajax4jsf.template.Template;
+import org.richfaces.SeleniumTestBase;
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+public class PanelBarTest extends SeleniumTestBase {
+
+ @Test
+ public void testPanelBarComponent(Template template) {
+ renderPage(template);
+ String parentId = getParentId() + "_form:";
+
+ String label2 = parentId + "label2";
+ String label3 = parentId + "label3";
+
+ String output1 = parentId + "output1";
+ String output2 = parentId + "output2";
+ String output3 = parentId + "output3";
+
+ String ajaxButton = parentId + "button_ajax";
+ String simpleButton = parentId + "button_simple";
+
+ writeStatus("Click on label two. It should be opened.");
+ clickById(label2);
+ Assert.assertFalse(isVisibleById(output1));
+ Assert.assertTrue(isVisibleById(output2));
+ Assert.assertFalse(isVisibleById(output3));
+
+ writeStatus("Click on simple commandButton. Opened states should not change
after page reloaded.");
+ clickCommandAndWait(simpleButton);
+ Assert.assertFalse(isVisibleById(output1));
+ Assert.assertTrue(isVisibleById(output2));
+ Assert.assertFalse(isVisibleById(output3));
+
+ writeStatus("Click on label three. It should be opened.");
+ clickById(label3);
+ Assert.assertFalse(isVisibleById(output1));
+ Assert.assertFalse(isVisibleById(output2));
+ Assert.assertTrue(isVisibleById(output3));
+
+ writeStatus("Click on ajax commandButton. Opened states should not
change.");
+ clickById(ajaxButton);
+ waitForAjaxCompletion();
+ Assert.assertFalse(isVisibleById(output1));
+ Assert.assertFalse(isVisibleById(output2));
+ Assert.assertTrue(isVisibleById(output3));
+ }
+
+ public String getTestUrl() {
+ return "pages/panelBar/panelBarTest.xhtml";
+ }
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/PanelBarTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/PanelMenuTest.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/PanelMenuTest.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/PanelMenuTest.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,245 @@
+package org.richfaces.testng;
+
+import org.ajax4jsf.template.Template;
+import org.richfaces.SeleniumTestBase;
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+public class PanelMenuTest extends SeleniumTestBase {
+
+ @Test
+ public void testPanelMenuClientAPI(Template template) {
+ renderPage(template);
+
+ String form1 = getParentId() + "_form1:";
+ String form2 = getParentId() + "_form2:";
+
+ String group = form1 + "pGroup3";
+ String sigleGroup = form2 + "pGroup3_single";
+
+ String ajaxItem = "tablehide" + form1 + "pItem1";
+ String serverItem = "tablehide" + form1 + "pItem2";
+ String clientItem = "tablehide" + form1 + "pItem3";
+
+ writeStatus("Test expand JS API method for ajax multiple panel
menu.");
+ selenium.runScript("$('" + group +
"').component.expand()");
+ Assert.assertFalse(isVisibleById(ajaxItem));
+ Assert.assertFalse(isVisibleById(serverItem));
+ Assert.assertTrue(isVisibleById(clientItem));
+
+ writeStatus("Test collapse JS API method for ajax multiple panel
menu.");
+ selenium.runScript("$('" + group +
"').component.collapse()");
+ Assert.assertFalse(isVisibleById(ajaxItem));
+ Assert.assertFalse(isVisibleById(serverItem));
+ Assert.assertFalse(isVisibleById(clientItem));
+
+ ajaxItem = "tablehide" + form2 + "pItem1_single";
+ serverItem = "tablehide" + form2 + "pItem2_single";
+ clientItem = "tablehide" + form2 + "pItem3_single";
+
+ writeStatus("Test expand JS API method for ajax single panel menu.");
+ selenium.runScript("$('" + sigleGroup +
"').component.expand()");
+ Assert.assertFalse(isVisibleById(ajaxItem));
+ Assert.assertFalse(isVisibleById(serverItem));
+ Assert.assertTrue(isVisibleById(clientItem));
+
+ writeStatus("Test collapse JS API method for ajax single panel
menu.");
+ selenium.runScript("$('" + sigleGroup +
"').component.collapse()");
+ Assert.assertFalse(isVisibleById(ajaxItem));
+ Assert.assertFalse(isVisibleById(serverItem));
+ Assert.assertFalse(isVisibleById(clientItem));
+
+ tearDown();
+ }
+
+ @Test
+ public void testPanelMenuComponent(Template template) {
+ renderPage(template);
+ String parentId = getParentId() + "_form1:";
+
+ String value1Id = getParentId() + "_value";
+ String value2Id = getParentId() + "_value2";
+
+ String ajaxGroup = "tablehide" + parentId + "pGroup1";
+ String serverGroup = "tablehide" + parentId + "pGroup2";
+ String clientGroup = "tablehide" + parentId + "pGroup3";
+ String disabledGroup = "tablehide" + parentId + "pGroup4";
+
+ String ajaxItem = "tablehide" + parentId + "pItem1";
+ String serverItem = "tablehide" + parentId + "pItem2";
+ String clientItem = "tablehide" + parentId + "pItem3";
+ String disabledItem = "tablehide" + parentId + "pItem4";
+
+ writeStatus("Click on ajax group");
+ clickById(ajaxGroup);
+ waitForAjaxCompletion();
+ AssertTextEquals(value1Id, "pGroup1");
+ AssertTextEquals(value2Id, "1");
+ Assert.assertTrue(isVisibleById(ajaxItem));
+ Assert.assertFalse(isVisibleById(serverItem));
+ Assert.assertFalse(isVisibleById(clientItem));
+
+ writeStatus("Click on server group");
+ clickCommandAndWait(serverGroup);
+ AssertTextEquals(value1Id, "pGroup2");
+ AssertTextEquals(value2Id, "2");
+ Assert.assertTrue(isVisibleById(ajaxItem));
+ Assert.assertTrue(isVisibleById(serverItem));
+ Assert.assertFalse(isVisibleById(clientItem));
+
+ writeStatus("Click on ajax group");
+ clickById(ajaxGroup);
+ waitForAjaxCompletion();
+ AssertTextEquals(value1Id, "pGroup1");
+ AssertTextEquals(value2Id, "3");
+ Assert.assertFalse(isVisibleById(ajaxItem));
+ Assert.assertTrue(isVisibleById(serverItem));
+ Assert.assertFalse(isVisibleById(clientItem));
+
+ writeStatus("Click on server group");
+ clickCommandAndWait(serverGroup);
+
+ AssertTextEquals(value1Id, "pGroup2");
+ AssertTextEquals(value2Id, "4");
+ Assert.assertFalse(isVisibleById(ajaxItem));
+ Assert.assertFalse(isVisibleById(serverItem));
+ Assert.assertFalse(isVisibleById(clientItem));
+
+ writeStatus("Click on client group");
+ clickById(clientGroup);
+ Assert.assertFalse(isVisibleById(ajaxItem));
+ Assert.assertFalse(isVisibleById(serverItem));
+ Assert.assertTrue(isVisibleById(clientItem));
+
+ writeStatus("Click on client group");
+ clickById(clientGroup);
+ Assert.assertFalse(isVisibleById(ajaxItem));
+ Assert.assertFalse(isVisibleById(serverItem));
+ Assert.assertFalse(isVisibleById(clientItem));
+
+ writeStatus("Click on disabled client group");
+ clickById(disabledGroup);
+ Assert.assertFalse(isVisibleById(disabledItem));
+
+ tearDown();
+ }
+
+ @Test
+ public void testPanelMenuComponentSingleMode(Template template) {
+ renderPage(template);
+ String parentId = getParentId() + "_form2:";
+
+ String value1Id = getParentId() + "_value";
+ String value2Id = getParentId() + "_value2";
+
+ String ajaxGroup = "tablehide" + parentId +
"pGroup1_single";
+ String serverGroup = "tablehide" + parentId +
"pGroup2_single";
+ String clientGroup = "tablehide" + parentId +
"pGroup3_single";
+ String disabledGroup = "tablehide" + parentId +
"pGroup4_single";
+
+ String ajaxItem = "tablehide" + parentId + "pItem1_single";
+ String serverItem = "tablehide" + parentId +
"pItem2_single";
+ String clientItem = "tablehide" + parentId +
"pItem3_single";
+ String disabledItem = "tablehide" + parentId +
"pItem4_single";
+
+ writeStatus("Click on ajax group");
+ clickById(ajaxGroup);
+ waitForAjaxCompletion();
+ AssertTextEquals(value1Id, "pGroup1_single");
+ AssertTextEquals(value2Id, "1");
+ Assert.assertTrue(isVisibleById(ajaxItem));
+ Assert.assertFalse(isVisibleById(serverItem));
+ Assert.assertFalse(isVisibleById(clientItem));
+
+ writeStatus("Click on server group");
+ clickCommandAndWait(serverGroup);
+ AssertTextEquals(value1Id, "pGroup2_single");
+ AssertTextEquals(value2Id, "2");
+ Assert.assertFalse(isVisibleById(ajaxItem));
+ Assert.assertTrue(isVisibleById(serverItem));
+ Assert.assertFalse(isVisibleById(clientItem));
+
+ writeStatus("Click on ajax group");
+ clickById(ajaxGroup);
+ waitForAjaxCompletion();
+ AssertTextEquals(value1Id, "pGroup1_single");
+ AssertTextEquals(value2Id, "3");
+ Assert.assertTrue(isVisibleById(ajaxItem));
+ Assert.assertFalse(isVisibleById(serverItem));
+ Assert.assertFalse(isVisibleById(clientItem));
+
+ writeStatus("Click on server group");
+ clickCommandAndWait(serverGroup);
+ AssertTextEquals(value1Id, "pGroup2_single");
+ AssertTextEquals(value2Id, "4");
+ Assert.assertFalse(isVisibleById(ajaxItem));
+ Assert.assertTrue(isVisibleById(serverItem));
+ Assert.assertFalse(isVisibleById(clientItem));
+
+ writeStatus("Click on client group");
+ clickById(clientGroup);
+ Assert.assertFalse(isVisibleById(ajaxItem));
+ Assert.assertFalse(isVisibleById(serverItem));
+ Assert.assertTrue(isVisibleById(clientItem));
+
+ writeStatus("Click on client group");
+ clickById(clientGroup);
+ Assert.assertFalse(isVisibleById(ajaxItem));
+ Assert.assertFalse(isVisibleById(serverItem));
+ Assert.assertFalse(isVisibleById(clientItem));
+
+ writeStatus("Click on disabled client group");
+ clickById(disabledGroup);
+ Assert.assertFalse(isVisibleById(disabledItem));
+
+ tearDown();
+ }
+
+ @Test
+ public void testPanelMenuItemAction(Template template) {
+ renderPage(template);
+ String parentId = getParentId() + "_form";
+
+ String value1Id = getParentId() + "_value";
+ String value2Id = getParentId() + "_value2";
+
+ String group = "tablehide" + parentId + "1:pGroup1";
+ String groupSingle = "tablehide" + parentId +
"2:pGroup1_single";
+
+ String item = "tablehide" + parentId + "1:pItem1";
+ String itemSingle = "tablehide" + parentId +
"2:pItem1_single";
+
+ writeStatus("Click on ajax group");
+ clickById(group);
+ waitForAjaxCompletion();
+ AssertTextEquals(value1Id, "pGroup1");
+
+ writeStatus("Click on ajax group");
+ clickById(groupSingle);
+ waitForAjaxCompletion();
+ AssertTextEquals(value1Id, "pGroup1_single");
+
+ writeStatus("Click on server group");
+ clickCommandAndWait(item);
+ AssertTextEquals(value1Id, "pItem1");
+ AssertTextEquals(value2Id, "1");
+
+ writeStatus("Click on server group");
+ clickCommandAndWait(itemSingle);
+ AssertTextEquals(value1Id, "pItem1_single");
+ AssertTextEquals(value2Id, "2");
+
+ tearDown();
+ }
+
+ public String getTestUrl() {
+ return "pages/panelMenu/panelMenuTest.xhtml";
+ }
+
+ private void tearDown() {
+ writeStatus("Clean bean values");
+ clickById(getParentId() + "_form2:clean");
+ waitForAjaxCompletion();
+ }
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/PanelMenuTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/PickListTest.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/PickListTest.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/PickListTest.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,116 @@
+package org.richfaces.testng;
+
+import org.ajax4jsf.template.Template;
+import org.richfaces.SeleniumTestBase;
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+public class PickListTest extends SeleniumTestBase {
+
+ private static final String PICK_LIST = "pickList";
+ private static final String COPY_BTN = "copy";
+ private static final String COPY_ALL_BTN = "copyAll";
+ private static final String REMOVE_BTN = "remove";
+ private static final String REMOVE_ALL_BTN = "removeAll";
+ private static final String SRC_ELEM_PREFIX = ":source::";
+
+ @Test
+ public void testPickListComponent(Template template) {
+ renderPage(template);
+
+ String parentId = getParentId() + "_form:";
+ String pickListId = parentId + PICK_LIST;
+
+ String copyElemId = pickListId + COPY_BTN;
+ String copyAllElemId = pickListId + COPY_ALL_BTN;
+ String removeElemId = pickListId + REMOVE_BTN;
+ String removeAllElemId = pickListId + REMOVE_ALL_BTN;
+
+ writeStatus("Check move controls customized labels");
+
+ AssertTextEquals(copyElemId, "MOVE");
+ AssertTextEquals(copyAllElemId, "MOVE ALL");
+ AssertTextEquals(removeElemId, "TAKE AWAY");
+ AssertTextEquals(removeAllElemId, "TAKE ALL AWAY");
+
+ String destListId = parentId + PICK_LIST + "tlTbody";
+ String srcListId = parentId + PICK_LIST + "tbody";
+
+ writeStatus("Check initial disposition");
+
+ Assert.assertEquals(getNumberOfChildren(srcListId), 6);
+ Assert.assertEquals(getNumberOfChildren(destListId), 2);
+
+ writeStatus("Verify initial selected items.");
+
+ Assert.assertEquals(selenium.getText("xpath=//tbody[@id='" +
destListId + "']/tr[1]"), "ZHURIK");
+ Assert.assertEquals(selenium.getText("xpath=//tbody[@id='" +
destListId + "']/tr[2]"), "MELESHKO");
+
+ writeStatus("Check buttons state");
+
+ assertButtonEnabled(COPY_ALL_BTN);
+ assertButtonDisabled(COPY_BTN);
+ assertButtonDisabled(REMOVE_BTN);
+ assertButtonEnabled(REMOVE_ALL_BTN);
+
+ writeStatus("Try to move the first item and check state thereafter");
+
+ String srcElemPrefix = parentId + PICK_LIST + SRC_ELEM_PREFIX;
+ fireMouseEvent(srcElemPrefix + "1", "click", 0, 0, false);
+ clickById(copyElemId);
+
+ Assert.assertEquals(getNumberOfChildren(srcListId), 5);
+ Assert.assertEquals(getNumberOfChildren(destListId), 3);
+ Assert.assertEquals(selenium.getText("xpath=//tbody[@id='" +
destListId + "']/tr[3]"), "LEONTIEV");
+
+ writeStatus("Test 'MOVE ALL' button");
+
+ clickById(copyAllElemId);
+
+ Assert.assertEquals(getNumberOfChildren(srcListId), 0);
+ Assert.assertEquals(getNumberOfChildren(destListId), 8);
+
+ assertButtonDisabled(COPY_ALL_BTN);
+ assertButtonDisabled(COPY_BTN);
+ assertButtonDisabled(REMOVE_BTN);
+ assertButtonEnabled(REMOVE_ALL_BTN);
+
+ writeStatus("Test 'REMOVE ALL' button");
+
+ clickById(removeAllElemId);
+
+ Assert.assertEquals(getNumberOfChildren(srcListId), 8);
+ Assert.assertEquals(getNumberOfChildren(destListId), 0);
+
+ assertButtonEnabled(COPY_ALL_BTN);
+ assertButtonDisabled(COPY_BTN);
+ assertButtonDisabled(REMOVE_BTN);
+ assertButtonDisabled(REMOVE_ALL_BTN);
+ }
+
+ private void assertButtonEnabled(String btnId) {
+ String id = getParentId() + "_form:" + PICK_LIST;
+ Assert.assertTrue(isVisibleById(id + btnId));
+ Assert.assertFalse(isVisibleById(id + "dis" + btnId));
+ }
+
+ private void assertButtonDisabled(String btnId) {
+ String id = getParentId() + "_form:" + PICK_LIST;
+ Assert.assertFalse(isVisibleById(id + btnId));
+ Assert.assertTrue(isVisibleById(id + "dis" + btnId));
+ }
+
+ /**
+ * Returns number of children for DOM element with given id.
+ * @param elemId DOM element id
+ * @return number of children
+ */
+ private int getNumberOfChildren(String elemId) {
+ return selenium.getXpathCount("//*[@id='" + elemId +
"']/*").intValue();
+ }
+
+ public String getTestUrl() {
+ return "pages/pickList/pickListTest.xhtml";
+ }
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/PickListTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ProgressBarTest.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ProgressBarTest.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ProgressBarTest.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,107 @@
+package org.richfaces.testng;
+
+import org.ajax4jsf.template.Template;
+import org.richfaces.SeleniumTestBase;
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+public class ProgressBarTest extends SeleniumTestBase {
+
+ @Test
+ public void testProgressBarComponent(Template template) {
+
+ renderPage(template);
+
+ String parentId = getParentId() + "_form:";
+
+ String progressBarId = parentId + "progressBar1";
+ int value = getProgressBarValue(progressBarId);
+ Assert.assertTrue(value < 0, "Progress value should be negative");
+ String text = getTextById(progressBarId);
+ writeStatus("Check if process not started");
+ Assert.assertTrue(text.startsWith("Process not started"), "Initial
facet does not appear");
+
+ writeStatus("Enable polling");
+ enableProgressBar(progressBarId, true);
+
+ pause(5000, progressBarId);
+
+ writeStatus("Disable polling");
+ enableProgressBar(progressBarId, false);
+
+ writeStatus("Check label");
+ text = getTextById(progressBarId + ":remain");
+ Assert.assertTrue(text.endsWith("%"), "Percent label doesnot
appear");
+
+ writeStatus("Check value");
+ value = getProgressBarValue(progressBarId);
+ Assert.assertTrue(value > 0, "Progress value should be positive");
+
+ writeStatus("Enable polling");
+ enableProgressBar(progressBarId, true);
+
+ pause(5000, progressBarId);
+ writeStatus("Check value");
+ Assert.assertTrue((getProgressBarValue(progressBarId).intValue() != value),
+ "Progress has been terminated abnormal");
+
+ writeStatus("Disable polling");
+ enableProgressBar(progressBarId, false);
+
+ value = getProgressBarValue(progressBarId);
+ pause(1500, progressBarId);
+ writeStatus("Check value");
+ Assert.assertTrue(getProgressBarValue(progressBarId) == value,
+ "Progress didnt stop after progressBar disabling");
+
+ clickById(parentId + "_complete");
+ waitForAjaxCompletion();
+ writeStatus("Check if process completed");
+ text = getTextById(progressBarId);
+ Assert.assertTrue(text.startsWith("Process completed"), "Comlete
facet does not appear");
+
+ // - Test client mode
+
+ writeStatus("Check value");
+ progressBarId = parentId + "progressBar2";
+ value = getProgressBarValue(progressBarId);
+ Assert.assertTrue(value == -5, "Progress value should be -5 ");
+
+ text = getTextById(progressBarId);
+ writeStatus("Check if process not started");
+ Assert.assertTrue(text.startsWith("Process not started"), "Initial
facet does not appear");
+
+ setProgressBarValue(progressBarId, 20);
+ value = getProgressBarValue(progressBarId);
+ writeStatus("Check value");
+ Assert.assertTrue(value == 20, "Progress value should be 20 ");
+
+ setProgressBarValue(progressBarId, 60);
+ value = getProgressBarValue(progressBarId);
+ writeStatus("Check value");
+ Assert.assertTrue(value == 60, "Progress value should be 60");
+
+ clickById(parentId + "_reset");
+ waitForAjaxCompletion();
+
+ }
+
+ private void enableProgressBar(String id, boolean enable) {
+ invokeFromComponent(id, (enable ? "enable" : "disable"),
null);
+ }
+
+ private void setProgressBarValue(String id, Object value) {
+ invokeFromComponent(id, "setValue", value);
+ }
+
+ private Integer getProgressBarValue(String id) {
+ String value = invokeFromComponent(id, "getValue", null); //
runScript(script.toString());
+ Integer v = Integer.parseInt(value);
+ return v;
+ }
+
+ public String getTestUrl() {
+ return "pages/progressBar/progressBarTest.xhtml";
+ }
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ProgressBarTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/SimpleTogglePanelTest.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/SimpleTogglePanelTest.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/SimpleTogglePanelTest.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,84 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library 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 library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.testng;
+
+import org.ajax4jsf.template.Template;
+import org.richfaces.SeleniumTestBase;
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+public class SimpleTogglePanelTest extends SeleniumTestBase {
+
+ @Test
+ public void _testSimpleTogglePanelComponent(Template template) {
+ renderPage(template);
+ String parentId = getParentId() + "_form:";
+ String inputId = parentId + "_value";
+ String outputId = parentId + "_value2";
+
+ String ajaxHeader = parentId + "panel1_header";
+ String serverHeader = parentId + "panel2_header";
+ String clientHeader = parentId + "panel3_header";
+
+ String ajaxBody = parentId + "panel1_body";
+ String serverBody = parentId + "panel2_body";
+ String clientBody = parentId + "panel3_body";
+
+ writeStatus("Click on client simple toggle panel. It should be
opened.");
+ clickById(clientHeader);
+ Assert.assertTrue(isVisibleById(clientBody));
+ writeStatus("Click on client simple toggle panel again. It should be
closed.");
+ clickById(clientHeader);
+ Assert.assertFalse(isVisibleById(clientBody));
+
+ writeStatus("Click on ajax simple toggle panel. It should be
opened.");
+ clickById(ajaxHeader);
+ waitForAjaxCompletion();
+ AssertValueEquals(inputId, "panel1");
+ AssertTextEquals(outputId, "1");
+ Assert.assertTrue(isVisibleById(ajaxBody));
+
+ writeStatus("Click on ajax simple toggle panel again. It should be
closed.");
+ clickById(ajaxHeader);
+ waitForAjaxCompletion();
+ AssertValueEquals(inputId, "panel1");
+ AssertTextEquals(outputId, "2");
+ Assert.assertFalse(isVisibleById(ajaxBody));
+
+ writeStatus("Click on server simple toggle panel. It should be
opened.");
+ clickCommandAndWait(serverHeader);
+ AssertValueEquals(inputId, "panel2");
+ AssertTextEquals(outputId, "3");
+ Assert.assertTrue(isVisibleById(serverBody));
+
+ writeStatus("Click on server simple toggle panel. It should be
closed.");
+ clickCommandAndWait(serverHeader);
+ AssertValueEquals(inputId, "panel2");
+ AssertTextEquals(outputId, "4");
+ Assert.assertFalse(isVisibleById(serverBody));
+ }
+
+ public String getTestUrl() {
+ return "pages/simpleTogglePanel/simpleTogglePanel.xhtml";
+ }
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/SimpleTogglePanelTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/SpacerTest.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/SpacerTest.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/SpacerTest.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,94 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library 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 library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.testng;
+
+import org.ajax4jsf.template.Template;
+import org.richfaces.SeleniumTestBase;
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+public class SpacerTest extends SeleniumTestBase {
+
+ @Test
+ public void testSimpleTogglePanelComponent(Template template) {
+ renderPage(template);
+ String parentId = getParentId();
+ String spacerId = parentId + "sp";
+
+ writeStatus("Check width ");
+ assertWidth(1 + 2, spacerId);
+
+ writeStatus("Check height ");
+ assertHeight(5 + 2, spacerId);
+
+ writeStatus("Check styleClass ");
+ assertStyleClass("sp", spacerId);
+
+ writeStatus("Check style ");
+ assertStyleClass("border: solid 1px green;", spacerId);
+ }
+
+ private void assertWidth(int width, String spacerId) {
+ StringBuffer script = new StringBuffer("
document.getElementById('");
+ script.append(spacerId);
+ script.append("').offsetWidth");
+
+ String w = runScript(script.toString());
+ Assert.assertEquals(w, String.valueOf(width));
+ }
+
+ private void assertHeight(int height, String spacerId) {
+ StringBuffer script = new StringBuffer("
document.getElementById('");
+ script.append(spacerId);
+ script.append("').offsetHeight");
+
+ String h = runScript(script.toString());
+ Assert.assertEquals(h, String.valueOf(height));
+ }
+
+ private void assertStyleClass(String styleClass, String spacerId) {
+ StringBuffer script = new StringBuffer("
document.getElementById('");
+ script.append(spacerId);
+ script.append("').className");
+
+ String sc = runScript(script.toString());
+ if (sc != null) {
+ Assert.assertTrue(sc.endsWith("sp"));
+ } else {
+ Assert.fail("ClassName is null");
+ }
+ }
+
+ private void assertStyle(String style, String spacerId) {
+ StringBuffer script = new StringBuffer("
document.getElementById('");
+ script.append(spacerId);
+ script.append("').style");
+
+ String s = runScript(script.toString());
+ Assert.assertEquals(s, style);
+ }
+
+ public String getTestUrl() {
+ return "pages/spacer/spacerTest.xhtml";
+ }
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/SpacerTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/TabPanelTest.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/TabPanelTest.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/TabPanelTest.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,96 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library 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 library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.testng;
+
+import org.ajax4jsf.template.Template;
+import org.richfaces.SeleniumTestBase;
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+import com.thoughtworks.selenium.SeleniumException;
+
+public class TabPanelTest extends SeleniumTestBase {
+
+ @Test
+ public void testRichTabPanelComponent(Template template) {
+ renderPage(template);
+ String parentId = getParentId() + "_form:";
+ String linkId = parentId + "tab2_lbl";
+ String tabId1 = parentId + "tab1";
+ String tabId2 = parentId + "tab2";
+ String tabId4 = parentId + "tab4";
+ String inputId = parentId + "_value";
+ String outputId = parentId + "_value2";
+
+ writeStatus("Click on tab1");
+ clickById(linkId);
+ waitForAjaxCompletion();
+ AssertValueEquals(inputId, "tab2");
+ AssertTextEquals(outputId, "2");
+ Assert.assertTrue(isVisibleById(tabId2));
+ Assert.assertFalse(isVisibleById(tabId4));
+ try {
+ getTextById(tabId1);
+ Assert.fail("Both of 'tab1' and 'tab2' tabs were
rendered for tab panel.");
+ } catch (SeleniumException se) {
+
+ }
+
+ writeStatus("Click on tab2");
+ linkId = parentId + "tab1_lbl";
+ clickCommandAndWait(linkId);
+ AssertValueEquals(inputId, "tab1");
+ AssertTextEquals(outputId, "1");
+ Assert.assertTrue(isVisibleById(tabId1));
+ Assert.assertFalse(isVisibleById(tabId4));
+ try {
+ getTextById(tabId2);
+ Assert.fail("Both of 'tab1' and 'tab2' tabs were
rendered for tab panel.");
+ } catch (SeleniumException se) {
+
+ }
+
+ writeStatus("Click on tab3");
+ linkId = parentId + "tab3_lbl";
+ clickById(linkId);
+ AssertValueEquals(inputId, "tab1");
+ Assert.assertTrue(isVisibleById(tabId1));
+
+ writeStatus("Click on tab4");
+ linkId = parentId + "tab4_lbl";
+ clickById(linkId);
+ Assert.assertTrue(isVisibleById(tabId4));
+ Assert.assertFalse(isVisibleById(tabId1));
+ try {
+ getTextById(tabId2);
+ Assert.fail("Both of 'tab1' and 'tab2' tabs were
rendered for tab panel.");
+ } catch (SeleniumException se) {
+
+ }
+ }
+
+ @Override
+ public String getTestUrl() {
+ return "pages/tabPanel/tabPanelTest.xhtml";
+ }
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/TabPanelTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/TogglePanelTest.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/TogglePanelTest.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/TogglePanelTest.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,180 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library 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 library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.testng;
+
+import org.ajax4jsf.template.Template;
+import org.richfaces.SeleniumTestBase;
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+import com.thoughtworks.selenium.SeleniumException;
+
+public class TogglePanelTest extends SeleniumTestBase {
+
+ @Test
+ public void testTogglePanelComponentAjaxMode(Template template) {
+ renderPage(template);
+
+ String parentId = getParentId() + "_form:";
+
+ String inputId = parentId + "_value";
+ String outputId = parentId + "_value2";
+
+ String controlNext = parentId + "ajax_next";
+ String controlOne = parentId + "ajax_one";
+ String controlTwo = parentId + "ajax_two";
+
+ String oneFacet = parentId + "ajax_state_one";
+ String twoFacet = parentId + "ajax_state_two";
+
+ reset();
+
+ writeStatus("Click on ajax controlNext");
+ clickAjaxCommandAndWait(controlNext);
+ // pause(6000, "panel_ajax");
+ AssertValueEquals(inputId, "ajax_next");
+ AssertTextEquals(outputId, "1");
+ Assert.assertTrue(isVisibleById(twoFacet));
+ try {
+ getTextById(oneFacet);
+ Assert.fail("Both of 'one' and 'two' states were
rendered for ajax toggle panel.");
+ } catch (SeleniumException se) {
+
+ }
+
+ writeStatus("Click on ajax controlOne");
+ clickById(controlOne);
+ waitForAjaxCompletion(5000);
+ AssertValueEquals(inputId, "ajax_one");
+ AssertTextEquals(outputId, "2");
+ Assert.assertTrue(isVisibleById(oneFacet));
+ try {
+ getTextById(twoFacet);
+ Assert.fail("Both of 'one' and 'two' states were
rendered for ajax toggle panel.");
+ } catch (SeleniumException se) {
+
+ }
+
+ writeStatus("Click on ajax controlTwo");
+ clickById(controlTwo);
+ waitForAjaxCompletion(5000);
+ AssertValueEquals(inputId, "ajax_two");
+ AssertTextEquals(outputId, "1");
+ Assert.assertTrue(isVisibleById(twoFacet));
+ try {
+ getTextById(oneFacet);
+ Assert.fail("Both of 'one' and 'two' states were
rendered for ajax toggle panel.");
+ } catch (SeleniumException se) {
+ }
+ }
+
+ @Test
+ public void testTogglePanelComponentServerMode(Template template) {
+ renderPage(template);
+
+ String parentId = getParentId() + "_form:";
+
+ String inputId = parentId + "_value";
+ String outputId = parentId + "_value2";
+
+ String controlNext = parentId + "server_next";
+ String controlOne = parentId + "server_one";
+ String controlTwo = parentId + "server_two";
+ String oneFacet = parentId + "server_state_one";
+ String twoFacet = parentId + "server_state_two";
+
+ reset();
+
+ writeStatus("Click on controlNext");
+ clickCommandAndWait(controlNext);
+ AssertValueEquals(inputId, "server_next");
+ AssertTextEquals(outputId, "1");
+ Assert.assertTrue(isVisibleById(twoFacet));
+ try {
+ getTextById(oneFacet);
+ Assert.fail("Both of 'one' and 'two' states were
rendered for server toggle panel.");
+ } catch (SeleniumException se) {
+
+ }
+
+ writeStatus("Click on server controlOne");
+ clickCommandAndWait(controlOne);
+ AssertValueEquals(inputId, "server_one");
+ AssertTextEquals(outputId, "2");
+ Assert.assertTrue(isVisibleById(oneFacet));
+ try {
+ getTextById(twoFacet);
+ Assert.fail("Both of 'one' and 'two' states were
rendered for server toggle panel.");
+ } catch (SeleniumException se) {
+
+ }
+
+ writeStatus("Click on server controlTwo");
+ clickCommandAndWait(controlTwo);
+ AssertValueEquals(inputId, "server_two");
+ AssertTextEquals(outputId, "3");
+ Assert.assertTrue(isVisibleById(twoFacet));
+ try {
+ getTextById(oneFacet);
+ Assert.fail("Both of 'one' and 'two' states were
rendered for server toggle panel.");
+ } catch (SeleniumException se) {
+ }
+ }
+
+ @Test
+ public void testTogglePanelComponentClientMode(Template template) {
+ renderPage(template);
+
+ String parentId = getParentId() + "_form:";
+
+ String controlNext = parentId + "client_next";
+ String controlOne = parentId + "client_one";
+ String controlTwo = parentId + "client_two";
+ String oneFacet = parentId + "client_state_one";
+ String twoFacet = parentId + "client_state_two";
+
+ writeStatus("Click on client controlNext");
+ clickById(controlNext);
+ Assert.assertTrue(isVisibleById(twoFacet));
+ Assert.assertFalse(isVisibleById(oneFacet));
+
+ writeStatus("Click on client controlOne");
+ clickById(controlOne);
+ Assert.assertTrue(isVisibleById(oneFacet));
+ Assert.assertFalse(isVisibleById(twoFacet));
+
+ writeStatus("Click on client controlTwo");
+ clickById(controlTwo);
+ Assert.assertTrue(isVisibleById(twoFacet));
+ Assert.assertFalse(isVisibleById(oneFacet));
+ }
+
+ private void reset() {
+ writeStatus("Clean bean values");
+ clickAjaxCommandAndWait(getParentId() + "_form:clean");
+ }
+
+ public String getTestUrl() {
+ return "pages/togglePanel/togglePanelTest.xhtml";
+ }
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/TogglePanelTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ToolBarTest.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ToolBarTest.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ToolBarTest.java 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,84 @@
+package org.richfaces.testng;
+
+import org.ajax4jsf.template.Template;
+import org.richfaces.SeleniumTestBase;
+import org.testng.annotations.Test;
+
+public class ToolBarTest extends SeleniumTestBase {
+
+ private static final String TOOLBAR = "toolbar";
+
+ private final static String RESULT_FAILED_TEXT = "No";
+
+ private final static String RESULT_PASSED_TEXT = "Passed";
+
+ /* Tab panel group/item separator constants */
+ private final static String LINE_SEPARATOR = "line";
+
+ private final static String DISC_SEPARATOR = "disc";
+
+ private final static String GRID_SEPARATOR = "grid";
+
+ private final static String SQUARE_SEPARATOR = "square";
+
+ private final static String NONE_SEPARATOR = "none";
+
+ @Test
+ public void testToolBarComponentLayout(Template template) {
+ renderPage(template);
+
+ writeStatus("Check component layout");
+
+ String id = getParentId() + "_form:";
+
+ writeStatus("Switch toolbar group separator");
+
+ clickAjaxCommandAndWait(id + "gs_" + LINE_SEPARATOR);
+ clickAjaxCommandAndWait(id + "gs_" + DISC_SEPARATOR);
+ clickAjaxCommandAndWait(id + "gs_" + GRID_SEPARATOR);
+ clickAjaxCommandAndWait(id + "gs_" + SQUARE_SEPARATOR);
+ clickAjaxCommandAndWait(id + "gs_" + NONE_SEPARATOR);
+
+ writeStatus("Switch toolbar group item separator");
+
+ clickAjaxCommandAndWait(id + "gis_" + LINE_SEPARATOR);
+ clickAjaxCommandAndWait(id + "gis_" + DISC_SEPARATOR);
+ clickAjaxCommandAndWait(id + "gis_" + GRID_SEPARATOR);
+ clickAjaxCommandAndWait(id + "gis_" + SQUARE_SEPARATOR);
+ clickAjaxCommandAndWait(id + "gis_" + NONE_SEPARATOR);
+ }
+
+ @Test
+ public void testToolBarEvents(Template template) {
+ renderPage(template);
+
+ writeStatus("Check component event triggering");
+
+ String toolbar = getParentId() + TOOLBAR + "_click";
+ testOnclickEvent(toolbar, toolbar + "_result", RESULT_FAILED_TEXT,
RESULT_PASSED_TEXT);
+
+ toolbar = getParentId() + TOOLBAR + "_dblclick";
+ testOnDblclickEvent(toolbar, toolbar + "_result", RESULT_FAILED_TEXT,
RESULT_PASSED_TEXT);
+
+ toolbar = getParentId() + TOOLBAR + "_mousedown";
+ testOnmousedownEvent(toolbar, toolbar + "_result", RESULT_FAILED_TEXT,
RESULT_PASSED_TEXT);
+
+ toolbar = getParentId() + TOOLBAR + "_mousemove";
+ testOnmousemoveEvent(toolbar, toolbar + "_result", RESULT_FAILED_TEXT,
RESULT_PASSED_TEXT);
+
+ toolbar = getParentId() + TOOLBAR + "_mouseout";
+ testOnmouseoutEvent(toolbar, toolbar + "_result", RESULT_FAILED_TEXT,
RESULT_PASSED_TEXT);
+
+ toolbar = getParentId() + TOOLBAR + "_mouseover";
+ testOnmouseoverEvent(toolbar, toolbar + "_result", RESULT_FAILED_TEXT,
RESULT_PASSED_TEXT);
+
+ toolbar = getParentId() + TOOLBAR + "_mouseup";
+ testOnmouseupEvent(toolbar, toolbar + "_result", RESULT_FAILED_TEXT,
RESULT_PASSED_TEXT);
+ }
+
+ @Override
+ public String getTestUrl() {
+ return "pages/toolBar/toolBarTest.xhtml";
+ }
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ToolBarTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added: trunk/test-applications/seleniumTest/richfaces/src/test/testng/unix/testng.xml
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/testng/unix/testng.xml
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/testng/unix/testng.xml 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,20 @@
+<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
+<suite name="seleniumTest">
+ <parameter name="loadStyleStrategy" value="DEFAULT"/>
+ <parameter name="loadScriptStrategy" value="DEFAULT"/>
+ <parameter name="filterPrefix" value="/faces/NEKO/"/>
+
+ <test name="FireFoxFunctionalTests">
+ <parameter name="browser" value="*firefox"/>
+ <packages>
+ <package name="org.richfaces.testng" />
+ </packages>
+ </test>
+ <test name="OperaFunctionalTests">
+ <parameter name="browser" value="*opera"/>
+ <packages>
+ <package name="org.richfaces.testng" />
+ </packages>
+ </test>
+</suite>
+
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/test/testng/unix/testng.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/test/testng/unix/testng_default_default_neko.xml
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/testng/unix/testng_default_default_neko.xml
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/testng/unix/testng_default_default_neko.xml 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,20 @@
+<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
+<suite name="seleniumTest">
+ <parameter name="loadStyleStrategy" value="DEFAULT"/>
+ <parameter name="loadScriptStrategy" value="DEFAULT"/>
+ <parameter name="filterPrefix" value="/faces/NEKO/"/>
+
+ <test name="FireFoxFunctionalTests">
+ <parameter name="browser" value="*firefox"/>
+ <packages>
+ <package name="org.richfaces.testng" />
+ </packages>
+ </test>
+ <test name="OperaFunctionalTests">
+ <parameter name="browser" value="*opera"/>
+ <packages>
+ <package name="org.richfaces.testng" />
+ </packages>
+ </test>
+</suite>
+
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/test/testng/unix/testng_default_default_neko.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/test/testng/win/testng_all_all_neko.xml
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/testng/win/testng_all_all_neko.xml
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/testng/win/testng_all_all_neko.xml 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,21 @@
+<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
+<suite name="seleniumTestAANe">
+ <test name="IEFunctionalTests">
+ <parameter name="browser" value="*iexplore"/>
+ <parameter name="loadStyleStrategy" value="ALL"/>
+ <parameter name="loadScriptStrategy" value="ALL"/>
+ <parameter name="filterPrefix" value="/faces/NEKO/"/>
+ <packages>
+ <package name="org.richfaces.testng" />
+ </packages>
+ </test>
+ <test name="FireFoxFunctionalTestsAANe">
+ <parameter name="loadStyleStrategy" value="ALL"/>
+ <parameter name="loadScriptStrategy" value="ALL"/>
+ <parameter name="filterPrefix" value="/faces/NEKO/"/>
+ <parameter name="browser" value="*firefox"/>
+ <packages>
+ <package name="org.richfaces.testng" />
+ </packages>
+ </test>
+</suite>
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/test/testng/win/testng_all_all_neko.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Added:
trunk/test-applications/seleniumTest/richfaces/src/test/testng/win/testng_all_all_none.xml
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/testng/win/testng_all_all_none.xml
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/testng/win/testng_all_all_none.xml 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,21 @@
+<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
+<suite name="seleniumTestAANo">
+ <test name="IEFunctionalTests">
+ <parameter name="browser" value="*iexplore"/>
+ <parameter name="loadStyleStrategy" value="ALL"/>
+ <parameter name="loadScriptStrategy" value="ALL"/>
+ <parameter name="filterPrefix" value="/faces/NONE/"/>
+ <packages>
+ <package name="org.richfaces.testng" />
+ </packages>
+ </test>
+ <test name="FireFoxFunctionalTestsAANo">
+ <parameter name="loadStyleStrategy" value="ALL"/>
+ <parameter name="loadScriptStrategy" value="ALL"/>
+ <parameter name="filterPrefix" value="/faces/NONE/"/>
+ <parameter name="browser" value="*firefox"/>
+ <packages>
+ <package name="org.richfaces.testng" />
+ </packages>
+ </test>
+</suite>
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/test/testng/win/testng_all_all_none.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Added:
trunk/test-applications/seleniumTest/richfaces/src/test/testng/win/testng_all_all_tidy.xml
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/testng/win/testng_all_all_tidy.xml
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/testng/win/testng_all_all_tidy.xml 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,21 @@
+<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
+<suite name="seleniumTestAAT">
+ <test name="IEFunctionalTests">
+ <parameter name="browser" value="*iexplore"/>
+ <parameter name="loadStyleStrategy" value="ALL"/>
+ <parameter name="loadScriptStrategy" value="ALL"/>
+ <parameter name="filterPrefix" value="/faces/TIDY/"/>
+ <packages>
+ <package name="org.richfaces.testng" />
+ </packages>
+ </test>
+ <test name="FireFoxFunctionalTestsAAT">
+ <parameter name="loadStyleStrategy" value="ALL"/>
+ <parameter name="loadScriptStrategy" value="ALL"/>
+ <parameter name="filterPrefix" value="/faces/TIDY/"/>
+ <parameter name="browser" value="*firefox"/>
+ <packages>
+ <package name="org.richfaces.testng" />
+ </packages>
+ </test>
+</suite>
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/test/testng/win/testng_all_all_tidy.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Added:
trunk/test-applications/seleniumTest/richfaces/src/test/testng/win/testng_all_default_neko.xml
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/testng/win/testng_all_default_neko.xml
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/testng/win/testng_all_default_neko.xml 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,21 @@
+<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
+<suite name="seleniumTestADNe">
+ <test name="IEFunctionalTests">
+ <parameter name="browser" value="*iexplore"/>
+ <parameter name="loadStyleStrategy" value="ALL"/>
+ <parameter name="loadScriptStrategy" value="DEFAULT"/>
+ <parameter name="filterPrefix" value="/faces/NEKO/"/>
+ <packages>
+ <package name="org.richfaces.testng" />
+ </packages>
+ </test>
+ <test name="FireFoxFunctionalTestsADNe">
+ <parameter name="loadStyleStrategy" value="ALL"/>
+ <parameter name="loadScriptStrategy" value="DEFAULT"/>
+ <parameter name="filterPrefix" value="/faces/NEKO/"/>
+ <parameter name="browser" value="*firefox"/>
+ <packages>
+ <package name="org.richfaces.testng" />
+ </packages>
+ </test>
+</suite>
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/test/testng/win/testng_all_default_neko.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Added:
trunk/test-applications/seleniumTest/richfaces/src/test/testng/win/testng_all_default_none.xml
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/testng/win/testng_all_default_none.xml
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/testng/win/testng_all_default_none.xml 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,21 @@
+<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
+<suite name="seleniumTestADNo">
+ <test name="IEFunctionalTests">
+ <parameter name="browser" value="*iexplore"/>
+ <parameter name="loadStyleStrategy" value="ALL"/>
+ <parameter name="loadScriptStrategy" value="DEFAULT"/>
+ <parameter name="filterPrefix" value="/faces/NONE/"/>
+ <packages>
+ <package name="org.richfaces.testng" />
+ </packages>
+ </test>
+ <test name="FireFoxFunctionalTestsADNo">
+ <parameter name="loadStyleStrategy" value="ALL"/>
+ <parameter name="loadScriptStrategy" value="DEFAULT"/>
+ <parameter name="filterPrefix" value="/faces/NONE/"/>
+ <parameter name="browser" value="*firefox"/>
+ <packages>
+ <package name="org.richfaces.testng" />
+ </packages>
+ </test>
+</suite>
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/test/testng/win/testng_all_default_none.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Added:
trunk/test-applications/seleniumTest/richfaces/src/test/testng/win/testng_all_default_tidy.xml
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/testng/win/testng_all_default_tidy.xml
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/testng/win/testng_all_default_tidy.xml 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,21 @@
+<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
+<suite name="seleniumTestADT">
+ <test name="IEFunctionalTests">
+ <parameter name="browser" value="*iexplore"/>
+ <parameter name="loadStyleStrategy" value="ALL"/>
+ <parameter name="loadScriptStrategy" value="DEFAULT"/>
+ <parameter name="filterPrefix" value="/faces/TIDY/"/>
+ <packages>
+ <package name="org.richfaces.testng" />
+ </packages>
+ </test>
+ <test name="FireFoxFunctionalTestsADT">
+ <parameter name="loadStyleStrategy" value="ALL"/>
+ <parameter name="loadScriptStrategy" value="DEFAULT"/>
+ <parameter name="filterPrefix" value="/faces/TIDY/"/>
+ <parameter name="browser" value="*firefox"/>
+ <packages>
+ <package name="org.richfaces.testng" />
+ </packages>
+ </test>
+</suite>
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/test/testng/win/testng_all_default_tidy.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Added:
trunk/test-applications/seleniumTest/richfaces/src/test/testng/win/testng_default_all_neko.xml
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/testng/win/testng_default_all_neko.xml
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/testng/win/testng_default_all_neko.xml 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,21 @@
+<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
+<suite name="seleniumTestDANe">
+ <test name="IEFunctionalTests">
+ <parameter name="browser" value="*iexplore"/>
+ <parameter name="loadStyleStrategy" value="DEFAULT"/>
+ <parameter name="loadScriptStrategy" value="ALL"/>
+ <parameter name="filterPrefix" value="/faces/NEKO/"/>
+ <packages>
+ <package name="org.richfaces.testng" />
+ </packages>
+ </test>
+ <test name="FireFoxFunctionalTestsDANe">
+ <parameter name="loadStyleStrategy" value="DEFAULT"/>
+ <parameter name="loadScriptStrategy" value="ALL"/>
+ <parameter name="filterPrefix" value="/faces/NEKO/"/>
+ <parameter name="browser" value="*firefox"/>
+ <packages>
+ <package name="org.richfaces.testng" />
+ </packages>
+ </test>
+</suite>
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/test/testng/win/testng_default_all_neko.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Added:
trunk/test-applications/seleniumTest/richfaces/src/test/testng/win/testng_default_all_none.xml
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/testng/win/testng_default_all_none.xml
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/testng/win/testng_default_all_none.xml 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,21 @@
+<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
+<suite name="seleniumTestDANo">
+ <test name="IEFunctionalTests">
+ <parameter name="browser" value="*iexplore"/>
+ <parameter name="loadStyleStrategy" value="DEFAULT"/>
+ <parameter name="loadScriptStrategy" value="ALL"/>
+ <parameter name="filterPrefix" value="/faces/NONE/"/>
+ <packages>
+ <package name="org.richfaces.testng" />
+ </packages>
+ </test>
+ <test name="FireFoxFunctionalTestsDANo">
+ <parameter name="loadStyleStrategy" value="DEFAULT"/>
+ <parameter name="loadScriptStrategy" value="ALL"/>
+ <parameter name="filterPrefix" value="/faces/NONE/"/>
+ <parameter name="browser" value="*firefox"/>
+ <packages>
+ <package name="org.richfaces.testng" />
+ </packages>
+ </test>
+</suite>
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/test/testng/win/testng_default_all_none.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Added:
trunk/test-applications/seleniumTest/richfaces/src/test/testng/win/testng_default_all_tidy.xml
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/testng/win/testng_default_all_tidy.xml
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/testng/win/testng_default_all_tidy.xml 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,21 @@
+<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
+<suite name="seleniumTestDAT">
+ <test name="IEFunctionalTests">
+ <parameter name="browser" value="*iexplore"/>
+ <parameter name="loadStyleStrategy" value="DEFAULT"/>
+ <parameter name="loadScriptStrategy" value="ALL"/>
+ <parameter name="filterPrefix" value="/faces/TIDY/"/>
+ <packages>
+ <package name="org.richfaces.testng" />
+ </packages>
+ </test>
+ <test name="FireFoxFunctionalTestsDAT">
+ <parameter name="loadStyleStrategy" value="DEFAULT"/>
+ <parameter name="loadScriptStrategy" value="ALL"/>
+ <parameter name="filterPrefix" value="/faces/TIDY/"/>
+ <parameter name="browser" value="*firefox"/>
+ <packages>
+ <package name="org.richfaces.testng" />
+ </packages>
+ </test>
+</suite>
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/test/testng/win/testng_default_all_tidy.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Added:
trunk/test-applications/seleniumTest/richfaces/src/test/testng/win/testng_default_default_neko.xml
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/testng/win/testng_default_default_neko.xml
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/testng/win/testng_default_default_neko.xml 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,22 @@
+<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
+<suite name="seleniumTestDDNe">
+ <parameter name="templates" value="SIMPLE,DATA_TABLE,MODAL_PANEL"
/>
+ <test name="IEFunctionalTests">
+ <parameter name="browser" value="*iexplore" />
+ <parameter name="loadStyleStrategy" value="DEFAULT" />
+ <parameter name="loadScriptStrategy" value="DEFAULT" />
+ <parameter name="filterPrefix" value="/faces/NEKO/" />
+ <packages>
+ <package name="org.richfaces.testng" />
+ </packages>
+ </test>
+ <test name="FireFoxFunctionalTestsDDNe">
+ <parameter name="browser" value="*firefox" />
+ <parameter name="loadStyleStrategy" value="DEFAULT" />
+ <parameter name="loadScriptStrategy" value="DEFAULT" />
+ <parameter name="filterPrefix" value="/faces/NEKO/" />
+ <packages>
+ <package name="org.richfaces.testng" />
+ </packages>
+ </test>
+</suite>
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/test/testng/win/testng_default_default_neko.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/richfaces/src/test/testng/win/testng_default_default_none.xml
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/testng/win/testng_default_default_none.xml
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/testng/win/testng_default_default_none.xml 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,21 @@
+<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
+<suite name="seleniumTestDDNo">
+ <test name="IEFunctionalTests">
+ <parameter name="browser" value="*iexplore"/>
+ <parameter name="loadStyleStrategy" value="DEFAULT"/>
+ <parameter name="loadScriptStrategy" value="DEFAULT"/>
+ <parameter name="filterPrefix" value="/faces/NONE/"/>
+ <packages>
+ <package name="org.richfaces.testng" />
+ </packages>
+ </test>
+ <test name="FireFoxFunctionalTestsDDNo">
+ <parameter name="loadStyleStrategy" value="DEFAULT"/>
+ <parameter name="loadScriptStrategy" value="DEFAULT"/>
+ <parameter name="filterPrefix" value="/faces/NONE/"/>
+ <parameter name="browser" value="*firefox"/>
+ <packages>
+ <package name="org.richfaces.testng" />
+ </packages>
+ </test>
+</suite>
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/test/testng/win/testng_default_default_none.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Added:
trunk/test-applications/seleniumTest/richfaces/src/test/testng/win/testng_default_default_tidy.xml
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/testng/win/testng_default_default_tidy.xml
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/testng/win/testng_default_default_tidy.xml 2008-09-03
08:43:58 UTC (rev 10288)
@@ -0,0 +1,21 @@
+<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
+<suite name="seleniumTestDDT">
+ <test name="IEFunctionalTests">
+ <parameter name="browser" value="*iexplore"/>
+ <parameter name="loadStyleStrategy" value="DEFAULT"/>
+ <parameter name="loadScriptStrategy" value="DEFAULT"/>
+ <parameter name="filterPrefix" value="/faces/TIDY/"/>
+ <packages>
+ <package name="org.richfaces.testng" />
+ </packages>
+ </test>
+ <test name="FireFoxFunctionalTestsDDT">
+ <parameter name="loadStyleStrategy" value="DEFAULT"/>
+ <parameter name="loadScriptStrategy" value="DEFAULT"/>
+ <parameter name="filterPrefix" value="/faces/TIDY/"/>
+ <parameter name="browser" value="*firefox"/>
+ <packages>
+ <package name="org.richfaces.testng" />
+ </packages>
+ </test>
+</suite>
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/test/testng/win/testng_default_default_tidy.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml