Skip to content

Commit

Permalink
Changing some ignores to @JavascriptEnabled
Browse files Browse the repository at this point in the history
  • Loading branch information
barancev committed Apr 13, 2017
1 parent d063185 commit 3326809
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions java/client/test/org/openqa/selenium/AlertsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,8 @@ public void testShouldAllowTheUserToGetTheTextOfAnAlert() {
assertEquals("cheese", value);
}

@JavascriptEnabled
@Test
@Ignore(value = HTMLUNIT, reason="test should enable JavaScript")
public void testShouldAllowTheUserToGetTheTextOfAPrompt() {
driver.get(promptPage(null));

Expand Down Expand Up @@ -499,9 +499,9 @@ public void testShouldHandleAlertOnPageBeforeUnload() {
wait.until(titleIs("Success"));
}

@JavascriptEnabled
@NoDriverAfterTest
@Test
@Ignore(value = HTMLUNIT, reason="test should enable JavaScript")
public void testShouldHandleAlertOnPageBeforeUnloadAtQuit() {
String blank = appServer.create(new Page().withTitle("Success"));
driver.get(appServer.create(new Page()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -358,11 +358,11 @@ public void throwsIfAlertHappensDuringScript() {
driver.getTitle();
}

@JavascriptEnabled
@Test
@Ignore(CHROME)
@Ignore(IE)
@Ignore(MARIONETTE)
@Ignore(value = HTMLUNIT, reason="test should enable JavaScript")
@NeedsLocalEnvironment(reason = "Relies on timing")
public void throwsIfScriptTriggersAlertWhichTimesOut() {
driver.get(pages.simpleTestPage);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ public void quitDriver() throws Exception {
}
}

@JavascriptEnabled
@Test
@Ignore(value = HTMLUNIT, reason="test should enable JavaScript")
public void canAcceptUnhandledAlert() {
runScenarioWithUnhandledAlert(UnexpectedAlertBehaviour.ACCEPT, "This is a default value");
}
Expand All @@ -77,29 +77,29 @@ public void dismissUnhandledAlertsByDefault() {
runScenarioWithUnhandledAlert(null, "null");
}

@JavascriptEnabled
@Test
@Ignore(value = CHROME, reason = "Unstable Chrome behavior")
@Ignore(value = HTMLUNIT, reason = "test should enable JavaScript")
public void canIgnoreUnhandledAlert() {
Throwable t = catchThrowable(
() -> runScenarioWithUnhandledAlert(UnexpectedAlertBehaviour.IGNORE, "Text ignored"));
assertThat(t, instanceOf(UnhandledAlertException.class));
driver2.switchTo().alert().dismiss();
}

@JavascriptEnabled
@Test
@Ignore(value = HTMLUNIT, reason="test should enable JavaScript")
public void canSpecifyUnhandledAlertBehaviourUsingCapabilities() {
desiredCaps.setCapability(UNEXPECTED_ALERT_BEHAVIOUR, UnexpectedAlertBehaviour.ACCEPT);
driver2 = new WebDriverBuilder().setDesiredCapabilities(desiredCaps).get();

runScenarioWithUnhandledAlert("This is a default value");
}

@JavascriptEnabled
@Test
@Ignore(value = IE, reason = "required capabilities not implemented")
@Ignore(value = CHROME, reason = "required capabilities not implemented")
@Ignore(value = HTMLUNIT, reason = "test should enable JavaScript")
public void requiredUnhandledAlertCapabilityHasPriorityOverDesired() {
// TODO: Resolve why this test doesn't work on the remote server
assumeTrue(TestUtilities.isLocal());
Expand Down

0 comments on commit 3326809

Please sign in to comment.