Skip to content

Commit

Permalink
[java] Annotating tests to reflect current state of Edge driver
Browse files Browse the repository at this point in the history
  • Loading branch information
barancev committed Feb 19, 2019
1 parent f5065b4 commit aa041a8
Show file tree
Hide file tree
Showing 38 changed files with 159 additions and 1 deletion.
6 changes: 6 additions & 0 deletions java/client/test/org/openqa/selenium/AlertsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import static org.openqa.selenium.support.ui.ExpectedConditions.presenceOfElementLocated;
import static org.openqa.selenium.support.ui.ExpectedConditions.titleIs;
import static org.openqa.selenium.testing.drivers.Browser.CHROME;
import static org.openqa.selenium.testing.drivers.Browser.EDGE;
import static org.openqa.selenium.testing.drivers.Browser.FIREFOX;
import static org.openqa.selenium.testing.drivers.Browser.HTMLUNIT;
import static org.openqa.selenium.testing.drivers.Browser.IE;
Expand Down Expand Up @@ -392,6 +393,7 @@ public void testShouldHandleAlertOnPageLoadUsingGet() {
@Ignore(FIREFOX)
@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")
public void testShouldNotHandleAlertInAnotherWindow() {
String pageWithOnLoad = appServer.create(new Page()
Expand Down Expand Up @@ -423,6 +425,7 @@ public void testShouldNotHandleAlertInAnotherWindow() {
@Ignore(value = CHROME, reason = "Chrome does not trigger alerts on unload")
@NotYetImplemented(HTMLUNIT)
@Ignore(SAFARI)
@NotYetImplemented(EDGE)
public void testShouldHandleAlertOnPageUnload() {
assumeFalse("Firefox 27 does not trigger alerts on before unload",
isFirefox(driver) && getFirefoxVersion(driver) >= 27);
Expand All @@ -448,6 +451,7 @@ public void testShouldHandleAlertOnPageUnload() {
@Ignore(value = FIREFOX, reason = "Non W3C conformant")
@Ignore(value = HTMLUNIT, reason = "Non W3C conformant")
@Ignore(value = CHROME, reason = "Non W3C conformant")
@Ignore(EDGE)
public void testShouldImplicitlyHandleAlertOnPageBeforeUnload() {
String blank = appServer.create(new Page().withTitle("Success"));
driver.get(appServer.create(new Page()
Expand All @@ -465,6 +469,7 @@ public void testShouldImplicitlyHandleAlertOnPageBeforeUnload() {
@Ignore(value = CHROME, reason = "Chrome does not trigger alerts on unload")
@NotYetImplemented(HTMLUNIT)
@Ignore(SAFARI)
@NotYetImplemented(EDGE)
public void testShouldHandleAlertOnWindowClose() {
assumeFalse("Firefox 27 does not trigger alerts on unload",
isFirefox(driver) && getFirefoxVersion(driver) >= 27);
Expand Down Expand Up @@ -499,6 +504,7 @@ public void testShouldHandleAlertOnWindowClose() {
@Ignore(value = HTMLUNIT, reason = "https://github.com/SeleniumHQ/htmlunit-driver/issues/57")
@NotYetImplemented(value = MARIONETTE,
reason = "https://bugzilla.mozilla.org/show_bug.cgi?id=1279211")
@NotYetImplemented(EDGE)
public void testIncludesAlertTextInUnhandledAlertException() {
driver.get(alertPage("cheese"));

Expand Down
2 changes: 2 additions & 0 deletions java/client/test/org/openqa/selenium/ClearTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
import static org.openqa.selenium.testing.drivers.Browser.CHROME;
import static org.openqa.selenium.testing.drivers.Browser.EDGE;
import static org.openqa.selenium.testing.drivers.Browser.FIREFOX;
import static org.openqa.selenium.testing.drivers.Browser.HTMLUNIT;
import static org.openqa.selenium.testing.drivers.Browser.IE;
Expand Down Expand Up @@ -141,6 +142,7 @@ public void shouldBeAbleToClearRangeInput() {
@NotYetImplemented(FIREFOX)
@NotYetImplemented(MARIONETTE)
@NotYetImplemented(IE)
@NotYetImplemented(EDGE)
@NotYetImplemented(SAFARI)
public void shouldBeAbleToClearCheckboxInput() {
shouldBeAbleToClearInput(By.name("checkbox_input"), "Checkbox");
Expand Down
3 changes: 3 additions & 0 deletions java/client/test/org/openqa/selenium/ClickScrollingTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import static org.openqa.selenium.support.ui.ExpectedConditions.titleIs;
import static org.openqa.selenium.testing.drivers.Browser.ALL;
import static org.openqa.selenium.testing.drivers.Browser.CHROME;
import static org.openqa.selenium.testing.drivers.Browser.EDGE;
import static org.openqa.selenium.testing.drivers.Browser.FIREFOX;
import static org.openqa.selenium.testing.drivers.Browser.HTMLUNIT;
import static org.openqa.selenium.testing.drivers.Browser.IE;
Expand Down Expand Up @@ -134,6 +135,7 @@ public void testShouldNotScrollOverflowElementsWhichAreVisible() {
@Test
@Ignore(CHROME)
@Ignore(MARIONETTE)
@NotYetImplemented(EDGE)
public void testShouldNotScrollIfAlreadyScrolledAndElementIsInView() {
driver.get(appServer.whereIs("scroll3.html"));
driver.findElement(By.id("button1")).click();
Expand All @@ -152,6 +154,7 @@ public void testShouldBeAbleToClickRadioButtonScrolledIntoView() {
@Test
@Ignore(value = IE, reason = "IE has special overflow handling")
@NotYetImplemented(SAFARI)
@NotYetImplemented(EDGE)
public void testShouldScrollOverflowElementsIfClickPointIsOutOfViewButElementIsInView() {
driver.get(appServer.whereIs("scroll5.html"));
driver.findElement(By.id("inner")).click();
Expand Down
3 changes: 3 additions & 0 deletions java/client/test/org/openqa/selenium/ClickTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import static org.openqa.selenium.support.ui.ExpectedConditions.titleIs;
import static org.openqa.selenium.testing.drivers.Browser.ALL;
import static org.openqa.selenium.testing.drivers.Browser.CHROME;
import static org.openqa.selenium.testing.drivers.Browser.EDGE;
import static org.openqa.selenium.testing.drivers.Browser.FIREFOX;
import static org.openqa.selenium.testing.drivers.Browser.IE;
import static org.openqa.selenium.testing.drivers.Browser.MARIONETTE;
Expand Down Expand Up @@ -131,6 +132,7 @@ public void testCanClickOnAnElementWithTopSetToANegativeNumber() {

@Test
@NotYetImplemented(SAFARI)
@NotYetImplemented(EDGE)
public void testShouldSetRelatedTargetForMouseOver() {
driver.get(pages.javascriptPage);

Expand Down Expand Up @@ -349,6 +351,7 @@ public void testShouldBeAbleToClickOnASpanThatWrapsToTheNextLine() {
@Ignore(IE)
@Ignore(MARIONETTE)
@NotYetImplemented(SAFARI)
@NotYetImplemented(EDGE)
public void testShouldBeAbleToClickOnAPartiallyOverlappedLinkThatWrapsToTheNextLine() {
driver.get(appServer.whereIs("click_tests/wrapped_overlapping_elements.html"));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ public void testShouldBeAbleToTypeIntoEmptyContentEditableElement() {
@Test
@NotYetImplemented(value = CHROME, reason = "https://bugs.chromium.org/p/chromedriver/issues/detail?id=2743")
@NotYetImplemented(SAFARI)
@NotYetImplemented(EDGE)
@NotYetImplemented(value = MARIONETTE, reason = "https://github.com/mozilla/geckodriver/issues/667")
public void testShouldBeAbleToTypeIntoContentEditableElementWithExistingValue() {
driver.get(pages.readOnlyPage);
Expand Down Expand Up @@ -116,6 +117,7 @@ public void testShouldBeAbleToTypeIntoTinyMCE() {
@NotYetImplemented(value = IE, reason = "Prepends text")
@NotYetImplemented(value = SAFARI, reason = "Prepends text")
@NotYetImplemented(value = MARIONETTE, reason = "https://github.com/mozilla/geckodriver/issues/667")
@NotYetImplemented(EDGE)
public void testShouldAppendToTinyMCE() {
driver.get(appServer.whereIs("tinymce.html"));
driver.switchTo().frame("mce_0_ifr");
Expand All @@ -129,7 +131,6 @@ public void testShouldAppendToTinyMCE() {

@Test
@NotYetImplemented(value = CHROME, reason = "https://bugs.chromium.org/p/chromedriver/issues/detail?id=2743")
@NotYetImplemented(value = EDGE)
@NotYetImplemented(value = MARIONETTE, reason = "Doesn't write anything")
@NotYetImplemented(value = SAFARI, reason = "Prepends text")
public void appendsTextToEndOfContentEditableWithMultipleTextNodes() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import static org.openqa.selenium.WaitingConditions.elementValueToEqual;
import static org.openqa.selenium.support.ui.ExpectedConditions.visibilityOfElementLocated;
import static org.openqa.selenium.testing.drivers.Browser.CHROME;
import static org.openqa.selenium.testing.drivers.Browser.EDGE;
import static org.openqa.selenium.testing.drivers.Browser.FIREFOX;
import static org.openqa.selenium.testing.drivers.Browser.HTMLUNIT;
import static org.openqa.selenium.testing.drivers.Browser.IE;
Expand Down Expand Up @@ -61,6 +62,7 @@ public void testShouldFireFocusEventWhenClicking() {
@Test
@Ignore(FIREFOX)
@NotYetImplemented(SAFARI)
@Ignore(EDGE)
public void testShouldFireFocusEventInNonTopmostWindow() {
WebDriver driver2 = new WebDriverBuilder().get();
try {
Expand Down Expand Up @@ -107,6 +109,7 @@ public void testShouldFireMouseUpEventWhenClicking() {
}

@Test
@NotYetImplemented(EDGE)
public void testShouldFireMouseOverEventWhenClicking() {
driver.get(pages.javascriptPage);

Expand Down Expand Up @@ -299,6 +302,7 @@ public void testSendingKeysToAnotherElementShouldCauseTheBlurEventToFire() {

@Test
@Ignore(value = SAFARI, reason = "Allows only one instance")
@Ignore(EDGE)
public void testSendingKeysToAnotherElementShouldCauseTheBlurEventToFireInNonTopmostWindow() {
assumeFalse(browserNeedsFocusOnThisOs(driver));

Expand Down Expand Up @@ -476,6 +480,7 @@ public void testClickOverlappingElements() {
@Ignore(MARIONETTE)
@NotYetImplemented(SAFARI)
@Ignore(HTMLUNIT)
@NotYetImplemented(EDGE)
public void testClickPartiallyOverlappingElements() {
assumeFalse(isOldIe(driver));
for (int i = 1; i < 6; i++) {
Expand All @@ -501,6 +506,7 @@ public void testClickPartiallyOverlappingElements() {
@Ignore(HTMLUNIT)
@Ignore(value = MARIONETTE, reason = "Checks overlapping by default")
@Ignore(value = IE, reason = "Checks overlapping by default")
@Ignore(EDGE)
public void testNativelyClickOverlappingElements() {
assumeFalse(isOldIe(driver));
driver.get(appServer.whereIs("click_tests/overlapping_elements.html"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
import static org.junit.Assume.assumeFalse;
import static org.openqa.selenium.testing.drivers.Browser.CHROME;
import static org.openqa.selenium.testing.drivers.Browser.EDGE;
import static org.openqa.selenium.testing.drivers.Browser.FIREFOX;
import static org.openqa.selenium.testing.drivers.Browser.HTMLUNIT;
import static org.openqa.selenium.testing.drivers.Browser.IE;
Expand Down Expand Up @@ -418,6 +419,7 @@ public void shouldTreatContenteditableAsEnumeratedButNotBoolean() {
@Ignore(FIREFOX)
@NotYetImplemented(HTMLUNIT)
@NotYetImplemented(SAFARI)
@NotYetImplemented(EDGE)
public void shouldTreatDraggableAsEnumeratedButNotBoolean() {
checkEnumeratedAttribute("draggable", "true", "false", "yes", "no", "", "blabla");
}
Expand Down
2 changes: 2 additions & 0 deletions java/client/test/org/openqa/selenium/ElementEqualityTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
package org.openqa.selenium;

import static org.assertj.core.api.Assertions.assertThat;
import static org.openqa.selenium.testing.drivers.Browser.EDGE;
import static org.openqa.selenium.testing.drivers.Browser.SAFARI;

import org.junit.Test;
Expand Down Expand Up @@ -70,6 +71,7 @@ public void testSameElementLookedUpDifferentWaysUsingFindElementsShouldHaveSameH
@SwitchToTopAfterTest
@Test
@NotYetImplemented(SAFARI)
@NotYetImplemented(EDGE)
public void testAnElementFoundInADifferentFrameViaJsShouldHaveSameId() {
driver.get(pages.missedJsReferencePage);

Expand Down
11 changes: 11 additions & 0 deletions java/client/test/org/openqa/selenium/ElementFindingTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
import static org.junit.Assume.assumeFalse;
import static org.openqa.selenium.testing.drivers.Browser.CHROME;
import static org.openqa.selenium.testing.drivers.Browser.EDGE;
import static org.openqa.selenium.testing.drivers.Browser.IE;
import static org.openqa.selenium.testing.drivers.Browser.MARIONETTE;
import static org.openqa.selenium.testing.drivers.Browser.SAFARI;
Expand Down Expand Up @@ -112,6 +113,7 @@ public void testFindingASingleElementByEmptyIdShouldThrow() {
@Test
@NotYetImplemented(value = MARIONETTE, reason = "https://bugzilla.mozilla.org/show_bug.cgi?id=1204504")
@NotYetImplemented(SAFARI)
@NotYetImplemented(EDGE)
public void testFindingMultipleElementsByEmptyIdShouldReturnEmptyList() {
driver.get(pages.formPage);
List<WebElement> elements = driver.findElements(By.id(""));
Expand Down Expand Up @@ -239,6 +241,7 @@ public void testFindingASingleElementByEmptyTagNameShouldThrow() {
}

@Test
@NotYetImplemented(EDGE)
public void testFindingMultipleElementsByEmptyTagNameShouldThrow() {
driver.get(pages.formPage);
assertThatExceptionOfType(NoSuchElementException.class)
Expand Down Expand Up @@ -328,6 +331,7 @@ public void testFindingASingleElementByEmptyClassNameShouldThrow() {
}

@Test
@NotYetImplemented(EDGE)
public void testFindingMultipleElementsByEmptyClassNameShouldThrow() {
driver.get(pages.xhtmlTestPage);
assertThatExceptionOfType(NoSuchElementException.class)
Expand All @@ -344,6 +348,7 @@ public void testFindingASingleElementByCompoundClassNameShouldThrow() {
@Test
@NotYetImplemented(MARIONETTE)
@NotYetImplemented(SAFARI)
@NotYetImplemented(EDGE)
public void testFindingMultipleElementsByCompoundClassNameShouldThrow() {
driver.get(pages.xhtmlTestPage);
assertThatExceptionOfType(NoSuchElementException.class)
Expand All @@ -360,6 +365,7 @@ public void testFindingASingleElementByInvalidClassNameShouldThrow() {
@Test
@NotYetImplemented(MARIONETTE)
@NotYetImplemented(SAFARI)
@NotYetImplemented(EDGE)
public void testFindingMultipleElementsByInvalidClassNameShouldThrow() {
driver.get(pages.xhtmlTestPage);
assertThatExceptionOfType(NoSuchElementException.class)
Expand Down Expand Up @@ -426,6 +432,7 @@ public void testFindingALinkByXpathUsingContainsKeywordShouldWork() {
@Ignore(IE)
@NotYetImplemented(MARIONETTE)
@NotYetImplemented(SAFARI)
@NotYetImplemented(EDGE)
public void testShouldBeAbleToFindElementByXPathWithNamespace() {
driver.get(pages.svgPage);
WebElement element = driver.findElement(By.xpath("//svg:svg//svg:text"));
Expand All @@ -436,6 +443,7 @@ public void testShouldBeAbleToFindElementByXPathWithNamespace() {
@Ignore(IE)
@NotYetImplemented(SAFARI)
@Ignore(CHROME)
@NotYetImplemented(EDGE)
public void testShouldBeAbleToFindElementByXPathInXmlDocument() {
driver.get(pages.simpleXmlDocument);
WebElement element = driver.findElement(By.xpath("//foo"));
Expand Down Expand Up @@ -599,6 +607,7 @@ public void testFindingASingleElementByEmptyCssSelectorShouldThrow() {
}

@Test
@NotYetImplemented(EDGE)
public void testFindingMultipleElementsByEmptyCssSelectorShouldThrow() {
driver.get(pages.xhtmlTestPage);
assertThatExceptionOfType(NoSuchElementException.class)
Expand All @@ -613,6 +622,7 @@ public void testFindingASingleElementByInvalidCssSelectorShouldThrow() {
}

@Test
@NotYetImplemented(EDGE)
public void testFindingMultipleElementsByInvalidCssSelectorShouldThrow() {
assumeFalse("Ignoring test for lack of error in CSS in IE6", isIe6(driver));
driver.get(pages.xhtmlTestPage);
Expand Down Expand Up @@ -791,6 +801,7 @@ public void testAnElementFoundInADifferentFrameIsStale() {
@SwitchToTopAfterTest
@Test
@NotYetImplemented(SAFARI)
@NotYetImplemented(EDGE)
public void testAnElementFoundInADifferentFrameViaJsCanBeUsed() {
driver.get(pages.missedJsReferencePage);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@
package org.openqa.selenium;

import static org.assertj.core.api.Assertions.assertThat;
import static org.openqa.selenium.testing.drivers.Browser.EDGE;

import org.junit.Test;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.testing.JUnit4TestBase;
import org.openqa.selenium.testing.NotYetImplemented;

public class ElementSelectingTest extends JUnit4TestBase {
private static final boolean UNSELECTED = false;
Expand Down Expand Up @@ -103,6 +105,7 @@ public void testClickingOnASelectedRadioButtonShouldLeaveItSelected() {
}

@Test
@NotYetImplemented(EDGE)
public void testShouldBeAbleToToggleEnabledMultiSelectOption() {
driver.get(pages.formPage);
assertCanToggle(selectedMultipleSelectOption());
Expand Down

0 comments on commit aa041a8

Please sign in to comment.