Skip to content

Commit

Permalink
Modifying ignored tests in .NET test suite
Browse files Browse the repository at this point in the history
Unignoring now-passing tests for Chrome, updating reasons for ignored
tests to be more descriptive, and removing distinction between Firefox
with and without Marionette.
  • Loading branch information
jimevans committed Dec 15, 2018
1 parent 7a18bf5 commit 6025bed
Show file tree
Hide file tree
Showing 14 changed files with 23 additions and 102 deletions.
5 changes: 3 additions & 2 deletions dotnet/test/common/AlertsTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,6 @@ public void ShouldAllowAUserToSetTheValueOfAPrompt()
}

[Test]
[IgnoreBrowser(Browser.Chrome, "Chrome does not throw when setting the text of an alert")]
public void SettingTheValueOfAnAlertThrows()
{
driver.Url = CreateAlertPage("cheese");
Expand Down Expand Up @@ -525,7 +524,9 @@ public void ShouldHandleAlertOnWindowClose()
}

[Test]
[IgnoreBrowser(Browser.Chrome, "Chrome does not supply text in UnhandledAlertException")]
[IgnoreBrowser(Browser.Chrome, "Driver chooses not to return text from unhandled alert")]
[IgnoreBrowser(Browser.Edge, "Driver chooses not to return text from unhandled alert")]
[IgnoreBrowser(Browser.Firefox, "Driver chooses not to return text from unhandled alert")]
[IgnoreBrowser(Browser.Opera)]
[IgnoreBrowser(Browser.Safari, "Safari driver does not do unhandled alerts")]
public void IncludesAlertTextInUnhandledAlertException()
Expand Down
27 changes: 1 addition & 26 deletions dotnet/test/common/AvailableLogsTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
namespace OpenQA.Selenium
{
[TestFixture]
[IgnoreBrowser(Browser.Edge, "Edge driver does not support logs API")]
[IgnoreBrowser(Browser.Firefox, "Firefox driver (when using Marionette/Geckodriver) does not support logs API")]
[IgnoreBrowser(Browser.IE, "IE driver does not support logs API")]
[IgnoreBrowser(Browser.Edge, "Edge driver does not support logs API")]
[IgnoreBrowser(Browser.Safari, "Edge driver does not support logs API")]
public class AvailableLogsTest : DriverTestFixture
{
Expand All @@ -28,11 +28,6 @@ public void QuitDriver()
[Test]
public void BrowserLogShouldBeEnabledByDefault()
{
if (TestUtilities.IsMarionette(driver))
{
Assert.Ignore("Marionette does not support logs API.");
}

ReadOnlyCollection<string> logTypes = driver.Manage().Logs.AvailableLogTypes;
Assert.That(logTypes, Contains.Item(LogType.Browser));
}
Expand All @@ -42,11 +37,6 @@ public void BrowserLogShouldBeEnabledByDefault()
[NeedsFreshDriver(IsCreatedBeforeTest = true)]
public void ClientLogShouldBeEnabledByDefault()
{
if (TestUtilities.IsMarionette(driver))
{
Assert.Ignore("Marionette does not support logs API.");
}

// Do one action to have *something* in the client logs.
driver.Url = formsPage;
ReadOnlyCollection<string> logTypes = driver.Manage().Logs.AvailableLogTypes;
Expand All @@ -66,23 +56,13 @@ public void ClientLogShouldBeEnabledByDefault()
[Test]
public void DriverLogShouldBeEnabledByDefault()
{
if (TestUtilities.IsMarionette(driver))
{
Assert.Ignore("Marionette does not support logs API.");
}

ReadOnlyCollection<string> logTypes = driver.Manage().Logs.AvailableLogTypes;
Assert.That(logTypes, Contains.Item(LogType.Driver), "Remote driver logs should be enabled by default");
}

[Test]
public void ProfilerLogShouldBeDisabledByDefault()
{
if (TestUtilities.IsMarionette(driver))
{
Assert.Ignore("Marionette does not support logs API.");
}

ReadOnlyCollection<string> logTypes = driver.Manage().Logs.AvailableLogTypes;
Assert.That(logTypes, Has.No.Member(LogType.Profiler), "Profiler logs should not be enabled by default");
}
Expand All @@ -91,11 +71,6 @@ public void ProfilerLogShouldBeDisabledByDefault()
[IgnoreBrowser(Browser.Chrome, "Chrome does not support profiler logs")]
public void ShouldBeAbleToEnableProfilerLog()
{
if (TestUtilities.IsMarionette(driver))
{
Assert.Ignore("Marionette does not support logs API.");
}

CreateWebDriverWithProfiling();
ReadOnlyCollection<string> logTypes = localDriver.Manage().Logs.AvailableLogTypes;
Assert.That(logTypes, Contains.Item(LogType.Profiler), "Profiler log should be enabled");
Expand Down
1 change: 0 additions & 1 deletion dotnet/test/common/ChildrenFindingTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,6 @@ public void ShouldFindChildElementsById()
}

[Test]
[IgnoreBrowser(Browser.Chrome, "Need to release atoms fix from #4351")]
public void ShouldNotReturnRootElementWhenFindingChildrenById()
{
driver.Url = nestedPage;
Expand Down
1 change: 0 additions & 1 deletion dotnet/test/common/ClickTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,6 @@ public void ShouldBeAbleToClickOnAnElementGreaterThanTwoViewports()
}

[Test]
[IgnoreBrowser(Browser.Chrome, "Fails on Chrome")]
[IgnoreBrowser(Browser.Opera, "Not Tested")]
public void ShouldBeAbleToClickOnAnElementInFrameGreaterThanTwoViewports()
{
Expand Down
16 changes: 8 additions & 8 deletions dotnet/test/common/ContentEditableTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public void SwitchToDefaultContent()
}

[Test]
[IgnoreBrowser(Browser.Firefox)]
[IgnoreBrowser(Browser.Firefox, "Browser does not automatically focus body element in frame")]
public void TypingIntoAnIFrameWithContentEditableOrDesignModeSet()
{
driver.Url = richTextPage;
Expand All @@ -37,7 +37,7 @@ public void TypingIntoAnIFrameWithContentEditableOrDesignModeSet()
}

[Test]
[IgnoreBrowser(Browser.Firefox)]
[IgnoreBrowser(Browser.Firefox, "Browser does not automatically focus body element in frame")]
[IgnoreBrowser(Browser.Safari, "Non-printable characters do not navigate within element")]
public void NonPrintableCharactersShouldWorkWithContentEditableOrDesignModeSet()
{
Expand All @@ -63,9 +63,9 @@ public void ShouldBeAbleToTypeIntoEmptyContentEditableElement()
}

[Test]
[IgnoreBrowser(Browser.Chrome)]
[IgnoreBrowser(Browser.Chrome, "Driver prepends text in contentEditable areas")]
[IgnoreBrowser(Browser.Firefox, "Driver prepends text in contentEditable areas")]
[IgnoreBrowser(Browser.Safari, "Driver prepends text to contentEditable areas")]
[IgnoreBrowser(Browser.Firefox, "Not yet implemented = https://github.com/mozilla/geckodriver/issues/667")]
public void ShouldBeAbleToTypeIntoContentEditableElementWithExistingValue()
{
driver.Url = readOnlyPage;
Expand All @@ -92,10 +92,10 @@ public void ShouldBeAbleToTypeIntoTinyMCE()
}

[Test]
[IgnoreBrowser(Browser.Chrome, "Prepends text")]
[IgnoreBrowser(Browser.Chrome, "Driver prepends text in contentEditable areas")]
[IgnoreBrowser(Browser.Firefox, "Driver prepends text in contentEditable areas")]
[IgnoreBrowser(Browser.IE, "Prepends text")]
[IgnoreBrowser(Browser.Safari, "Driver prepends text to contentEditable areas")]
[IgnoreBrowser(Browser.Firefox, "Not yet implemented = https://github.com/mozilla/geckodriver/issues/667")]
public void ShouldAppendToTinyMCE()
{
driver.Url = EnvironmentManager.Instance.UrlBuilder.WhereIs("tinymce.html");
Expand All @@ -110,8 +110,8 @@ public void ShouldAppendToTinyMCE()
}

[Test]
[IgnoreBrowser(Browser.Chrome, "Prepends text")]
[IgnoreBrowser(Browser.Firefox, "Doesn't write anything")]
[IgnoreBrowser(Browser.Chrome, "Driver prepends text in contentEditable areas")]
[IgnoreBrowser(Browser.Firefox, "Browser does not automatically focus body element in frame")]
[IgnoreBrowser(Browser.Safari, "Driver prepends text to contentEditable areas")]
public void AppendsTextToEndOfContentEditableWithMultipleTextNodes()
{
Expand Down
1 change: 0 additions & 1 deletion dotnet/test/common/CookieImplementationTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,6 @@ public void ShouldAddCookieToCurrentDomainAndPath()
}

[Test]
[IgnoreBrowser(Browser.Firefox)]
public void ShouldNotShowCookieAddedToDifferentDomain()
{
if (!CheckIsOnValidHostNameForCookieTests())
Expand Down
4 changes: 2 additions & 2 deletions dotnet/test/common/ElementPropertyTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace OpenQA.Selenium
public class ElementPropertyTest : DriverTestFixture
{
[Test]
[IgnoreBrowser(Browser.Chrome, "Chrome does not support get element property command")]
//[IgnoreBrowser(Browser.Chrome, "Chrome does not support get element property command")]
[IgnoreBrowser(Browser.Opera)]
[IgnoreBrowser(Browser.Remote)]
[IgnoreBrowser(Browser.Safari, "Safari does not support get element property command")]
Expand All @@ -23,7 +23,7 @@ public void ShouldReturnNullWhenGettingTheValueOfAPropertyThatIsNotListed()
}

[Test]
[IgnoreBrowser(Browser.Chrome, "Chrome does not support get element property command")]
//[IgnoreBrowser(Browser.Chrome, "Chrome does not support get element property command")]
[IgnoreBrowser(Browser.Opera)]
[IgnoreBrowser(Browser.Remote)]
[IgnoreBrowser(Browser.Safari, "Safari does not support get element property command")]
Expand Down
6 changes: 1 addition & 5 deletions dotnet/test/common/ExecutingAsyncJavascriptTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,6 @@ public void ShouldBeAbleToMakeXMLHttpRequestsAndWaitForTheResponse()
}

[Test]
[IgnoreBrowser(Browser.Chrome, "Does not handle async alerts")]
[IgnoreBrowser(Browser.Safari, "Does not alerts thrown during async JavaScript; driver hangs until alert dismissed")]
[IgnoreBrowser(Browser.Opera, "Does not handle async alerts")]
public void ThrowsIfScriptTriggersAlert()
Expand All @@ -289,7 +288,6 @@ public void ThrowsIfScriptTriggersAlert()
}

[Test]
[IgnoreBrowser(Browser.Chrome, "Does not handle async alerts")]
[IgnoreBrowser(Browser.Safari, "Does not alerts thrown during async JavaScript; driver hangs until alert dismissed")]
[IgnoreBrowser(Browser.Opera, "Does not handle async alerts")]
public void ThrowsIfAlertHappensDuringScript()
Expand All @@ -304,7 +302,6 @@ public void ThrowsIfAlertHappensDuringScript()
}

[Test]
[IgnoreBrowser(Browser.Chrome, "Does not handle async alerts")]
[IgnoreBrowser(Browser.Safari, "Does not alerts thrown during async JavaScript; driver hangs until alert dismissed")]
[IgnoreBrowser(Browser.Opera, "Does not handle async alerts")]
public void ThrowsIfScriptTriggersAlertWhichTimesOut()
Expand All @@ -320,7 +317,6 @@ public void ThrowsIfScriptTriggersAlertWhichTimesOut()
}

[Test]
[IgnoreBrowser(Browser.Chrome, "Does not handle async alerts")]
[IgnoreBrowser(Browser.Safari, "Does not alerts thrown during async JavaScript; driver hangs until alert dismissed")]
[IgnoreBrowser(Browser.Opera, "Does not handle async alerts")]
public void ThrowsIfAlertHappensDuringScriptWhichTimesOut()
Expand All @@ -335,7 +331,7 @@ public void ThrowsIfAlertHappensDuringScriptWhichTimesOut()
}

[Test]
[IgnoreBrowser(Browser.Chrome, "Does not handle async alerts")]
[IgnoreBrowser(Browser.Chrome, "Driver chooses not to return text from unhandled alert")]
[IgnoreBrowser(Browser.Edge, "Driver chooses not to return text from unhandled alert")]
[IgnoreBrowser(Browser.Firefox, "Driver chooses not to return text from unhandled alert")]
[IgnoreBrowser(Browser.Safari, "Does not alerts thrown during async JavaScript; driver hangs until alert dismissed")]
Expand Down
18 changes: 2 additions & 16 deletions dotnet/test/common/GetLogsTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
namespace OpenQA.Selenium
{
[TestFixture]
[IgnoreBrowser(Browser.IE, "IE driver does not support logs API")]
[IgnoreBrowser(Browser.Edge, "Edge driver does not support logs API")]
[IgnoreBrowser(Browser.Firefox, "Firefox driver (when using Marionette/Geckodriver) does not support logs API")]
[IgnoreBrowser(Browser.IE, "IE driver does not support logs API")]
[IgnoreBrowser(Browser.Safari, "Edge driver does not support logs API")]
public class GetLogsTest : DriverTestFixture
{
Expand All @@ -29,11 +30,6 @@ public void QuitDriver()
[Test]
public void LogBufferShouldBeResetAfterEachGetLogCall()
{
if (TestUtilities.IsMarionette(driver))
{
Assert.Ignore("Marionette does not support logs API.");
}

ReadOnlyCollection<string> logTypes = driver.Manage().Logs.AvailableLogTypes;
foreach (string logType in logTypes)
{
Expand All @@ -50,11 +46,6 @@ public void LogBufferShouldBeResetAfterEachGetLogCall()
[Test]
public void DifferentLogsShouldNotContainTheSameLogEntries()
{
if (TestUtilities.IsMarionette(driver))
{
Assert.Ignore("Marionette does not support logs API.");
}

driver.Url = simpleTestPage;
Dictionary<string, ReadOnlyCollection<LogEntry>> logTypeToEntriesDictionary = new Dictionary<string, ReadOnlyCollection<LogEntry>>();
ReadOnlyCollection<string> logTypes = driver.Manage().Logs.AvailableLogTypes;
Expand All @@ -78,11 +69,6 @@ public void DifferentLogsShouldNotContainTheSameLogEntries()
[Test]
public void TurningOffLogShouldMeanNoLogMessages()
{
if (TestUtilities.IsMarionette(driver))
{
Assert.Ignore("Marionette does not support logs API.");
}

ReadOnlyCollection<string> logTypes = driver.Manage().Logs.AvailableLogTypes;
foreach (string logType in logTypes)
{
Expand Down
7 changes: 1 addition & 6 deletions dotnet/test/common/PageLoadingTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -148,14 +148,9 @@ public void ShouldFollowMetaRedirects()
}

[Test]
[IgnoreBrowser(Browser.Firefox, "Browser doesn't see subsequent navigation to a fragment as a new navigation.")]
public void ShouldBeAbleToGetAFragmentOnTheCurrentPage()
{
if (TestUtilities.IsMarionette(driver))
{
// Don't run this test on Marionette.
Assert.Ignore("Marionette doesn't see subsequent navigation to a fragment as a new navigation.");
}

driver.Url = xhtmlTestPage;
driver.Url = xhtmlTestPage + "#text";
driver.FindElement(By.Id("id1"));
Expand Down
1 change: 0 additions & 1 deletion dotnet/test/common/PositionAndSizeTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ public void ShouldCorrectlyIdentifyThatAnElementHasWidthAndHeight()

[Test]
[IgnoreBrowser(Browser.Opera)]
[IgnoreBrowser(Browser.Chrome, "WebKit bug 28804")]
public void ShouldHandleNonIntegerPositionAndSize()
{
driver.Url = rectanglesPage;
Expand Down
27 changes: 5 additions & 22 deletions dotnet/test/common/TypingTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -657,14 +657,10 @@ public void CanClearNumberInputAfterTypingInvalidInput()
// Tests below here are not included in the Java test suite
//------------------------------------------------------------------
[Test]
[IgnoreBrowser(Browser.Firefox, "Browser does not automatically focus body element in frame")]
[IgnoreBrowser(Browser.Opera, "Does not support contentEditable")]
public void TypingIntoAnIFrameWithContentEditableOrDesignModeSet()
{
if (TestUtilities.IsMarionette(driver))
{
Assert.Ignore("Marionette does not ContentEditable.");
}

driver.Url = richTextPage;

driver.SwitchTo().Frame("editFrame");
Expand All @@ -680,15 +676,11 @@ public void TypingIntoAnIFrameWithContentEditableOrDesignModeSet()
}

[Test]
//[IgnoreBrowser(Browser.Chrome, "Driver prepends text in contentEditable")]
[IgnoreBrowser(Browser.Firefox, "Browser does not automatically focus body element in frame")]
[IgnoreBrowser(Browser.Opera, "Does not support contentEditable")]
[IgnoreBrowser(Browser.Chrome, "ChromeDriver prepends text in contentEditable")]
public void NonPrintableCharactersShouldWorkWithContentEditableOrDesignModeSet()
{
if (TestUtilities.IsMarionette(driver))
{
Assert.Ignore("Marionette does not ContentEditable.");
}

driver.Url = richTextPage;

// not tested on mac
Expand All @@ -712,11 +704,6 @@ public void NonPrintableCharactersShouldWorkWithContentEditableOrDesignModeSet()
[IgnoreBrowser(Browser.Opera, "Does not support contentEditable")]
public void ShouldBeAbleToTypeIntoEmptyContentEditableElement()
{
if (TestUtilities.IsMarionette(driver))
{
Assert.Ignore("Marionette does not ContentEditable.");
}

driver.Url = readOnlyPage;
IWebElement editable = driver.FindElement(By.Id("content-editable"));

Expand All @@ -727,14 +714,10 @@ public void ShouldBeAbleToTypeIntoEmptyContentEditableElement()
}

[Test]
[IgnoreBrowser(Browser.Chrome, "ChromeDriver prepends text")]
[IgnoreBrowser(Browser.Chrome, "Driver prepends text in contentEditable")]
[IgnoreBrowser(Browser.Firefox, "Driver prepends text in contentEditable")]
public void ShouldBeAbleToTypeIntoContentEditableElementWithExistingValue()
{
if (TestUtilities.IsMarionette(driver))
{
Assert.Ignore("Marionette does not ContentEditable.");
}

driver.Url = readOnlyPage;
IWebElement editable = driver.FindElement(By.Id("content-editable"));

Expand Down

0 comments on commit 6025bed

Please sign in to comment.