Author: lfryc(a)redhat.com
Date: 2011-01-27 08:13:48 -0500 (Thu, 27 Jan 2011)
New Revision: 21271
Added:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDataScroller/DataScrollerAttributes.java
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDataScroller/AbstractScrollerTest.java
Log:
rich:dataScroller - attributes based on ID rewritten to use AbstractComponentAttributes
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDataScroller/AbstractScrollerTest.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDataScroller/AbstractScrollerTest.java 2011-01-27
13:13:12 UTC (rev 21270)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDataScroller/AbstractScrollerTest.java 2011-01-27
13:13:48 UTC (rev 21271)
@@ -21,15 +21,12 @@
*******************************************************************************/
package org.richfaces.tests.metamer.ftest.richDataScroller;
-import static org.jboss.test.selenium.guard.request.RequestTypeGuardFactory.guardHttp;
-import static org.jboss.test.selenium.locator.LocatorFactory.id;
import static org.jboss.test.selenium.utils.URLUtils.buildUrl;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertFalse;
import java.net.URL;
-import org.jboss.test.selenium.locator.IdLocator;
import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
import org.richfaces.tests.metamer.ftest.annotations.Inject;
import org.richfaces.tests.metamer.ftest.annotations.Use;
@@ -58,6 +55,8 @@
DataScroller dataScroller1 = PaginationTester.DATA_SCROLLER_OUTSIDE_TABLE;
DataScroller dataScroller2 = PaginationTester.DATA_SCROLLER_IN_TABLE_FOOTER;
+ DataScrollerAttributes attributes = new DataScrollerAttributes();
+
PaginationTester paginationTester = new PaginationTester() {
@Override
@@ -72,9 +71,6 @@
}
};
- IdLocator attributeFastStep = id("form:attributes:fastStepInput");
- IdLocator attributeMaxPages = id("form:attributes:maxPagesInput");
-
ExtendedDataTable dataTable = new
ExtendedDataTable(pjq("table.rf-dt[id$=richDataTable]"));
String tableText;
@@ -86,8 +82,8 @@
@BeforeMethod
public void prepareComponent() {
- guardHttp(selenium).type(attributeFastStep, String.valueOf(fastStep));
- guardHttp(selenium).type(attributeMaxPages, String.valueOf(maxPages));
+ attributes.setFastStep(fastStep);
+ attributes.setMaxPages(maxPages);
paginationTester.setDataScroller(dataScroller);
dataScroller.setFastStep(fastStep);
Added:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDataScroller/DataScrollerAttributes.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDataScroller/DataScrollerAttributes.java
(rev 0)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDataScroller/DataScrollerAttributes.java 2011-01-27
13:13:48 UTC (rev 21271)
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.ftest.richDataScroller;
+
+import org.richfaces.tests.metamer.ftest.AbstractComponentAttributes;
+
+/**
+ * @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
+ * @version $Revision$
+ */
+public class DataScrollerAttributes extends AbstractComponentAttributes {
+ public void setFastStep(Integer fastStep) {
+ setProperty("fastStep", fastStep);
+ }
+
+ public void setMaxPages(Integer maxPages) {
+ setProperty("maxPages", maxPages);
+ }
+}