Skip to content

Commit

Permalink
[java] Unignoring a couple of tests fixed in Firefox 69
Browse files Browse the repository at this point in the history
  • Loading branch information
barancev committed Jun 21, 2019
1 parent 3490d4a commit a4f3b1d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 22 deletions.
24 changes: 7 additions & 17 deletions java/client/test/org/openqa/selenium/AlertsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,6 @@ public void testPromptShouldHaveNullValueIfDismissed() {
}

@Test
@Ignore(value = MARIONETTE, reason = "https://bugzilla.mozilla.org/show_bug.cgi?id=1477977")
public void testHandlesTwoAlertsFromOneInteraction() {
driver.get(appServer.create(new Page()
.withScripts(
Expand Down Expand Up @@ -398,7 +397,7 @@ public void testShouldHandleAlertOnPageLoadUsingGet() {
@Ignore(value = IE, reason = "Fails in versions 6 and 7")
@Ignore(SAFARI)
@Ignore(EDGE)
@Ignore(value = MARIONETTE, reason = "https://github.com/mozilla/geckodriver/issues/1187")
@NoDriverAfterTest
public void testShouldNotHandleAlertInAnotherWindow() {
String pageWithOnLoad = appServer.create(new Page()
.withOnLoad("javascript:alert(\"onload\")")
Expand All @@ -409,20 +408,11 @@ public void testShouldNotHandleAlertInAnotherWindow() {

String mainWindow = driver.getWindowHandle();
Set<String> currentWindowHandles = driver.getWindowHandles();
try {
driver.findElement(By.id("open-new-window")).click();
wait.until(newWindowIsOpened(currentWindowHandles));
driver.findElement(By.id("open-new-window")).click();
wait.until(newWindowIsOpened(currentWindowHandles));

assertThatExceptionOfType(TimeoutException.class)
.isThrownBy(() -> wait.until(alertIsPresent()));

} finally {
driver.switchTo().window("newwindow");
wait.until(alertIsPresent()).dismiss();
driver.close();
driver.switchTo().window(mainWindow);
wait.until(textInElementLocated(By.id("open-new-window"), "open new window"));
}
assertThatExceptionOfType(TimeoutException.class)
.isThrownBy(() -> wait.until(alertIsPresent()));
}

@Test
Expand All @@ -432,7 +422,7 @@ public void testShouldNotHandleAlertInAnotherWindow() {
@Ignore(SAFARI)
@NotYetImplemented(EDGE)
public void testShouldHandleAlertOnPageUnload() {
assumeFalse("Firefox 27 does not trigger alerts on before unload",
assumeFalse("Firefox 27+ does not trigger alerts on before unload",
isFirefox(driver) && getFirefoxVersion(driver) >= 27);

String pageWithOnBeforeUnload = appServer.create(new Page()
Expand Down Expand Up @@ -479,7 +469,7 @@ public void testShouldImplicitlyHandleAlertOnPageBeforeUnload() {
@Ignore(value = IE, reason = "IE driver automatically dismisses alerts on window close")
@NotYetImplemented(EDGE)
public void testShouldHandleAlertOnWindowClose() {
assumeFalse("Firefox 27 does not trigger alerts on unload",
assumeFalse("Firefox 27+ does not trigger alerts on unload",
isFirefox(driver) && getFirefoxVersion(driver) >= 27);

String pageWithOnBeforeUnload = appServer.create(new Page()
Expand Down
6 changes: 3 additions & 3 deletions java/client/test/org/openqa/selenium/ClickScrollingTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public void testShouldNotScrollOverflowElementsWhichAreVisible() {
@Test
@Ignore(CHROME)
@Ignore(CHROMIUMEDGE)
@Ignore(MARIONETTE)
@NotYetImplemented(MARIONETTE)
@NotYetImplemented(EDGE)
public void testShouldNotScrollIfAlreadyScrolledAndElementIsInView() {
driver.get(appServer.whereIs("scroll3.html"));
Expand Down Expand Up @@ -166,7 +166,7 @@ public void testShouldScrollOverflowElementsIfClickPointIsOutOfViewButElementIsI
@SwitchToTopAfterTest
@Test
@NotYetImplemented(SAFARI)
@Ignore(MARIONETTE)
@NotYetImplemented(value = MARIONETTE, reason = "https://bugzilla.mozilla.org/show_bug.cgi?id=1314462")
public void testShouldBeAbleToClickElementInAFrameThatIsOutOfView() {
driver.get(appServer.whereIs("scrolling_tests/page_with_frame_out_of_view.html"));
driver.switchTo().frame("frame");
Expand Down Expand Up @@ -262,7 +262,7 @@ private long getScrollTop() {
@SwitchToTopAfterTest
@Test
@NotYetImplemented(SAFARI)
@Ignore(MARIONETTE)
@NotYetImplemented(value = MARIONETTE, reason = "https://bugzilla.mozilla.org/show_bug.cgi?id=1314462")
public void testShouldBeAbleToClickElementInATallFrame() {
driver.get(appServer.whereIs("scrolling_tests/page_with_tall_frame.html"));
driver.switchTo().frame("tall_frame");
Expand Down
4 changes: 2 additions & 2 deletions java/client/test/org/openqa/selenium/PageLoadingTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ public void testShouldBeAbleToGetAFragmentOnTheCurrentPage() {
}

@Test
@Ignore(MARIONETTE)
@NotYetImplemented(MARIONETTE)
public void testShouldReturnWhenGettingAUrlThatDoesNotResolve() {
assertThatCode(
() -> driver.get("http://www.thisurldoesnotexist.comx/"))
Expand All @@ -219,7 +219,7 @@ public void testShouldThrowIfUrlIsMalformedInPortPart() {
}

@Test
@Ignore(MARIONETTE)
@NotYetImplemented(MARIONETTE)
public void testShouldReturnWhenGettingAUrlThatDoesNotConnect() {
// Here's hoping that there's nothing here. There shouldn't be
driver.get("http://localhost:3001");
Expand Down

0 comments on commit a4f3b1d

Please sign in to comment.