Renamed TryRefindToast to TryRefindSuccessToast

This commit is contained in:
2025-11-09 20:35:05 +01:00
parent 1b95cf4d3b
commit 0002be08aa
2 changed files with 9 additions and 4 deletions

View File

@@ -66,7 +66,7 @@ public static class AppHelper
Thread.Sleep(250); Thread.Sleep(250);
} }
public static bool TryRetryFindToast(ChromeDriver driver) public static bool TryRetryFindSuccessToast(ChromeDriver driver)
{ {
int retryCounter = 0; int retryCounter = 0;
retry: retry:
@@ -96,4 +96,9 @@ public static class AppHelper
} }
return false; return false;
} }
public static bool CheckboxGetState(IWebElement webElement)
{
return webElement.GetAttribute("checked") == "true";
}
} }

View File

@@ -77,7 +77,7 @@ public class InventoryPageTests : IDisposable
IWebElement okButton = _driver.FindElement(By.CssSelector("#viewAssetModal button.btn.btn-primary[data-bs-dismiss=\"modal\"]")); IWebElement okButton = _driver.FindElement(By.CssSelector("#viewAssetModal button.btn.btn-primary[data-bs-dismiss=\"modal\"]"));
okButton.Click(); okButton.Click();
Thread.Sleep(500); Thread.Sleep(500);
Assert.True(AppHelper.TryRetryFindToast(_driver)); Assert.True(AppHelper.TryRetryFindSuccessToast(_driver));
} }
[Fact] [Fact]
@@ -98,7 +98,7 @@ public class InventoryPageTests : IDisposable
IWebElement okButton = _driver.FindElement(By.CssSelector("#updateAssetModal button.btn.btn-warning[type=\"submit\"]")); IWebElement okButton = _driver.FindElement(By.CssSelector("#updateAssetModal button.btn.btn-warning[type=\"submit\"]"));
okButton.Click(); okButton.Click();
Thread.Sleep(500); Thread.Sleep(500);
Assert.True(AppHelper.TryRetryFindToast(_driver)); Assert.True(AppHelper.TryRetryFindSuccessToast(_driver));
} }
[Fact] [Fact]