This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

testDisabled and testEnableManualInput fixed for slider, spinner and …

…select
  • Loading branch information...
1 parent e5ea19e commit 1a1811aeb732f76d72ef4c6b56f233bb0322f191 @ppitonak ppitonak committed Dec 17, 2012
@@ -252,6 +252,7 @@ public void testIncreaseSelectedClass() {
selenium.mouseDown(right);
assertTrue(selenium.belongsClass(right, value), "increaseSelectedClass does not work");
+ selenium.mouseUp(right);
}
@Test
@@ -147,7 +147,7 @@ public void testDisabled() {
inputNumberSpinnerAttributes.set(InputNumberSpinnerAttributes.disabled, Boolean.TRUE);
AttributeLocator<?> disabledAttribute = input.getAttribute(new Attribute("disabled"));
- assertEquals(selenium.getAttribute(disabledAttribute), "true", "Input should be disabled.");
+ assertEquals(selenium.getAttribute(disabledAttribute), "disabled", "Input should be disabled.");
assertFalse(selenium.isElementPresent(up), "Arrow up should be disabled.");
assertFalse(selenium.isElementPresent(down), "Arrow down should be disabled.");
@@ -163,7 +163,7 @@ public void testDisabled() {
public void testEnableManualInput() {
inputNumberSpinnerAttributes.set(InputNumberSpinnerAttributes.enableManualInput, Boolean.FALSE);
AttributeLocator<?> readonlyAttribute = input.getAttribute(new Attribute("readonly"));
- assertEquals(selenium.getAttribute(readonlyAttribute), "true", "Input should be read-only.");
+ assertEquals(selenium.getAttribute(readonlyAttribute), "readonly", "Input should be read-only.");
assertTrue(selenium.isElementPresent(up), "Arrow up should be displayed.");
assertTrue(selenium.isElementPresent(down), "Arrow down should be displayed.");
@@ -38,11 +38,12 @@
import static org.testng.Assert.assertTrue;
import java.net.URL;
+
import javax.faces.event.PhaseId;
+
import org.jboss.arquillian.ajocado.css.CssProperty;
import org.jboss.arquillian.ajocado.dom.Attribute;
import org.jboss.arquillian.ajocado.dom.Event;
-import org.jboss.arquillian.ajocado.javascript.KeyCode;
import org.jboss.arquillian.ajocado.locator.JQueryLocator;
import org.jboss.arquillian.ajocado.locator.attribute.AttributeLocator;
import org.jboss.test.selenium.waiting.EventFiredCondition;
@@ -182,7 +183,7 @@ public void testDisabled() {
assertTrue(selenium.belongsClass(button, "rf-sel-btn-dis"), "Button should contain class rf-sel-btn-dis.");
AttributeLocator<?> disabledAttr = input.getAttribute(new Attribute("disabled"));
assertTrue(selenium.isAttributePresent(disabledAttr), "Input should be disabled.");
- assertEquals(selenium.getAttribute(disabledAttr), "true", "Input should be disabled.");
+ assertEquals(selenium.getAttribute(disabledAttr), "disabled", "Input should be disabled.");
}
@Test
@@ -191,7 +192,7 @@ public void testEnableManualInput() {
selectAttributes.set(SelectAttributes.enableManualInput, Boolean.FALSE);
AttributeLocator<?> readonlyAttr = input.getAttribute(new Attribute("readonly"));
- assertEquals(selenium.getAttribute(readonlyAttr), "true", "Input should be read-only");
+ assertEquals(selenium.getAttribute(readonlyAttr), "readonly", "Input should be read-only");
selenium.mouseDown(button);
assertTrue(selenium.isVisible(popup), "Popup should be displayed.");

0 comments on commit 1a1811a

Please sign in to comment.