Skip to content

Commit

Permalink
Java: Unignoring tests in marionette
Browse files Browse the repository at this point in the history
  • Loading branch information
barancev committed Jan 28, 2016
1 parent cb5dff3 commit e212e3a
Show file tree
Hide file tree
Showing 13 changed files with 33 additions and 66 deletions.
4 changes: 1 addition & 3 deletions java/client/test/org/openqa/selenium/AlertsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ public void testShouldAllowAUserToSetTheValueOfAPrompt() {
wait.until(textInElementLocated(By.id("text"), "cheese"));
}

@Ignore(value = {CHROME, MARIONETTE},
@Ignore(value = {CHROME},
reason = "Marionette: https://github.com/jgraham/wires/issues/17")
@JavascriptEnabled
@Test
Expand Down Expand Up @@ -225,7 +225,6 @@ public void testAlertShouldNotAllowAdditionalCommandsIfDismissed() {
fail("Expected NoAlertPresentException");
}

@Ignore(MARIONETTE)
@JavascriptEnabled
@NoDriverAfterTest // So that next test never starts with "inside a frame" base state.
@Test
Expand All @@ -241,7 +240,6 @@ public void testShouldAllowUsersToAcceptAnAlertInAFrame() {
assertEquals("Testing Alerts", driver.getTitle());
}

@Ignore(MARIONETTE)
@JavascriptEnabled
@NoDriverAfterTest // So that next test never starts with "inside a frame" base state.
@Test
Expand Down
9 changes: 4 additions & 5 deletions java/client/test/org/openqa/selenium/ClickScrollingTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ public void testShouldBeAbleToClickElementInAFrameThatIsOutOfView() {

@NoDriverAfterTest // So that next test never starts with "inside a frame" base state.
@Test
@Ignore(value = {SAFARI, MARIONETTE}, reason = "not tested")
@Ignore(value = {SAFARI}, reason = "not tested")
public void testShouldBeAbleToClickElementThatIsOutOfViewInAFrame() {
driver.get(appServer.whereIs("scrolling_tests/page_with_scrolling_frame.html"));
driver.switchTo().frame("scrolling_frame");
Expand All @@ -181,7 +181,7 @@ public void testShouldNotBeAbleToClickElementThatIsOutOfViewInANonScrollableFram

@NoDriverAfterTest // So that next test never starts with "inside a frame" base state.
@Test
@Ignore(value = {SAFARI, MARIONETTE}, reason = "not tested")
@Ignore(value = {SAFARI}, reason = "not tested")
public void testShouldBeAbleToClickElementThatIsOutOfViewInAFrameThatIsOutOfView() {
driver.get(appServer.whereIs("scrolling_tests/page_with_scrolling_frame_out_of_view.html"));
driver.switchTo().frame("scrolling_frame");
Expand All @@ -192,7 +192,7 @@ public void testShouldBeAbleToClickElementThatIsOutOfViewInAFrameThatIsOutOfView

@NoDriverAfterTest // So that next test never starts with "inside a frame" base state.
@Test
@Ignore(value = {SAFARI, MARIONETTE}, reason = "not tested")
@Ignore(value = {SAFARI}, reason = "not tested")
public void testShouldBeAbleToClickElementThatIsOutOfViewInANestedFrame() {
driver.get(appServer.whereIs("scrolling_tests/page_with_nested_scrolling_frames.html"));
driver.switchTo().frame("scrolling_frame");
Expand All @@ -204,7 +204,7 @@ public void testShouldBeAbleToClickElementThatIsOutOfViewInANestedFrame() {

@NoDriverAfterTest // So that next test never starts with "inside a frame" base state.
@Test
@Ignore(value = {SAFARI, MARIONETTE}, reason = "not tested")
@Ignore(value = {SAFARI}, reason = "not tested")
public void testShouldBeAbleToClickElementThatIsOutOfViewInANestedFrameThatIsOutOfView() {
driver.get(appServer.whereIs("scrolling_tests/page_with_nested_scrolling_frames_out_of_view.html"));
driver.switchTo().frame("scrolling_frame");
Expand All @@ -216,7 +216,6 @@ public void testShouldBeAbleToClickElementThatIsOutOfViewInANestedFrameThatIsOut

@JavascriptEnabled
@Test
@Ignore(value = {MARIONETTE}, reason = "getSize issue https://bugzilla.mozilla.org/show_bug.cgi?id=1199925")
public void testShouldNotScrollWhenGettingElementSize() {
driver.get(appServer.whereIs("scroll3.html"));
long scrollTop = getScrollTop();
Expand Down
6 changes: 2 additions & 4 deletions java/client/test/org/openqa/selenium/ClickTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ public void testCanClickOnALinkAndFollowIt() {
wait.until(titleIs("XHTML Test Page"));
}

@Ignore(value = {MARIONETTE}, reason = "Not tested.")
@Test
public void testCanClickOnALinkThatOverflowsAndFollowIt() {
driver.findElement(By.id("overflowLink")).click();
Expand Down Expand Up @@ -131,7 +130,6 @@ public void testJsLocatedElementsCanUpdateFramesIfFoundSomehowElse() {

@JavascriptEnabled
@Test
@Ignore(value = {MARIONETTE}, reason = "sendKeys is not standard compliant yet")
public void testCanClickOnAnElementWithTopSetToANegativeNumber() {
String page = appServer.whereIs("styledPage.html");
driver.get(page);
Expand All @@ -151,7 +149,7 @@ public void testShouldClickOnFirstBoundingClientRectWithNonZeroSize() {
}

@JavascriptEnabled
@Ignore(value = {CHROME}, reason = "Not implemented")
@Ignore(value = {CHROME, MARIONETTE}, reason = "Not implemented")
@Test
public void testShouldSetRelatedTargetForMouseOver() {
driver.get(pages.javascriptPage);
Expand All @@ -165,7 +163,7 @@ public void testShouldSetRelatedTargetForMouseOver() {

@JavascriptEnabled
@NoDriverAfterTest
@Ignore(value = {SAFARI, MARIONETTE}, reason = "Safari: issue 3693")
@Ignore(value = {SAFARI}, reason = "Safari: issue 3693")
@Test
public void testShouldOnlyFollowHrefOnce() {
driver.get(pages.clicksPage);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,6 @@ public void testCannotGetCookiesWithPathDifferingOnlyInCase() {
}

@Test
@Ignore(MARIONETTE)
public void testShouldNotGetCookieOnDifferentDomain() {
assumeTrue(domainHelper.checkHasValidAlternateHostname());

Expand Down Expand Up @@ -371,7 +370,6 @@ public void testCookieEqualityAfterSetAndGet() {
}

@Test
@Ignore(MARIONETTE)
public void testRetainsCookieExpiry() {
Cookie addedCookie =
new Cookie.Builder("fish", "cod")
Expand All @@ -385,7 +383,7 @@ public void testRetainsCookieExpiry() {
assertEquals(addedCookie.getExpiry(), retrieved.getExpiry());
}

@Ignore(value = {IE, PHANTOMJS, SAFARI, MARIONETTE})
@Ignore(value = {IE, PHANTOMJS, SAFARI})
@Test
public void canHandleSecureCookie() {
driver.get(domainHelper.getSecureUrlForFirstValidHostname("animals"));
Expand All @@ -403,7 +401,7 @@ public void canHandleSecureCookie() {
assertNotNull(retrieved);
}

@Ignore(value = {IE, PHANTOMJS, SAFARI, MARIONETTE})
@Ignore(value = {IE, PHANTOMJS, SAFARI})
@Test
public void testRetainsCookieSecure() {
driver.get(domainHelper.getSecureUrlForFirstValidHostname("animals"));
Expand Down Expand Up @@ -438,7 +436,6 @@ public void canHandleHttpOnlyCookie() {
assertNotNull(retrieved);
}

@Ignore(reason = "Needs jetty upgrade (servlet api 3)")
@Test
public void testRetainsHttpOnlyFlag() {
Cookie addedCookie =
Expand Down Expand Up @@ -486,7 +483,7 @@ public void testDeleteNotExistedCookie() {
driver.manage().deleteCookieNamed(key);
}

@Ignore(value = {CHROME, FIREFOX, IE, PHANTOMJS, SAFARI, MARIONETTE})
@Ignore(value = {CHROME, FIREFOX, IE, PHANTOMJS, SAFARI})
@Test
public void testShouldDeleteOneOfTheCookiesWithTheSameName() {
driver.get(domainHelper.getUrlForFirstValidHostname("/common/animals"));
Expand Down Expand Up @@ -609,7 +606,6 @@ private void addCookieOnServerSide(Cookie cookie) {
}

@Test
@Ignore(MARIONETTE)
public void deleteAllCookies() throws Exception {
assumeTrue(domainHelper.checkHasValidAlternateHostname());

Expand Down
1 change: 0 additions & 1 deletion java/client/test/org/openqa/selenium/CssValueTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ public void testGetCssValueShouldReturnStandardizedColour() {

@JavascriptEnabled
@Test
@Ignore(MARIONETTE)
public void testShouldAllowInheritedStylesToBeUsed() {
driver.get(pages.javascriptPage);

Expand Down
37 changes: 11 additions & 26 deletions java/client/test/org/openqa/selenium/ElementFindingTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ public void testShouldNotBeAbleToLocateByIdMultipleElementsThatDoNotExist() {
}

@Test(expected = NoSuchElementException.class)
@Ignore(value = MARIONETTE, reason = "https://bugzilla.mozilla.org/show_bug.cgi?id=1204504")
public void testFindingASingleElementByEmptyIdShouldThrow() {
driver.get(pages.formPage);
driver.findElement(By.id(""));
Expand Down Expand Up @@ -157,29 +156,25 @@ public void testShouldNotBeAbleToLocateByNameMultipleElementsThatDoNotExist() {
}

@Test(expected = NoSuchElementException.class)
@Ignore(value = MARIONETTE, reason = "https://bugzilla.mozilla.org/show_bug.cgi?id=1204504")
public void testFindingASingleElementByEmptyNameShouldThrow() {
driver.get(pages.formPage);
driver.findElement(By.name(""));
}

@Test
@Ignore(value = MARIONETTE, reason = "https://bugzilla.mozilla.org/show_bug.cgi?id=1204504")
public void testFindingMultipleElementsByEmptyNameShouldReturnEmptyList() {
driver.get(pages.formPage);
List<WebElement> elements = driver.findElements(By.name(""));
assertThat(elements.size(), is(0));
}

@Test(expected = NoSuchElementException.class)
@Ignore(value = MARIONETTE, reason = "https://bugzilla.mozilla.org/show_bug.cgi?id=1204504")
public void testFindingASingleElementByNameWithSpaceShouldThrow() {
driver.get(pages.formPage);
driver.findElement(By.name("nonexistent button"));
}

@Test
@Ignore(value = MARIONETTE, reason = "https://bugzilla.mozilla.org/show_bug.cgi?id=1204504")
public void testFindingMultipleElementsByNameWithSpaceShouldReturnEmptyList() {
driver.get(pages.formPage);
List<WebElement> elements = driver.findElements(By.name("nonexistent button"));
Expand Down Expand Up @@ -218,14 +213,12 @@ public void testShouldNotBeAbleToLocateByTagNameMultipleElementsThatDoNotExist()
}

@Test(expected = NoSuchElementException.class)
@Ignore(value = MARIONETTE, reason = "https://bugzilla.mozilla.org/show_bug.cgi?id=1204504")
public void testFindingASingleElementByEmptyTagNameShouldThrow() {
driver.get(pages.formPage);
driver.findElement(By.tagName(""));
}

@Test(expected = NoSuchElementException.class)
@Ignore(value = MARIONETTE, reason = "https://bugzilla.mozilla.org/show_bug.cgi?id=1204504")
public void testFindingMultipleElementsByEmptyTagNameShouldThrow() {
driver.get(pages.formPage);
driver.findElements(By.tagName(""));
Expand Down Expand Up @@ -304,14 +297,14 @@ public void testShouldNotFindElementByClassWhenTheNameQueriedIsShorterThanCandid
driver.findElement(By.className("nameB"));
}

@Ignore(value = {CHROME, MARIONETTE}, reason = "throws WebDriverException")
@Ignore(value = {CHROME}, reason = "throws WebDriverException")
@Test(expected = NoSuchElementException.class)
public void testFindingASingleElementByEmptyClassNameShouldThrow() {
driver.get(pages.xhtmlTestPage);
driver.findElement(By.className(""));
}

@Ignore(value = {CHROME, MARIONETTE}, reason = "Chrome: throws WebDriverException")
@Ignore(value = {CHROME}, reason = "Chrome: throws WebDriverException")
@Test(expected = NoSuchElementException.class)
public void testFindingMultipleElementsByEmptyClassNameShouldThrow() {
driver.get(pages.xhtmlTestPage);
Expand All @@ -332,7 +325,7 @@ public void testFindingMultipleElementsByCompoundClassNameShouldThrow() {
driver.findElements(By.className("a b"));
}

@Ignore(value = {CHROME, MARIONETTE}, reason = "Chrome: throws InvalidElementStateException")
@Ignore(value = {CHROME}, reason = "Chrome: throws InvalidElementStateException")
@Test(expected = NoSuchElementException.class)
public void testFindingASingleElementByInvalidClassNameShouldThrow() {
driver.get(pages.xhtmlTestPage);
Expand Down Expand Up @@ -427,14 +420,12 @@ public void testShouldThrowAnExceptionWhenThereIsNoLinkToClick() {
driver.findElement(By.xpath("//a[@id='Not here']"));
}

@Ignore(value = MARIONETTE, reason = "https://bugzilla.mozilla.org/show_bug.cgi?id=1204504")
@Test(expected = InvalidSelectorException.class)
public void testShouldThrowInvalidSelectorExceptionWhenXPathIsSyntacticallyInvalidInDriverFindElement() {
driver.get(pages.formPage);
driver.findElement(By.xpath("this][isnot][valid"));
}

@Ignore(value = MARIONETTE, reason = "https://bugzilla.mozilla.org/show_bug.cgi?id=1204504")
@Test(expected = InvalidSelectorException.class)
public void testShouldThrowInvalidSelectorExceptionWhenXPathIsSyntacticallyInvalidInDriverFindElements() {
assumeFalse("Ignoring xpath error test in IE6", TestUtilities.isIe6(driver));
Expand All @@ -443,15 +434,13 @@ public void testShouldThrowInvalidSelectorExceptionWhenXPathIsSyntacticallyInval
driver.findElements(By.xpath("this][isnot][valid"));
}

@Ignore(value = MARIONETTE, reason = "https://bugzilla.mozilla.org/show_bug.cgi?id=1204504")
@Test(expected = InvalidSelectorException.class)
public void testShouldThrowInvalidSelectorExceptionWhenXPathIsSyntacticallyInvalidInElementFindElement() {
driver.get(pages.formPage);
WebElement body = driver.findElement(By.tagName("body"));
body.findElement(By.xpath("this][isnot][valid"));
}

@Ignore(value = MARIONETTE, reason = "https://bugzilla.mozilla.org/show_bug.cgi?id=1204504")
@Test(expected = InvalidSelectorException.class)
public void testShouldThrowInvalidSelectorExceptionWhenXPathIsSyntacticallyInvalidInElementFindElements() {
assumeFalse("Ignoring xpath error test in IE6", TestUtilities.isIe6(driver));
Expand All @@ -461,14 +450,12 @@ public void testShouldThrowInvalidSelectorExceptionWhenXPathIsSyntacticallyInval
body.findElements(By.xpath("this][isnot][valid"));
}

@Ignore(value = MARIONETTE, reason = "https://bugzilla.mozilla.org/show_bug.cgi?id=1204504")
@Test(expected = InvalidSelectorException.class)
public void testShouldThrowInvalidSelectorExceptionWhenXPathReturnsWrongTypeInDriverFindElement() {
driver.get(pages.formPage);
driver.findElement(By.xpath("count(//input)"));
}

@Ignore(value = MARIONETTE, reason = "https://bugzilla.mozilla.org/show_bug.cgi?id=1204504")
@Test(expected = InvalidSelectorException.class)
public void testShouldThrowInvalidSelectorExceptionWhenXPathReturnsWrongTypeInDriverFindElements() {
assumeFalse("Ignoring xpath error test in IE6", TestUtilities.isIe6(driver));
Expand All @@ -477,7 +464,6 @@ public void testShouldThrowInvalidSelectorExceptionWhenXPathReturnsWrongTypeInDr
driver.findElements(By.xpath("count(//input)"));
}

@Ignore(value = MARIONETTE, reason = "https://bugzilla.mozilla.org/show_bug.cgi?id=1204504")
@Test(expected = InvalidSelectorException.class)
public void testShouldThrowInvalidSelectorExceptionWhenXPathReturnsWrongTypeInElementFindElement() {
driver.get(pages.formPage);
Expand All @@ -486,7 +472,6 @@ public void testShouldThrowInvalidSelectorExceptionWhenXPathReturnsWrongTypeInEl
body.findElement(By.xpath("count(//input)"));
}

@Ignore(value = MARIONETTE, reason = "https://bugzilla.mozilla.org/show_bug.cgi?id=1204504")
@Test(expected = InvalidSelectorException.class)
public void testShouldThrowInvalidSelectorExceptionWhenXPathReturnsWrongTypeInElementFindElements() {
assumeFalse("Ignoring xpath error test in IE6", TestUtilities.isIe6(driver));
Expand Down Expand Up @@ -566,32 +551,32 @@ public void testShouldNotFindElementsByCssSelectorWhenThereIsNoSuchElement() {
assertThat(elements.size(), is(0));
}

@Ignore(value = {CHROME, MARIONETTE},
reason = "Chrome: throws WebDriverException, Marionette: throws InvalidElementStateException")
@Ignore(value = {CHROME},
reason = "Chrome: throws WebDriverException")
@Test(expected = NoSuchElementException.class)
public void testFindingASingleElementByEmptyCssSelectorShouldThrow() {
driver.get(pages.xhtmlTestPage);
driver.findElement(By.cssSelector(""));
}

@Ignore(value = {CHROME, MARIONETTE},
reason = "Chrome: throws WebDriverException, Marionette: throws InvalidElementStateException")
@Ignore(value = {CHROME},
reason = "Chrome: throws WebDriverException")
@Test(expected = NoSuchElementException.class)
public void testFindingMultipleElementsByEmptyCssSelectorShouldThrow() {
driver.get(pages.xhtmlTestPage);
driver.findElements(By.cssSelector(""));
}

@Ignore(value = {CHROME, MARIONETTE},
reason = "Chrome: throws InvalidElementStateException, Marionette: throws InvalidElementStateException")
@Ignore(value = {CHROME},
reason = "Chrome: throws InvalidElementStateException")
@Test(expected = NoSuchElementException.class)
public void testFindingASingleElementByInvalidCssSelectorShouldThrow() {
driver.get(pages.xhtmlTestPage);
driver.findElement(By.cssSelector("//a/b/c[@id='1']"));
}

@Ignore(value = {CHROME, MARIONETTE},
reason = "Chrome: throws InvalidElementStateException, Marionette: throws InvalidElementStateException")
@Ignore(value = {CHROME},
reason = "Chrome: throws InvalidElementStateException")
@Test(expected = NoSuchElementException.class)
public void testFindingMultipleElementsByInvalidCssSelectorShouldThrow() {
assumeFalse("Ignoring test for lack of error in CSS in IE6", TestUtilities.isIe6(driver));
Expand Down
2 changes: 0 additions & 2 deletions java/client/test/org/openqa/selenium/FormHandlingTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,6 @@ public void testSendingKeyboardEventsShouldAppendTextInInputs() {
}

@Test
@Ignore(MARIONETTE)
public void testSendingKeyboardEventsShouldAppendTextInInputsWithExistingValue() {
driver.get(pages.formPage);
WebElement element = driver.findElement(By.id("inputWithText"));
Expand All @@ -243,7 +242,6 @@ public void testSendingKeyboardEventsShouldAppendTextInInputsWithExistingValue()
}

@Test
@Ignore(MARIONETTE)
public void testSendingKeyboardEventsShouldAppendTextInTextAreas() {
driver.get(pages.formPage);
WebElement element = driver.findElement(By.id("withText"));
Expand Down
Loading

0 comments on commit e212e3a

Please sign in to comment.