Skip to content

Commit

Permalink
[dotnet] Fixing tests in SelectBrowserTests
Browse files Browse the repository at this point in the history
Browser behavior had changed, and we did
not update the tests.
  • Loading branch information
diemol committed Mar 23, 2024
1 parent 087d2bf commit 65b5ff3
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions dotnet/test/support/UI/SelectBrowserTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ public void ShouldThrowExceptionOnSelectByTextExactMatchIfOptionDoesNotExist()
}

[Test]
[IgnoreBrowser(Browser.Firefox, "Not working in all bindings.")]
public void ShouldNotAllowInvisibleOptionsToBeSelectedByVisibleText()
{
IWebElement element = driver.FindElement(By.Name("invisi_select"));
Expand All @@ -201,7 +202,7 @@ public void ShouldThrowExceptionOnSelectByVisibleTextIfOptionDisabled()
{
IWebElement element = driver.FindElement(By.Name("single_disabled"));
SelectElement elementWrapper = new SelectElement(element);
Assert.Throws<NoSuchElementException>(() => elementWrapper.SelectByText("Disabled"));
Assert.Throws<InvalidOperationException>(() => elementWrapper.SelectByText("Disabled"));
}

[Test]
Expand All @@ -227,7 +228,7 @@ public void ShouldThrowExceptionOnSelectByIndexIfOptionDisabled()
{
IWebElement element = driver.FindElement(By.Name("single_disabled"));
SelectElement elementWrapper = new SelectElement(element);
Assert.Throws<NoSuchElementException>(() => elementWrapper.SelectByIndex(1));
Assert.Throws<InvalidOperationException>(() => elementWrapper.SelectByIndex(1));
}

[Test]
Expand All @@ -253,7 +254,7 @@ public void ShouldThrowExceptionOnSelectByReturnedValueIfOptionDisabled()
{
IWebElement element = driver.FindElement(By.Name("single_disabled"));
SelectElement elementWrapper = new SelectElement(element);
Assert.Throws<NoSuchElementException>(() => elementWrapper.SelectByValue("disabled"));
Assert.Throws<InvalidOperationException>(() => elementWrapper.SelectByValue("disabled"));
}

[Test]
Expand Down Expand Up @@ -287,7 +288,7 @@ public void ShouldAllowUserToDeselectOptionsByVisibleText()
}

[Test]

[IgnoreBrowser(Browser.Firefox, "Not working in all bindings.")]
public void ShouldNotAllowUserToDeselectOptionsByInvisibleText()
{
IWebElement element = driver.FindElement(By.Name("invisi_select"));
Expand Down

0 comments on commit 65b5ff3

Please sign in to comment.