Skip to content

Commit 3326809

Browse files
committed
Changing some ignores to @JavascriptEnabled
1 parent d063185 commit 3326809

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

java/client/test/org/openqa/selenium/AlertsTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,8 +227,8 @@ public void testShouldAllowTheUserToGetTheTextOfAnAlert() {
227227
assertEquals("cheese", value);
228228
}
229229

230+
@JavascriptEnabled
230231
@Test
231-
@Ignore(value = HTMLUNIT, reason="test should enable JavaScript")
232232
public void testShouldAllowTheUserToGetTheTextOfAPrompt() {
233233
driver.get(promptPage(null));
234234

@@ -499,9 +499,9 @@ public void testShouldHandleAlertOnPageBeforeUnload() {
499499
wait.until(titleIs("Success"));
500500
}
501501

502+
@JavascriptEnabled
502503
@NoDriverAfterTest
503504
@Test
504-
@Ignore(value = HTMLUNIT, reason="test should enable JavaScript")
505505
public void testShouldHandleAlertOnPageBeforeUnloadAtQuit() {
506506
String blank = appServer.create(new Page().withTitle("Success"));
507507
driver.get(appServer.create(new Page()

java/client/test/org/openqa/selenium/ExecutingAsyncJavascriptTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,11 +358,11 @@ public void throwsIfAlertHappensDuringScript() {
358358
driver.getTitle();
359359
}
360360

361+
@JavascriptEnabled
361362
@Test
362363
@Ignore(CHROME)
363364
@Ignore(IE)
364365
@Ignore(MARIONETTE)
365-
@Ignore(value = HTMLUNIT, reason="test should enable JavaScript")
366366
@NeedsLocalEnvironment(reason = "Relies on timing")
367367
public void throwsIfScriptTriggersAlertWhichTimesOut() {
368368
driver.get(pages.simpleTestPage);

java/client/test/org/openqa/selenium/UnexpectedAlertBehaviorTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ public void quitDriver() throws Exception {
5757
}
5858
}
5959

60+
@JavascriptEnabled
6061
@Test
61-
@Ignore(value = HTMLUNIT, reason="test should enable JavaScript")
6262
public void canAcceptUnhandledAlert() {
6363
runScenarioWithUnhandledAlert(UnexpectedAlertBehaviour.ACCEPT, "This is a default value");
6464
}
@@ -77,29 +77,29 @@ public void dismissUnhandledAlertsByDefault() {
7777
runScenarioWithUnhandledAlert(null, "null");
7878
}
7979

80+
@JavascriptEnabled
8081
@Test
8182
@Ignore(value = CHROME, reason = "Unstable Chrome behavior")
82-
@Ignore(value = HTMLUNIT, reason = "test should enable JavaScript")
8383
public void canIgnoreUnhandledAlert() {
8484
Throwable t = catchThrowable(
8585
() -> runScenarioWithUnhandledAlert(UnexpectedAlertBehaviour.IGNORE, "Text ignored"));
8686
assertThat(t, instanceOf(UnhandledAlertException.class));
8787
driver2.switchTo().alert().dismiss();
8888
}
8989

90+
@JavascriptEnabled
9091
@Test
91-
@Ignore(value = HTMLUNIT, reason="test should enable JavaScript")
9292
public void canSpecifyUnhandledAlertBehaviourUsingCapabilities() {
9393
desiredCaps.setCapability(UNEXPECTED_ALERT_BEHAVIOUR, UnexpectedAlertBehaviour.ACCEPT);
9494
driver2 = new WebDriverBuilder().setDesiredCapabilities(desiredCaps).get();
9595

9696
runScenarioWithUnhandledAlert("This is a default value");
9797
}
9898

99+
@JavascriptEnabled
99100
@Test
100101
@Ignore(value = IE, reason = "required capabilities not implemented")
101102
@Ignore(value = CHROME, reason = "required capabilities not implemented")
102-
@Ignore(value = HTMLUNIT, reason = "test should enable JavaScript")
103103
public void requiredUnhandledAlertCapabilityHasPriorityOverDesired() {
104104
// TODO: Resolve why this test doesn't work on the remote server
105105
assumeTrue(TestUtilities.isLocal());

0 commit comments

Comments
 (0)