Skip to content

Commit

Permalink
Delete JavascriptEnabled test annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
asashour authored and shs96c committed Apr 18, 2017
1 parent 0decef7 commit 8ad8dab
Show file tree
Hide file tree
Showing 45 changed files with 3 additions and 412 deletions.
2 changes: 0 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ task :all => [
task :all_zip => [:'selenium-java_zip']
task :tests => [
"//java/client/test/org/openqa/selenium/htmlunit:htmlunit",
"//java/client/test/org/openqa/selenium/htmlunit:htmlunit-no-js",
"//java/client/test/org/openqa/selenium/firefox:test-synthesized",
"//java/client/test/org/openqa/selenium/ie:ie",
"//java/client/test/org/openqa/selenium/chrome:chrome",
Expand Down Expand Up @@ -188,7 +187,6 @@ task :test_chrome_atoms => [
'//javascript/chrome-driver:test:run',
'//javascript/webdriver:test_chrome:run']
task :test_htmlunit => [
"//java/client/test/org/openqa/selenium/htmlunit:htmlunit-no-js:run",
"//java/client/test/org/openqa/selenium/htmlunit:htmlunit:run"
]
task :test_grid => [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,13 +203,6 @@ public static DesiredCapabilities htmlUnit() {
return new DesiredCapabilities(BrowserType.HTMLUNIT, "", Platform.ANY);
}

public static DesiredCapabilities htmlUnitWithJs() {
DesiredCapabilities capabilities = new DesiredCapabilities(BrowserType.HTMLUNIT,
"", Platform.ANY);
capabilities.setCapability(CapabilityType.SUPPORTS_JAVASCRIPT, true);
return capabilities;
}

public static DesiredCapabilities edge() {
return new DesiredCapabilities(BrowserType.EDGE, "", Platform.WINDOWS);
}
Expand Down
30 changes: 0 additions & 30 deletions java/client/test/org/openqa/selenium/AlertsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
import org.openqa.selenium.support.ui.ExpectedCondition;
import org.openqa.selenium.testing.Ignore;
import org.openqa.selenium.testing.JUnit4TestBase;
import org.openqa.selenium.testing.JavascriptEnabled;
import org.openqa.selenium.testing.NeedsLocalEnvironment;
import org.openqa.selenium.testing.NoDriverAfterTest;
import org.openqa.selenium.testing.NotYetImplemented;
Expand Down Expand Up @@ -78,7 +77,6 @@ private String promptPage(String defaultText) {
"<div id='text'>acceptor</div>"));
}

@JavascriptEnabled
@NoDriverAfterTest
@Test
public void testShouldBeAbleToOverrideTheWindowAlertMethod() {
Expand All @@ -92,7 +90,6 @@ public void testShouldBeAbleToOverrideTheWindowAlertMethod() {
assertEquals("Testing Alerts", driver.getTitle());
}

@JavascriptEnabled
@Test
public void testShouldAllowUsersToAcceptAnAlertManually() {
driver.get(alertPage("cheese"));
Expand All @@ -105,7 +102,6 @@ public void testShouldAllowUsersToAcceptAnAlertManually() {
assertEquals("Testing Alerts", driver.getTitle());
}

@JavascriptEnabled
@Test
public void testShouldAllowUsersToAcceptAnAlertWithNoTextManually() {
driver.get(alertPage(""));
Expand All @@ -118,7 +114,6 @@ public void testShouldAllowUsersToAcceptAnAlertWithNoTextManually() {
assertEquals("Testing Alerts", driver.getTitle());
}

@JavascriptEnabled
@NeedsLocalEnvironment(reason = "Carefully timing based")
@Test
@Ignore(CHROME)
Expand All @@ -144,7 +139,6 @@ public void testShouldGetTextOfAlertOpenedInSetTimeout() throws Exception {
}
}

@JavascriptEnabled
@Test
public void testShouldAllowUsersToDismissAnAlertManually() {
driver.get(alertPage("cheese"));
Expand All @@ -157,7 +151,6 @@ public void testShouldAllowUsersToDismissAnAlertManually() {
assertEquals("Testing Alerts", driver.getTitle());
}

@JavascriptEnabled
@Test
public void testShouldAllowAUserToAcceptAPrompt() {
driver.get(promptPage(null));
Expand All @@ -170,7 +163,6 @@ public void testShouldAllowAUserToAcceptAPrompt() {
assertEquals("Testing Prompt", driver.getTitle());
}

@JavascriptEnabled
@Test
public void testShouldAllowAUserToDismissAPrompt() {
driver.get(promptPage(null));
Expand All @@ -183,7 +175,6 @@ public void testShouldAllowAUserToDismissAPrompt() {
assertEquals("Testing Prompt", driver.getTitle());
}

@JavascriptEnabled
@NotYetImplemented(value = MARIONETTE, reason = "https://github.com/mozilla/geckodriver/issues/607")
public void testShouldAllowAUserToSetTheValueOfAPrompt() {
driver.get(promptPage(null));
Expand All @@ -196,7 +187,6 @@ public void testShouldAllowAUserToSetTheValueOfAPrompt() {
wait.until(textInElementLocated(By.id("text"), "cheese"));
}

@JavascriptEnabled
@Test
@Ignore(CHROME)
@Ignore(value = MARIONETTE, issue = "https://github.com/mozilla/geckodriver/issues/274")
Expand All @@ -214,7 +204,6 @@ public void testSettingTheValueOfAnAlertThrows() {
}
}

@JavascriptEnabled
@Test
public void testShouldAllowTheUserToGetTheTextOfAnAlert() {
driver.get(alertPage("cheese"));
Expand All @@ -227,7 +216,6 @@ public void testShouldAllowTheUserToGetTheTextOfAnAlert() {
assertEquals("cheese", value);
}

@JavascriptEnabled
@Test
public void testShouldAllowTheUserToGetTheTextOfAPrompt() {
driver.get(promptPage(null));
Expand All @@ -240,7 +228,6 @@ public void testShouldAllowTheUserToGetTheTextOfAPrompt() {
assertEquals("Enter something", value);
}

@JavascriptEnabled
@Test
public void testAlertShouldNotAllowAdditionalCommandsIfDismissed() {
driver.get(alertPage("cheese"));
Expand All @@ -253,7 +240,6 @@ public void testAlertShouldNotAllowAdditionalCommandsIfDismissed() {
assertThat(t, instanceOf(NoAlertPresentException.class));
}

@JavascriptEnabled
@SwitchToTopAfterTest
@Test
@Ignore(MARIONETTE)
Expand All @@ -273,7 +259,6 @@ public void testShouldAllowUsersToAcceptAnAlertInAFrame() {
assertEquals("Testing Alerts", driver.getTitle());
}

@JavascriptEnabled
@SwitchToTopAfterTest
@Test
@Ignore(MARIONETTE)
Expand All @@ -296,7 +281,6 @@ public void testShouldAllowUsersToAcceptAnAlertInANestedFrame() {
assertEquals("Testing Alerts", driver.getTitle());
}

@JavascriptEnabled
@Test
public void testSwitchingToMissingAlertThrows() throws Exception {
driver.get(alertPage("cheese"));
Expand All @@ -305,7 +289,6 @@ public void testSwitchingToMissingAlertThrows() throws Exception {
assertThat(t, instanceOf(NoAlertPresentException.class));
}

@JavascriptEnabled
@Test
public void testSwitchingToMissingAlertInAClosedWindowThrows() throws Exception {
String blank = appServer.create(new Page());
Expand All @@ -327,7 +310,6 @@ public void testSwitchingToMissingAlertInAClosedWindowThrows() throws Exception
}
}

@JavascriptEnabled
@Test
public void testPromptShouldUseDefaultValueIfNoKeysSent() {
driver.get(promptPage("This is a default value"));
Expand All @@ -339,7 +321,6 @@ public void testPromptShouldUseDefaultValueIfNoKeysSent() {
wait.until(textInElementLocated(By.id("text"), "This is a default value"));
}

@JavascriptEnabled
@Test
public void testPromptShouldHaveNullValueIfDismissed() {
driver.get(promptPage("This is a default value"));
Expand All @@ -351,7 +332,6 @@ public void testPromptShouldHaveNullValueIfDismissed() {
wait.until(textInElementLocated(By.id("text"), "null"));
}

@JavascriptEnabled
@Test
@NotYetImplemented(value = MARIONETTE, reason = "https://github.com/mozilla/geckodriver/issues/607")
public void testHandlesTwoAlertsFromOneInteraction() {
Expand Down Expand Up @@ -382,7 +362,6 @@ public void testHandlesTwoAlertsFromOneInteraction() {
wait.until(textInElementLocated(By.id("text2"), "cheddar"));
}

@JavascriptEnabled
@Test
@Ignore(CHROME)
public void testShouldHandleAlertOnPageLoad() {
Expand All @@ -401,7 +380,6 @@ public void testShouldHandleAlertOnPageLoad() {
wait.until(textInElementLocated(By.tagName("p"), "Page with onload event handler"));
}

@JavascriptEnabled
@Test
@Ignore(CHROME)
public void testShouldHandleAlertOnPageLoadUsingGet() {
Expand All @@ -417,7 +395,6 @@ public void testShouldHandleAlertOnPageLoadUsingGet() {
wait.until(textInElementLocated(By.tagName("p"), "Page with onload event handler"));
}

@JavascriptEnabled
@Test
@Ignore(CHROME)
@Ignore(FIREFOX)
Expand Down Expand Up @@ -450,7 +427,6 @@ public void testShouldNotHandleAlertInAnotherWindow() {
}
}

@JavascriptEnabled
@Test
@Ignore(value = CHROME, reason = "Chrome does not trigger alerts on unload")
@NotYetImplemented(HTMLUNIT)
Expand All @@ -475,7 +451,6 @@ public void testShouldHandleAlertOnPageUnload() {
wait.until(textInElementLocated(By.id("link"), "open new page"));
}

@JavascriptEnabled
@Test
public void testShouldHandleAlertOnPageBeforeUnload() {
String blank = appServer.create(new Page().withTitle("Success"));
Expand All @@ -499,7 +474,6 @@ public void testShouldHandleAlertOnPageBeforeUnload() {
wait.until(titleIs("Success"));
}

@JavascriptEnabled
@NoDriverAfterTest
@Test
public void testShouldHandleAlertOnPageBeforeUnloadAtQuit() {
Expand All @@ -518,7 +492,6 @@ public void testShouldHandleAlertOnPageBeforeUnloadAtQuit() {
driver.quit();
}

@JavascriptEnabled
@Test
@Ignore(value = CHROME, reason = "Chrome does not trigger alerts on unload")
@NotYetImplemented(HTMLUNIT)
Expand Down Expand Up @@ -551,7 +524,6 @@ public void testShouldHandleAlertOnWindowClose() {
}
}

@JavascriptEnabled
@Test
@Ignore(CHROME)
@NotYetImplemented(value = MARIONETTE,
Expand All @@ -568,7 +540,6 @@ public void testIncludesAlertTextInUnhandledAlertException() {
assertThat(t.getMessage(), containsString("cheese"));
}

@JavascriptEnabled
@NoDriverAfterTest
@Test
public void testCanQuitWhenAnAlertIsPresent() {
Expand All @@ -580,7 +551,6 @@ public void testCanQuitWhenAnAlertIsPresent() {
driver.quit();
}

@JavascriptEnabled
@Test
@Ignore(value = MARIONETTE, issue = "https://github.com/mozilla/geckodriver/issues/620")
public void shouldHandleAlertOnFormSubmit() {
Expand Down
2 changes: 0 additions & 2 deletions java/client/test/org/openqa/selenium/AtomsInjectionTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,9 @@

import org.junit.Test;
import org.openqa.selenium.testing.JUnit4TestBase;
import org.openqa.selenium.testing.JavascriptEnabled;

public class AtomsInjectionTest extends JUnit4TestBase {

@JavascriptEnabled
@Test
public void testInjectingAtomShouldNotTrampleOnUnderscoreGlobal() {
driver.get(pages.underscorePage);
Expand Down
7 changes: 0 additions & 7 deletions java/client/test/org/openqa/selenium/ClickScrollingTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,11 @@
import org.openqa.selenium.interactions.MoveTargetOutOfBoundsException;
import org.openqa.selenium.testing.Ignore;
import org.openqa.selenium.testing.JUnit4TestBase;
import org.openqa.selenium.testing.JavascriptEnabled;
import org.openqa.selenium.testing.SwitchToTopAfterTest;

@Ignore(value = HTMLUNIT, reason = "Scrolling requires rendering")
public class ClickScrollingTest extends JUnit4TestBase {

@JavascriptEnabled
@Test
public void testClickingOnAnchorScrollsPage() {
String scrollScript = "";
Expand Down Expand Up @@ -86,7 +84,6 @@ public void testShouldBeAbleToClickOnAnElementHiddenByOverflow() {
assertEquals("line8", driver.findElement(By.id("clicked")).getText());
}

@JavascriptEnabled
@Test
@Ignore(value = CHROME, reason = "failed")
public void testShouldBeAbleToClickOnAnElementHiddenByDoubleOverflow() {
Expand All @@ -96,7 +93,6 @@ public void testShouldBeAbleToClickOnAnElementHiddenByDoubleOverflow() {
wait.until(titleIs("Clicked Successfully!"));
}

@JavascriptEnabled
@Test
@Ignore(value = SAFARI, reason = "failed")
public void testShouldBeAbleToClickOnAnElementHiddenByYOverflow() {
Expand All @@ -106,7 +102,6 @@ public void testShouldBeAbleToClickOnAnElementHiddenByYOverflow() {
wait.until(titleIs("Clicked Successfully!"));
}

@JavascriptEnabled
@Test
public void testShouldNotScrollOverflowElementsWhichAreVisible() {
driver.get(appServer.whereIs("scroll2.html"));
Expand All @@ -118,7 +113,6 @@ public void testShouldNotScrollOverflowElementsWhichAreVisible() {
assertEquals("Should not have scrolled", 0, yOffset);
}

@JavascriptEnabled
@Test
@Ignore(CHROME)
@Ignore(PHANTOMJS)
Expand Down Expand Up @@ -219,7 +213,6 @@ public void testShouldBeAbleToClickElementThatIsOutOfViewInANestedFrameThatIsOut
assertTrue(element.isSelected());
}

@JavascriptEnabled
@Test
public void testShouldNotScrollWhenGettingElementSize() {
driver.get(appServer.whereIs("scroll3.html"));
Expand Down
Loading

0 comments on commit 8ad8dab

Please sign in to comment.