Author: lfryc(a)redhat.com
Date: 2010-07-23 03:19:27 -0400 (Fri, 23 Jul 2010)
New Revision: 18209
Modified:
root/tests/metamer/trunk/ftest-source/src/main/java/org/jboss/test/selenium/locator/reference/LocatorReference.java
root/tests/metamer/trunk/ftest-source/src/main/java/org/jboss/test/selenium/locator/reference/ReferencedLocator.java
root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/AbstractMetamerTest.java
root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jActionListener/TestA4JActionListener.java
root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jCommandButton/TestA4JCommandButton.java
root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jCommandLink/TestA4JCommandLink.java
root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jLog/TestA4JLog.java
root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jOutputPanel/TestA4JOutputPanel.java
root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jPoll/TestPoll.java
root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jPush/AbstractPushTest.java
root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jPush/PushAttributes.java
root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jPush/TestInterval.java
root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/hCommandButton/TestHCommandButton.java
root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richExtendedDataTable/TestScroller.java
Log:
following changes in library - Cheiron: possibility to parametrize the Locators
Modified:
root/tests/metamer/trunk/ftest-source/src/main/java/org/jboss/test/selenium/locator/reference/LocatorReference.java
===================================================================
---
root/tests/metamer/trunk/ftest-source/src/main/java/org/jboss/test/selenium/locator/reference/LocatorReference.java 2010-07-22
23:33:00 UTC (rev 18208)
+++
root/tests/metamer/trunk/ftest-source/src/main/java/org/jboss/test/selenium/locator/reference/LocatorReference.java 2010-07-23
07:19:27 UTC (rev 18209)
@@ -29,7 +29,7 @@
*
* @param <T> type of referenced locator
*/
-public class LocatorReference<T extends Locator> {
+public class LocatorReference<T extends Locator<?>> {
private T reference;
Modified:
root/tests/metamer/trunk/ftest-source/src/main/java/org/jboss/test/selenium/locator/reference/ReferencedLocator.java
===================================================================
---
root/tests/metamer/trunk/ftest-source/src/main/java/org/jboss/test/selenium/locator/reference/ReferencedLocator.java 2010-07-22
23:33:00 UTC (rev 18208)
+++
root/tests/metamer/trunk/ftest-source/src/main/java/org/jboss/test/selenium/locator/reference/ReferencedLocator.java 2010-07-23
07:19:27 UTC (rev 18209)
@@ -30,9 +30,10 @@
* @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
* @version $Revision$
*
- * @param <T> type of referenced locator
+ * @param <T>
+ * type of referenced locator
*/
-public class ReferencedLocator<T extends IterableLocator<T> &
CompoundableLocator<T>> extends AbstractElementLocator
+public class ReferencedLocator<T extends IterableLocator<T> &
CompoundableLocator<T>> extends AbstractElementLocator<T>
implements IterableLocator<T>, CompoundableLocator<T> {
private LocatorReference<T> reference;
Modified:
root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/AbstractMetamerTest.java
===================================================================
---
root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/AbstractMetamerTest.java 2010-07-22
23:33:00 UTC (rev 18208)
+++
root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/AbstractMetamerTest.java 2010-07-23
07:19:27 UTC (rev 18209)
@@ -160,8 +160,8 @@
* @param element
* locator of tested element
*/
- protected void testFireEvent(Event event, ElementLocator element) {
- ElementLocator eventInput = pjq("input[id$=on" + event.getEventName() +
"Input]");
+ protected void testFireEvent(Event event, ElementLocator<?> element) {
+ ElementLocator<?> eventInput = pjq("input[id$=on" +
event.getEventName() + "Input]");
final String value = "alert('" + event.getEventName() +
"')";
selenium.type(eventInput, value);
Modified:
root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jActionListener/TestA4JActionListener.java
===================================================================
---
root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jActionListener/TestA4JActionListener.java 2010-07-22
23:33:00 UTC (rev 18208)
+++
root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jActionListener/TestA4JActionListener.java 2010-07-23
07:19:27 UTC (rev 18209)
@@ -26,7 +26,6 @@
import java.net.URL;
-import org.jboss.test.selenium.locator.ElementLocator;
import org.jboss.test.selenium.locator.JQueryLocator;
import org.jboss.test.selenium.waiting.selenium.SeleniumCondition;
import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
@@ -41,10 +40,10 @@
*/
public class TestA4JActionListener extends AbstractMetamerTest {
- private ElementLocator invokeButtonType =
pjq("input[id$=invokeByTypeButton]");
- private ElementLocator invokeButtonBinding =
pjq("input[id$=invokeByBindingButton]");
- private ElementLocator invokeButtonMethod =
pjq("input[id$=invokeMethodButton]");
- private ElementLocator invokeButtonCC =
pjq("input[id$=invokeFromCCButton:button]");
+ private JQueryLocator invokeButtonType =
pjq("input[id$=invokeByTypeButton]");
+ private JQueryLocator invokeButtonBinding =
pjq("input[id$=invokeByBindingButton]");
+ private JQueryLocator invokeButtonMethod =
pjq("input[id$=invokeMethodButton]");
+ private JQueryLocator invokeButtonCC =
pjq("input[id$=invokeFromCCButton:button]");
private JQueryLocator message = pjq("ul[id$=messages] li");
@Override
Modified:
root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jCommandButton/TestA4JCommandButton.java
===================================================================
---
root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jCommandButton/TestA4JCommandButton.java 2010-07-22
23:33:00 UTC (rev 18208)
+++
root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jCommandButton/TestA4JCommandButton.java 2010-07-23
07:19:27 UTC (rev 18209)
@@ -32,7 +32,7 @@
import org.jboss.test.selenium.dom.Event;
import org.jboss.test.selenium.locator.Attribute;
import org.jboss.test.selenium.locator.AttributeLocator;
-import org.jboss.test.selenium.locator.ElementLocator;
+import org.jboss.test.selenium.locator.JQueryLocator;
import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.Test;
@@ -45,11 +45,11 @@
*/
public class TestA4JCommandButton extends AbstractMetamerTest {
- private ElementLocator input = pjq("input[id$=input]");
- private ElementLocator button = pjq("input[id$=a4jCommandButton]");
- private ElementLocator output1 = pjq("span[id$=output1]");
- private ElementLocator output2 = pjq("span[id$=output2]");
- private ElementLocator output3 = pjq("span[id$=output3]");
+ private JQueryLocator input = pjq("input[id$=input]");
+ private JQueryLocator button = pjq("input[id$=a4jCommandButton]");
+ private JQueryLocator output1 = pjq("span[id$=output1]");
+ private JQueryLocator output2 = pjq("span[id$=output2]");
+ private JQueryLocator output3 = pjq("span[id$=output3]");
@Override
public URL getTestUrl() {
@@ -98,9 +98,9 @@
@Test(dataProvider = "templates")
public void testAction(String templates) {
- ElementLocator doubleStringAction =
pjq("input[value=doubleStringAction]");
- ElementLocator first6CharsAction =
pjq("input[value=first6CharsAction]");
- ElementLocator toUpperCaseAction =
pjq("input[value=toUpperCaseAction]");
+ JQueryLocator doubleStringAction =
pjq("input[value=doubleStringAction]");
+ JQueryLocator first6CharsAction =
pjq("input[value=first6CharsAction]");
+ JQueryLocator toUpperCaseAction =
pjq("input[value=toUpperCaseAction]");
selenium.click(doubleStringAction);
selenium.waitForPageToLoad(TIMEOUT);
@@ -130,9 +130,9 @@
@Test(dataProvider = "templates")
public void testActionListener(String templates) {
- ElementLocator doubleStringActionListener =
pjq("input[value=doubleStringActionListener]");
- ElementLocator first6CharsActionListener =
pjq("input[value=first6CharsActionListener]");
- ElementLocator toUpperCaseActionListener =
pjq("input[value=toUpperCaseActionListener]");
+ JQueryLocator doubleStringActionListener =
pjq("input[value=doubleStringActionListener]");
+ JQueryLocator first6CharsActionListener =
pjq("input[value=first6CharsActionListener]");
+ JQueryLocator toUpperCaseActionListener =
pjq("input[value=toUpperCaseActionListener]");
selenium.click(doubleStringActionListener);
selenium.waitForPageToLoad(TIMEOUT);
@@ -163,8 +163,8 @@
@Test(dataProvider = "templates")
public void testDisabled(String templates) {
- ElementLocator disabledChecbox = pjq("input[id$=disabledInput]");
- AttributeLocator disabledAttribute = button.getAttribute(new
Attribute("disabled"));
+ JQueryLocator disabledChecbox = pjq("input[id$=disabledInput]");
+ AttributeLocator<?> disabledAttribute = button.getAttribute(new
Attribute("disabled"));
selenium.click(disabledChecbox);
selenium.waitForPageToLoad(TIMEOUT);
@@ -225,7 +225,7 @@
@Test(dataProvider = "templates")
public void testRender(String templates) {
- ElementLocator renderInput = pjq("input[name$=renderInput]");
+ JQueryLocator renderInput = pjq("input[name$=renderInput]");
selenium.type(renderInput, "output1");
selenium.waitForPageToLoad(TIMEOUT);
@@ -265,7 +265,7 @@
@Test(dataProvider = "templates")
public void testRendered(String templates) {
- ElementLocator renderedCheckbox = pjq("input[name$=renderedInput]");
+ JQueryLocator renderedCheckbox = pjq("input[name$=renderedInput]");
selenium.click(renderedCheckbox);
selenium.waitForPageToLoad(TIMEOUT);
@@ -274,11 +274,11 @@
@Test(dataProvider = "templates")
public void testStyleClass(String templates) {
- ElementLocator wide = pjq("input[name$=styleClassInput][value=wide]");
- ElementLocator big = pjq("input[name$=styleClassInput][value=big]");
- ElementLocator none = pjq("input[name$=styleClassInput][value=]");
+ JQueryLocator wide = pjq("input[name$=styleClassInput][value=wide]");
+ JQueryLocator big = pjq("input[name$=styleClassInput][value=big]");
+ JQueryLocator none = pjq("input[name$=styleClassInput][value=]");
- final AttributeLocator classAttribute = button.getAttribute(new
Attribute("class"));
+ final AttributeLocator<?> classAttribute = button.getAttribute(new
Attribute("class"));
selenium.click(wide);
selenium.waitForPageToLoad(TIMEOUT);
@@ -295,8 +295,8 @@
@Test(dataProvider = "templates")
public void testStyle(String templates) {
- ElementLocator styleInput = pjq("input[id$=styleInput]");
- final AttributeLocator attribute = button.getAttribute(new
Attribute("style"));
+ JQueryLocator styleInput = pjq("input[id$=styleInput]");
+ final AttributeLocator<?> attribute = button.getAttribute(new
Attribute("style"));
final String value = "font-size: 20px;";
selenium.type(styleInput, value);
@@ -307,8 +307,8 @@
@Test(dataProvider = "templates")
public void testValue(String templates) {
- ElementLocator valueInput = pjq("input[id$=valueInput]");
- final AttributeLocator attribute = button.getAttribute(new
Attribute("value"));
+ JQueryLocator valueInput = pjq("input[id$=valueInput]");
+ final AttributeLocator<?> attribute = button.getAttribute(new
Attribute("value"));
final String value = "new label";
selenium.type(valueInput, value);
Modified:
root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jCommandLink/TestA4JCommandLink.java
===================================================================
---
root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jCommandLink/TestA4JCommandLink.java 2010-07-22
23:33:00 UTC (rev 18208)
+++
root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jCommandLink/TestA4JCommandLink.java 2010-07-23
07:19:27 UTC (rev 18209)
@@ -32,7 +32,7 @@
import org.jboss.test.selenium.dom.Event;
import org.jboss.test.selenium.locator.Attribute;
import org.jboss.test.selenium.locator.AttributeLocator;
-import org.jboss.test.selenium.locator.ElementLocator;
+import org.jboss.test.selenium.locator.JQueryLocator;
import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.Test;
@@ -45,11 +45,11 @@
*/
public class TestA4JCommandLink extends AbstractMetamerTest {
- private ElementLocator input = pjq("input[id$=input]");
- private ElementLocator link = pjq("a[id$=a4jCommandLink]");
- private ElementLocator output1 = pjq("span[id$=output1]");
- private ElementLocator output2 = pjq("span[id$=output2]");
- private ElementLocator output3 = pjq("span[id$=output3]");
+ private JQueryLocator input = pjq("input[id$=input]");
+ private JQueryLocator link = pjq("a[id$=a4jCommandLink]");
+ private JQueryLocator output1 = pjq("span[id$=output1]");
+ private JQueryLocator output2 = pjq("span[id$=output2]");
+ private JQueryLocator output3 = pjq("span[id$=output3]");
@Override
public URL getTestUrl() {
@@ -98,9 +98,9 @@
@Test(dataProvider = "templates")
public void testAction(String templates) {
- ElementLocator doubleStringAction =
pjq("input[value=doubleStringAction]");
- ElementLocator first6CharsAction =
pjq("input[value=first6CharsAction]");
- ElementLocator toUpperCaseAction =
pjq("input[value=toUpperCaseAction]");
+ JQueryLocator doubleStringAction =
pjq("input[value=doubleStringAction]");
+ JQueryLocator first6CharsAction =
pjq("input[value=first6CharsAction]");
+ JQueryLocator toUpperCaseAction =
pjq("input[value=toUpperCaseAction]");
selenium.click(doubleStringAction);
selenium.waitForPageToLoad(TIMEOUT);
@@ -130,9 +130,9 @@
@Test(dataProvider = "templates")
public void testActionListener(String templates) {
- ElementLocator doubleStringActionListener =
pjq("input[value=doubleStringActionListener]");
- ElementLocator first6CharsActionListener =
pjq("input[value=first6CharsActionListener]");
- ElementLocator toUpperCaseActionListener =
pjq("input[value=toUpperCaseActionListener]");
+ JQueryLocator doubleStringActionListener =
pjq("input[value=doubleStringActionListener]");
+ JQueryLocator first6CharsActionListener =
pjq("input[value=first6CharsActionListener]");
+ JQueryLocator toUpperCaseActionListener =
pjq("input[value=toUpperCaseActionListener]");
selenium.click(doubleStringActionListener);
selenium.waitForPageToLoad(TIMEOUT);
@@ -163,8 +163,8 @@
@Test(dataProvider = "templates")
public void testDisabled(String templates) {
- ElementLocator disabledChecbox = pjq("input[id$=disabledInput]");
- ElementLocator newLink = pjq("span[id$=a4jCommandLink]");
+ JQueryLocator disabledChecbox = pjq("input[id$=disabledInput]");
+ JQueryLocator newLink = pjq("span[id$=a4jCommandLink]");
selenium.click(disabledChecbox);
selenium.waitForPageToLoad(TIMEOUT);
@@ -228,7 +228,7 @@
@Test(dataProvider = "templates")
public void testRender(String templates) {
- ElementLocator renderInput = pjq("input[name$=renderInput]");
+ JQueryLocator renderInput = pjq("input[name$=renderInput]");
selenium.type(renderInput, "output1");
selenium.waitForPageToLoad(TIMEOUT);
@@ -268,7 +268,7 @@
@Test(dataProvider = "templates")
public void testRendered(String templates) {
- ElementLocator renderedCheckbox = pjq("input[name$=renderedInput]");
+ JQueryLocator renderedCheckbox = pjq("input[name$=renderedInput]");
selenium.click(renderedCheckbox);
selenium.waitForPageToLoad(TIMEOUT);
@@ -277,11 +277,11 @@
@Test(dataProvider = "templates")
public void testStyleClass(String templates) {
- ElementLocator bold = pjq("input[name$=styleClassInput][value=bold]");
- ElementLocator strike =
pjq("input[name$=styleClassInput][value=strike]");
- ElementLocator none = pjq("input[name$=styleClassInput][value=]");
+ JQueryLocator bold = pjq("input[name$=styleClassInput][value=bold]");
+ JQueryLocator strike =
pjq("input[name$=styleClassInput][value=strike]");
+ JQueryLocator none = pjq("input[name$=styleClassInput][value=]");
- final AttributeLocator classAttribute = link.getAttribute(new
Attribute("class"));
+ final AttributeLocator<?> classAttribute = link.getAttribute(new
Attribute("class"));
selenium.click(bold);
selenium.waitForPageToLoad(TIMEOUT);
@@ -298,8 +298,8 @@
@Test(dataProvider = "templates")
public void testStyle(String templates) {
- ElementLocator styleInput = pjq("input[id$=styleInput]");
- final AttributeLocator attribute = link.getAttribute(new
Attribute("style"));
+ JQueryLocator styleInput = pjq("input[id$=styleInput]");
+ final AttributeLocator<?> attribute = link.getAttribute(new
Attribute("style"));
final String value = "font-size: 20px;";
selenium.type(styleInput, value);
@@ -310,7 +310,7 @@
@Test(dataProvider = "templates")
public void testValue(String templates) {
- ElementLocator valueInput = pjq("input[id$=valueInput]");
+ JQueryLocator valueInput = pjq("input[id$=valueInput]");
final String value = "new label";
selenium.type(valueInput, value);
Modified:
root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jLog/TestA4JLog.java
===================================================================
---
root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jLog/TestA4JLog.java 2010-07-22
23:33:00 UTC (rev 18208)
+++
root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jLog/TestA4JLog.java 2010-07-23
07:19:27 UTC (rev 18209)
@@ -30,7 +30,6 @@
import java.net.URL;
-import org.jboss.test.selenium.locator.ElementLocator;
import org.jboss.test.selenium.locator.JQueryLocator;
import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
import org.testng.annotations.AfterMethod;
@@ -51,12 +50,12 @@
DEBUG, INFO, WARN, ERROR;
}
- private ElementLocator input = pjq("input[id$=nameInput]");
- private ElementLocator submitButton = pjq("input[id$=submitButton]");
- private ElementLocator output = pjq("span[id$=out]");
+ private JQueryLocator input = pjq("input[id$=nameInput]");
+ private JQueryLocator submitButton = pjq("input[id$=submitButton]");
+ private JQueryLocator output = pjq("span[id$=out]");
- private ElementLocator log = pjq("div.rich-log");
- private ElementLocator levelSelect = pjq("div.rich-log select");
+ private JQueryLocator log = pjq("div.rich-log");
+ private JQueryLocator levelSelect = pjq("div.rich-log select");
private JQueryLocator logMsg = pjq("div.rich-log div.rich-log-contents
div");
@Override
@@ -94,7 +93,7 @@
@Test(dataProvider = "templates")
public void testClearButton(String templates) {
- ElementLocator clearButton = pjq("div.rich-log button");
+ JQueryLocator clearButton = pjq("div.rich-log button");
selenium.typeKeys(input, "RichFaces 4");
selenium.click(submitButton);
@@ -112,7 +111,7 @@
@Test(dataProvider = "templates")
public void testRendered(String templates) {
- ElementLocator renderedInput = pjq("input[id$=renderedInput]");
+ JQueryLocator renderedInput = pjq("input[id$=renderedInput]");
selenium.click(renderedInput);
selenium.waitForPageToLoad(TIMEOUT);
@@ -201,10 +200,10 @@
}
private void testLogging(LogLevel logLevel, LogLevel filterLevel) {
- ElementLocator logButton = pjq("input[id$=" +
logLevel.toString().toLowerCase() + "Button]");
- ElementLocator levelInput = pjq("input[type=radio][value=" +
filterLevel.toString().toLowerCase() + "]");
- ElementLocator msgType = logMsg.getChild(jq("span:eq(0)"));
- ElementLocator msgContent = logMsg.getChild(jq("span:eq(1)"));
+ JQueryLocator logButton = pjq("input[id$=" +
logLevel.toString().toLowerCase() + "Button]");
+ JQueryLocator levelInput = pjq("input[type=radio][value=" +
filterLevel.toString().toLowerCase() + "]");
+ JQueryLocator msgType = logMsg.getChild(jq("span:eq(0)"));
+ JQueryLocator msgContent = logMsg.getChild(jq("span:eq(1)"));
if (filterLevel != LogLevel.DEBUG) {
selenium.click(levelInput);
Modified:
root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jOutputPanel/TestA4JOutputPanel.java
===================================================================
---
root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jOutputPanel/TestA4JOutputPanel.java 2010-07-22
23:33:00 UTC (rev 18208)
+++
root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jOutputPanel/TestA4JOutputPanel.java 2010-07-23
07:19:27 UTC (rev 18209)
@@ -33,7 +33,7 @@
import org.jboss.test.selenium.dom.Event;
import org.jboss.test.selenium.locator.Attribute;
import org.jboss.test.selenium.locator.AttributeLocator;
-import org.jboss.test.selenium.locator.ElementLocator;
+import org.jboss.test.selenium.locator.JQueryLocator;
import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.DataProvider;
@@ -47,11 +47,11 @@
*/
public class TestA4JOutputPanel extends AbstractMetamerTest {
- private ElementLocator increaseCounterButton = pjq("input[id$=button]");
- private ElementLocator outputDiv = pjq("div[id$=outputPanel]");
- private ElementLocator outputSpan = pjq("span[id$=outputPanel]");
- private ElementLocator optionBlue =
pjq("input[name$=styleClassInput][value=blue-background]");
- private ElementLocator optionGray =
pjq("input[name$=styleClassInput][value=gray-background]");
+ private JQueryLocator increaseCounterButton = pjq("input[id$=button]");
+ private JQueryLocator outputDiv = pjq("div[id$=outputPanel]");
+ private JQueryLocator outputSpan = pjq("span[id$=outputPanel]");
+ private JQueryLocator optionBlue =
pjq("input[name$=styleClassInput][value=blue-background]");
+ private JQueryLocator optionGray =
pjq("input[name$=styleClassInput][value=gray-background]");
@Override
public URL getTestUrl() {
@@ -98,7 +98,7 @@
@Test(dataProvider = "templatesEventsLayouts")
public void testEvent(String templates, Event event, String type) {
- ElementLocator element = null;
+ JQueryLocator element = null;
if ("inline".equals(type)) {
// for inline layout set background to blue
@@ -131,8 +131,8 @@
@Test(dataProvider = "templates")
public void testAjaxRendered(String templates) {
- ElementLocator ajaxRenderedCheckbox =
pjq("input[id$=ajaxRenderedInput]");
- ElementLocator reRenderAllImage = jq("div.header
img[id$=reRenderAllImage]");
+ JQueryLocator ajaxRenderedCheckbox =
pjq("input[id$=ajaxRenderedInput]");
+ JQueryLocator reRenderAllImage = jq("div.header
img[id$=reRenderAllImage]");
selenium.click(ajaxRenderedCheckbox);
selenium.waitForPageToLoad(TIMEOUT);
@@ -149,10 +149,10 @@
@Test(dataProvider = "templates")
public void testDir(String templates) {
- ElementLocator optionLtr = pjq("input[name$=dirInput][value=ltr]");
- ElementLocator optionRtl = pjq("input[name$=dirInput][value=rtl]");
- ElementLocator optionNone = pjq("input[name$=dirInput][value=]");
- AttributeLocator attributeDir = outputDiv.getAttribute(new
Attribute("dir"));
+ JQueryLocator optionLtr = pjq("input[name$=dirInput][value=ltr]");
+ JQueryLocator optionRtl = pjq("input[name$=dirInput][value=rtl]");
+ JQueryLocator optionNone = pjq("input[name$=dirInput][value=]");
+ AttributeLocator<?> attributeDir = outputDiv.getAttribute(new
Attribute("dir"));
// right-to-left
selenium.click(optionRtl);
@@ -177,8 +177,8 @@
@Test(dataProvider = "templates")
public void testLang(String templates) {
- ElementLocator langInput = pjq("input[id$=langInput]");
- AttributeLocator attributeLang = outputDiv.getAttribute(new
Attribute("lang"));
+ JQueryLocator langInput = pjq("input[id$=langInput]");
+ AttributeLocator<?> attributeLang = outputDiv.getAttribute(new
Attribute("lang"));
selenium.typeKeys(langInput, "en");
selenium.waitForPageToLoad(TIMEOUT);
@@ -195,9 +195,9 @@
@Test(dataProvider = "templates")
public void testLayout(String templates) {
- ElementLocator optionBlock =
pjq("input[name$=layoutInput][value=block]");
- ElementLocator optionInline =
pjq("input[name$=layoutInput][value=inline]");
- ElementLocator optionNone =
pjq("input[name$=layoutInput][value=none]");
+ JQueryLocator optionBlock =
pjq("input[name$=layoutInput][value=block]");
+ JQueryLocator optionInline =
pjq("input[name$=layoutInput][value=inline]");
+ JQueryLocator optionNone =
pjq("input[name$=layoutInput][value=none]");
assertTrue(selenium.isElementPresent(outputDiv), "Div should be rendered on
the beginning.");
assertFalse(selenium.isElementPresent(outputSpan), "Div should be rendered
on the beginning.");
@@ -220,7 +220,7 @@
@Test(dataProvider = "templates")
public void testRendered(String templates) {
- ElementLocator renderedInput = pjq("input[id$=renderedInput]");
+ JQueryLocator renderedInput = pjq("input[id$=renderedInput]");
selenium.click(renderedInput);
selenium.waitForPageToLoad(TIMEOUT);
@@ -240,8 +240,8 @@
@Test(dataProvider = "templates")
public void testStyle(String templates) {
String style = "background-color: magenta; color: white; font-weight:
bold;";
- ElementLocator styleInput = pjq("input[id$=styleInput]");
- AttributeLocator attributeStyle = outputDiv.getAttribute(Attribute.STYLE);
+ JQueryLocator styleInput = pjq("input[id$=styleInput]");
+ AttributeLocator<?> attributeStyle =
outputDiv.getAttribute(Attribute.STYLE);
selenium.typeKeys(styleInput, style);
selenium.waitForPageToLoad(TIMEOUT);
@@ -260,8 +260,8 @@
@Test(dataProvider = "templates")
public void testStyleClass(String templates) {
- ElementLocator optionNone =
pjq("input[name$=styleClassInput][value=]");
- AttributeLocator attributeClass = outputDiv.getAttribute(Attribute.CLASS);
+ JQueryLocator optionNone =
pjq("input[name$=styleClassInput][value=]");
+ AttributeLocator<?> attributeClass =
outputDiv.getAttribute(Attribute.CLASS);
selenium.click(optionBlue);
selenium.waitForPageToLoad(TIMEOUT);
@@ -288,8 +288,8 @@
@Test(dataProvider = "templates")
public void testTitle(String templates) {
String title = "a4j:outputPanel title";
- ElementLocator titleInput = pjq("input[id$=titleInput]");
- AttributeLocator attributeTitle = outputDiv.getAttribute(new
Attribute("title"));
+ JQueryLocator titleInput = pjq("input[id$=titleInput]");
+ AttributeLocator<?> attributeTitle = outputDiv.getAttribute(new
Attribute("title"));
selenium.typeKeys(titleInput, title);
selenium.waitForPageToLoad(TIMEOUT);
Modified:
root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jPoll/TestPoll.java
===================================================================
---
root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jPoll/TestPoll.java 2010-07-22
23:33:00 UTC (rev 18208)
+++
root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jPoll/TestPoll.java 2010-07-23
07:19:27 UTC (rev 18209)
@@ -26,7 +26,7 @@
import org.jboss.test.selenium.dom.Event;
import org.jboss.test.selenium.locator.Attribute;
import org.jboss.test.selenium.locator.AttributeLocator;
-import org.jboss.test.selenium.locator.ElementLocator;
+import org.jboss.test.selenium.locator.IdLocator;
import org.jboss.test.selenium.locator.JQueryLocator;
import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
import org.testng.annotations.AfterMethod;
@@ -53,10 +53,10 @@
private static final int MAX_DEVIATION = 100;
private static final int MAX_AVERAGE_DEVIATION = 50;
- ElementLocator attributeEnabled = id("form:attributes:enabledInput");
- ElementLocator attributeInterval = id("form:attributes:intervalInput");
+ IdLocator attributeEnabled = id("form:attributes:enabledInput");
+ IdLocator attributeInterval = id("form:attributes:intervalInput");
JQueryLocator time = pjq("span[id$=time]");
- AttributeLocator clientTime =
pjq("span[id$=clientDate]").getAttribute(ATTRIBUTE_TITLE);
+ AttributeLocator<?> clientTime =
pjq("span[id$=clientDate]").getAttribute(ATTRIBUTE_TITLE);
@Override
public URL getTestUrl() {
Modified:
root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jPush/AbstractPushTest.java
===================================================================
---
root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jPush/AbstractPushTest.java 2010-07-22
23:33:00 UTC (rev 18208)
+++
root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jPush/AbstractPushTest.java 2010-07-23
07:19:27 UTC (rev 18209)
@@ -33,7 +33,7 @@
import org.apache.commons.httpclient.HttpMethod;
import org.apache.commons.httpclient.methods.GetMethod;
import org.jboss.test.selenium.SystemProperties;
-import org.jboss.test.selenium.locator.ElementLocator;
+import org.jboss.test.selenium.locator.JQueryLocator;
import org.jboss.test.selenium.request.RequestType;
import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
import org.testng.annotations.BeforeClass;
@@ -50,7 +50,7 @@
protected PushAttributes pushAttributes = new PushAttributes();
- private ElementLocator outputCounter = pjq("span[id$=outputCounter]");
+ private JQueryLocator outputCounter = pjq("span[id$=outputCounter]");
private HttpClient httpClient;
private HttpMethod pushMethod;
Modified:
root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jPush/PushAttributes.java
===================================================================
---
root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jPush/PushAttributes.java 2010-07-22
23:33:00 UTC (rev 18208)
+++
root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jPush/PushAttributes.java 2010-07-23
07:19:27 UTC (rev 18209)
@@ -26,7 +26,7 @@
import org.jboss.test.selenium.framework.AjaxSelenium;
import org.jboss.test.selenium.framework.AjaxSeleniumProxy;
-import org.jboss.test.selenium.locator.ElementLocator;
+import org.jboss.test.selenium.locator.IdLocator;
/**
* The control point for setting different attributes for a4j:push test page.
@@ -38,7 +38,7 @@
private AjaxSelenium selenium = AjaxSeleniumProxy.getInstance();
- private ElementLocator attributeInterval =
id("form:attributes:intervalInput");
+ private IdLocator attributeInterval = id("form:attributes:intervalInput");
public void setInterval(long miliseconds) {
selenium.type(attributeInterval, String.valueOf(miliseconds));
Modified:
root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jPush/TestInterval.java
===================================================================
---
root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jPush/TestInterval.java 2010-07-22
23:33:00 UTC (rev 18208)
+++
root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jPush/TestInterval.java 2010-07-23
07:19:27 UTC (rev 18209)
@@ -49,7 +49,7 @@
private static final int ITERATION_COUNT = 3;
private static final int MULTIPLE_PUSH_COUNT = 5;
- AttributeLocator clientTime =
pjq("span[id$=clientDate]").getAttribute(ATTRIBUTE_TITLE);
+ AttributeLocator<?> clientTime =
pjq("span[id$=clientDate]").getAttribute(ATTRIBUTE_TITLE);
private long startTime;
private int counter;
Modified:
root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/hCommandButton/TestHCommandButton.java
===================================================================
---
root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/hCommandButton/TestHCommandButton.java 2010-07-22
23:33:00 UTC (rev 18208)
+++
root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/hCommandButton/TestHCommandButton.java 2010-07-23
07:19:27 UTC (rev 18209)
@@ -164,7 +164,7 @@
@Test(dataProvider = "templates")
public void testDisabled(String templates) {
JQueryLocator disabledChecbox = pjq("input[id$=disabledInput]");
- AttributeLocator disabledAttribute = button.getAttribute(new
Attribute("disabled"));
+ AttributeLocator<?> disabledAttribute = button.getAttribute(new
Attribute("disabled"));
selenium.click(disabledChecbox);
selenium.waitForPageToLoad(TIMEOUT);
@@ -248,7 +248,7 @@
JQueryLocator big = pjq("input[name$=styleClassInput][value=big]");
JQueryLocator none = pjq("input[name$=styleClassInput][value=]");
- final AttributeLocator classAttribute = button.getAttribute(new
Attribute("class"));
+ final AttributeLocator<?> classAttribute = button.getAttribute(new
Attribute("class"));
selenium.click(wide);
selenium.waitForPageToLoad(TIMEOUT);
@@ -266,7 +266,7 @@
@Test(dataProvider = "templates")
public void testStyle(String templates) {
JQueryLocator styleInput = pjq("input[id$=styleInput]");
- final AttributeLocator attribute = button.getAttribute(new
Attribute("style"));
+ final AttributeLocator<?> attribute = button.getAttribute(new
Attribute("style"));
final String value = "font-size: 20px;";
selenium.type(styleInput, value);
@@ -278,7 +278,7 @@
@Test(dataProvider = "templates")
public void testValue(String templates) {
JQueryLocator valueInput = pjq("input[id$=valueInput]");
- final AttributeLocator attribute = button.getAttribute(new
Attribute("value"));
+ final AttributeLocator<?> attribute = button.getAttribute(new
Attribute("value"));
final String value = "new label";
selenium.type(valueInput, value);
Modified:
root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richExtendedDataTable/TestScroller.java
===================================================================
---
root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richExtendedDataTable/TestScroller.java 2010-07-22
23:33:00 UTC (rev 18208)
+++
root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richExtendedDataTable/TestScroller.java 2010-07-23
07:19:27 UTC (rev 18209)
@@ -27,7 +27,7 @@
import java.net.URL;
-import org.jboss.test.selenium.locator.ElementLocator;
+import org.jboss.test.selenium.locator.IdLocator;
import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
import org.testng.annotations.Test;
@@ -45,7 +45,7 @@
DataScroller dataScroller1 = new
DataScroller(pjq("span.rf-ds[id$=scroller1]"));
DataScroller dataScroller2 = new
DataScroller(pjq("span.rf-ds[id$=scroller2]"));
DataTable table = new DataTable(pjq("div.rf-edt[id$=richEDT]"));
- ElementLocator attributeRowsInput = id("form:attributes:rowsInput");
+ IdLocator attributeRowsInput = id("form:attributes:rowsInput");
@Override
public URL getTestUrl() {