Skip to content

Commit

Permalink
Ignore failing HtmlUnitDriver tests
Browse files Browse the repository at this point in the history
  • Loading branch information
shs96c committed Oct 6, 2016
1 parent 30ef766 commit bf47492
Show file tree
Hide file tree
Showing 13 changed files with 76 additions and 48 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public void testTypingIntoAnIFrameWithContentEditableOrDesignModeSet() {
@JavascriptEnabled
@NotYetImplemented(HTMLUNIT)
@Test
@Ignore(MARIONETTE)
@Ignore({HTMLUNIT, MARIONETTE})
public void testNonPrintableCharactersShouldWorkWithContentEditableOrDesignModeSet() {
assumeFalse("FIXME: Fails in Firefox on Linux with synthesized events",
isFirefox(driver) &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ public void testSubmittingFormFromFormInputTextElementShouldFireOnSubmitForThatF
}

@JavascriptEnabled
@Ignore(value = {SAFARI, MARIONETTE},
@Ignore(value = {SAFARI, MARIONETTE, HTMLUNIT},
reason = "Does not yet support file uploads", issues = {4220})
@Test
public void testUploadingFileShouldFireOnChangeEvent() throws IOException {
Expand Down
21 changes: 12 additions & 9 deletions java/client/test/org/openqa/selenium/ElementAttributeTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,6 @@

package org.openqa.selenium;

import org.junit.Test;
import org.openqa.selenium.testing.Ignore;
import org.openqa.selenium.testing.JUnit4TestBase;
import org.openqa.selenium.testing.JavascriptEnabled;
import org.openqa.selenium.testing.NotYetImplemented;
import org.openqa.selenium.testing.TestUtilities;

import java.util.List;

import static org.hamcrest.Matchers.anyOf;
import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.equalTo;
Expand All @@ -42,6 +33,15 @@
import static org.openqa.selenium.testing.Driver.HTMLUNIT;
import static org.openqa.selenium.testing.Driver.MARIONETTE;

import org.junit.Test;
import org.openqa.selenium.testing.Ignore;
import org.openqa.selenium.testing.JUnit4TestBase;
import org.openqa.selenium.testing.JavascriptEnabled;
import org.openqa.selenium.testing.NotYetImplemented;
import org.openqa.selenium.testing.TestUtilities;

import java.util.List;

public class ElementAttributeTest extends JUnit4TestBase {

@Test
Expand Down Expand Up @@ -330,6 +330,7 @@ public void testGetAttributeDoesNotReturnAnObjectForSvgProperties() {
}

@Test
@Ignore(value = HTMLUNIT, reason = "Possible bug in getAttribute?")
public void testCanRetrieveTheCurrentValueOfATextFormField_textInput() {
driver.get(pages.formPage);
WebElement element = driver.findElement(By.id("working"));
Expand All @@ -339,6 +340,7 @@ public void testCanRetrieveTheCurrentValueOfATextFormField_textInput() {
}

@Test
@Ignore(value = HTMLUNIT, reason = "Possible bug in getAttribute?")
public void testCanRetrieveTheCurrentValueOfATextFormField_emailInput() {
driver.get(pages.formPage);
WebElement element = driver.findElement(By.id("email"));
Expand All @@ -348,6 +350,7 @@ public void testCanRetrieveTheCurrentValueOfATextFormField_emailInput() {
}

@Test
@Ignore(value = HTMLUNIT, reason = "Possible bug in getAttribute?")
public void testCanRetrieveTheCurrentValueOfATextFormField_textArea() {
driver.get(pages.formPage);
WebElement element = driver.findElement(By.id("emptyTextArea"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ public void shouldBeAbleToReturnArraysOfWebElementsFromAsyncScripts() {

@JavascriptEnabled
@Test
@Ignore(value = {MARIONETTE})
@Ignore(value = {HTMLUNIT, MARIONETTE})
public void shouldTimeoutIfScriptDoesNotInvokeCallback() {
driver.get(pages.ajaxyPage);
try {
Expand All @@ -175,7 +175,7 @@ public void shouldTimeoutIfScriptDoesNotInvokeCallback() {

@JavascriptEnabled
@Test
@Ignore(value = {MARIONETTE})
@Ignore(value = {HTMLUNIT, MARIONETTE})
public void shouldTimeoutIfScriptDoesNotInvokeCallbackWithAZeroTimeout() {
driver.get(pages.ajaxyPage);
try {
Expand All @@ -198,7 +198,7 @@ public void shouldNotTimeoutIfScriptCallsbackInsideAZeroTimeout() {

@JavascriptEnabled
@Test
@Ignore(value = {MARIONETTE})
@Ignore(value = {HTMLUNIT, MARIONETTE})
public void shouldTimeoutIfScriptDoesNotInvokeCallbackWithLongTimeout() {
driver.manage().timeouts().setScriptTimeout(500, TimeUnit.MILLISECONDS);
driver.get(pages.ajaxyPage);
Expand Down
23 changes: 15 additions & 8 deletions java/client/test/org/openqa/selenium/FormHandlingTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ public void testShouldNotBeAbleToSubmitAFormThatDoesNotExist() {
}

@Test
@Ignore(value = HTMLUNIT, reason = "Possible bug in getAttribute?")
public void testShouldBeAbleToEnterTextIntoATextAreaBySettingItsValue() {
driver.get(pages.javascriptPage);
WebElement textarea = driver.findElement(By.id("keyUpArea"));
Expand All @@ -109,6 +110,7 @@ public void testShouldBeAbleToEnterTextIntoATextAreaBySettingItsValue() {
}

@Test
@Ignore(value = HTMLUNIT, reason = "Possible bug in getAttribute?")
public void testSendKeysKeepsCapitalization() {
driver.get(pages.javascriptPage);
WebElement textarea = driver.findElement(By
Expand Down Expand Up @@ -140,6 +142,7 @@ public void testShouldSubmitAFormUsingTheEnterKey() {
}

@Test
@Ignore(value = HTMLUNIT, reason = "Possible bug in getAttribute?")
public void testShouldEnterDataIntoFormFields() {
driver.get(pages.xhtmlTestPage);
WebElement element = driver.findElement(By.xpath("//form[@name='someForm']/input[@id='username']"));
Expand All @@ -154,8 +157,9 @@ public void testShouldEnterDataIntoFormFields() {
assertThat(newFormValue, equalTo("some text"));
}

@Ignore(value = {SAFARI, MARIONETTE},
reason = "Does not yet support file uploads", issues = {4220})
@Ignore(value = {SAFARI, MARIONETTE, HTMLUNIT},
reason = "HtmlUnit bug with getAttribute. Does not yet support file uploads",
issues = {4220})
@Test
public void testShouldBeAbleToAlterTheContentsOfAFileUploadInputElement() throws IOException {
driver.get(pages.formPage);
Expand All @@ -171,7 +175,7 @@ public void testShouldBeAbleToAlterTheContentsOfAFileUploadInputElement() throws
assertTrue(uploadPath.endsWith(file.getName()));
}

@Ignore(value = {SAFARI, MARIONETTE},
@Ignore(value = {SAFARI, MARIONETTE, HTMLUNIT},
reason = "Does not yet support file uploads", issues = {4220})
@Test
public void testShouldBeAbleToSendKeysToAFileUploadInputElementInAnXhtmlDocument()
Expand Down Expand Up @@ -218,6 +222,7 @@ public void testShouldBeAbleToUploadTheSameFileTwice() throws IOException {
}

@Test
@Ignore(value = HTMLUNIT, reason = "Possible bug in getAttribute?")
public void testSendingKeyboardEventsShouldAppendTextInInputs() {
driver.get(pages.formPage);
WebElement element = driver.findElement(By.id("working"));
Expand All @@ -231,6 +236,7 @@ public void testSendingKeyboardEventsShouldAppendTextInInputs() {
}

@Test
@Ignore(value = HTMLUNIT, reason = "Possible bug in getAttribute?")
public void testSendingKeyboardEventsShouldAppendTextInInputsWithExistingValue() {
driver.get(pages.formPage);
WebElement element = driver.findElement(By.id("inputWithText"));
Expand All @@ -241,6 +247,7 @@ public void testSendingKeyboardEventsShouldAppendTextInInputsWithExistingValue()
}

@Test
@Ignore(value = HTMLUNIT, reason = "Possible bug in getAttribute?")
public void testSendingKeyboardEventsShouldAppendTextInTextAreas() {
driver.get(pages.formPage);
WebElement element = driver.findElement(By.id("withText"));
Expand Down Expand Up @@ -273,34 +280,34 @@ public void handleFormWithJavascriptAction() {
assertEquals("Tasty cheese", text);
}

@Ignore(value = {SAFARI}, reason = "untested")
@Ignore(value = {HTMLUNIT, SAFARI}, reason = "untested")
@Test
public void testCanClickOnASubmitButton() {
checkSubmitButton("internal_explicit_submit");
}


@Ignore(value = {SAFARI}, reason = "untested")
@Ignore(value = {HTMLUNIT, SAFARI}, reason = "untested")
@Test
public void testCanClickOnASubmitButtonNestedSpan() {
checkSubmitButton("internal_span_submit");
}

@Ignore(value = {SAFARI}, reason = "untested")
@Ignore(value = {HTMLUNIT, SAFARI}, reason = "untested")
@Test
public void testCanClickOnAnImplicitSubmitButton() {
assumeFalse(isIe6(driver) || isIe7(driver) );
checkSubmitButton("internal_implicit_submit");
}

@Ignore(value = {IE, SAFARI},
@Ignore(value = {HTMLUNIT, IE, SAFARI},
reason = "IE: failed; Others: untested")
@Test
public void testCanClickOnAnExternalSubmitButton() {
checkSubmitButton("external_explicit_submit");
}

@Ignore(value = {IE, SAFARI},
@Ignore(value = {HTMLUNIT, IE, SAFARI},
reason = "IE: failed; Others: untested")
@Test
public void testCanClickOnAnExternalImplicitSubmitButton() {
Expand Down
4 changes: 3 additions & 1 deletion java/client/test/org/openqa/selenium/I18nTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ public void testCn() {
}

@Test
@Ignore(value = HTMLUNIT, reason = "Possible bug in getAttribute?")
public void testEnteringHebrewTextFromLeftToRight() {
driver.get(pages.chinesePage);
WebElement input = driver.findElement(By.name("i18n"));
Expand All @@ -76,6 +77,7 @@ public void testEnteringHebrewTextFromLeftToRight() {
}

@Test
@Ignore(value = HTMLUNIT, reason = "Possible bug in getAttribute?")
public void testEnteringHebrewTextFromRightToLeft() {
driver.get(pages.chinesePage);
WebElement input = driver.findElement(By.name("i18n"));
Expand All @@ -87,7 +89,7 @@ public void testEnteringHebrewTextFromRightToLeft() {

@Test
@Ignore(
value = {MARIONETTE, CHROME},
value = {MARIONETTE, HTMLUNIT, CHROME},
reason = "CHROME: ChromeDriver only supports characters in the BMP")
public void testEnteringSupplementaryCharacters() {
assumeFalse("IE: versions less thank 10 have issue 5069",
Expand Down
10 changes: 7 additions & 3 deletions java/client/test/org/openqa/selenium/ReferrerTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ public static void readPages() throws IOException {
*/
@Test
@NotYetImplemented(HTMLUNIT)
@Ignore(value = HTMLUNIT, reason = "Possible bug in getAttribute?")
@NeedsLocalEnvironment
public void basicHistoryNavigationWithoutAProxy() {
testServer1.start();
Expand All @@ -143,6 +144,7 @@ public void basicHistoryNavigationWithoutAProxy() {
*/
@Test
@NotYetImplemented(HTMLUNIT)
@Ignore(value = HTMLUNIT, reason = "Possible bug in getAttribute?")
@NeedsLocalEnvironment
public void crossDomainHistoryNavigationWithoutAProxy() {

Expand Down Expand Up @@ -174,6 +176,7 @@ public void crossDomainHistoryNavigationWithoutAProxy() {
*/
@Test
@NotYetImplemented(HTMLUNIT)
@Ignore(value = HTMLUNIT, reason = "Possible bug in getAttribute?")
@NeedsLocalEnvironment
public void basicHistoryNavigationWithADirectProxy() {
testServer1.start();
Expand Down Expand Up @@ -203,6 +206,7 @@ public void basicHistoryNavigationWithADirectProxy() {
*/
@Test
@NotYetImplemented(HTMLUNIT)
@Ignore(value = HTMLUNIT, reason = "Possible bug in getAttribute?")
@NeedsLocalEnvironment
public void crossDomainHistoryNavigationWithADirectProxy() {
testServer1.start();
Expand Down Expand Up @@ -236,7 +240,7 @@ public void crossDomainHistoryNavigationWithADirectProxy() {
* Tests navigation across multiple domains when the browser is configured to use a proxy that
* redirects the second domain to another host.
*/
@Ignore(MARIONETTE)
@Ignore({HTMLUNIT, MARIONETTE})
@NotYetImplemented(HTMLUNIT)
@Test
@NeedsLocalEnvironment
Expand Down Expand Up @@ -277,7 +281,7 @@ public void crossDomainHistoryNavigationWithAProxiedHost() {
* intercepts requests to a specific host (www.example.com) - all other requests are permitted
* to connect directly to the target server.
*/
@Ignore(MARIONETTE)
@Ignore({HTMLUNIT, MARIONETTE})
@NotYetImplemented(HTMLUNIT)
@Test
@NeedsLocalEnvironment
Expand Down Expand Up @@ -316,7 +320,7 @@ public void crossDomainHistoryNavigationWhenProxyInterceptsHostRequests() {
* intercepts requests for page 2.
*/
@Ignore(
value = {IE, MARIONETTE},
value = {HTMLUNIT, IE, MARIONETTE},
reason = "IEDriver does not disable automatic proxy caching, causing this test to fail.",
issues = 6629)
@NotYetImplemented(HTMLUNIT)
Expand Down
23 changes: 11 additions & 12 deletions java/client/test/org/openqa/selenium/TextHandlingTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@

package org.openqa.selenium;

import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.endsWith;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.not;
import static org.hamcrest.Matchers.startsWith;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotSame;
Expand All @@ -26,18 +32,10 @@
import static org.openqa.selenium.testing.Driver.HTMLUNIT;
import static org.openqa.selenium.testing.Driver.IE;

import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.endsWith;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.not;
import static org.hamcrest.Matchers.startsWith;

import org.junit.Test;

import org.hamcrest.Description;
import org.hamcrest.Matcher;
import org.hamcrest.TypeSafeMatcher;
import org.junit.Test;
import org.openqa.selenium.testing.Ignore;
import org.openqa.selenium.testing.JUnit4TestBase;
import org.openqa.selenium.testing.JavascriptEnabled;
Expand Down Expand Up @@ -189,7 +187,7 @@ public void testShouldRetainTheFormatingOfTextWithinAPreElementThatIsWithinARegu
"after pre"));
}

@Ignore(value = {IE}, reason = "IE: inserts \r\n instead of \n")
@Ignore(value = {HTMLUNIT, IE}, reason = "IE: inserts \r\n instead of \n")
@Test
public void testShouldBeAbleToSetMoreThanOneLineOfTextInATextArea() {
driver.get(pages.formPage);
Expand All @@ -207,6 +205,7 @@ public void testShouldBeAbleToSetMoreThanOneLineOfTextInATextArea() {
}

@Test
@Ignore(value = HTMLUNIT, reason = "Possible bug in getAttribute?")
public void testShouldBeAbleToEnterDatesAfterFillingInOtherValuesFirst() {
driver.get(pages.formPage);
WebElement input = driver.findElement(By.id("working"));
Expand Down Expand Up @@ -351,7 +350,7 @@ public void testTextOfATextAreaShouldBeEqualToItsDefaultText() {
}

@Test
@Ignore(value = {IE})
@Ignore(value = {HTMLUNIT, IE})
@NotYetImplemented(HTMLUNIT)
public void testTextOfATextAreaShouldBeEqualToItsDefaultTextEvenAfterTyping() {
driver.get(pages.formPage);
Expand All @@ -363,7 +362,7 @@ public void testTextOfATextAreaShouldBeEqualToItsDefaultTextEvenAfterTyping() {

@Test
@JavascriptEnabled
@Ignore(value = {IE})
@Ignore(value = {HTMLUNIT, IE})
@NotYetImplemented(HTMLUNIT)
public void testTextOfATextAreaShouldBeEqualToItsDefaultTextEvenAfterChangingTheValue() {
driver.get(pages.formPage);
Expand Down
Loading

0 comments on commit bf47492

Please sign in to comment.