mirror of
https://github.com/LD-Reborn/Berufsschule_HAM.git
synced 2025-12-20 06:51:55 +00:00
Renamed TryRefindToast to TryRefindSuccessToast
This commit is contained in:
@@ -66,10 +66,10 @@ 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:
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -96,4 +96,9 @@ public static class AppHelper
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static bool CheckboxGetState(IWebElement webElement)
|
||||||
|
{
|
||||||
|
return webElement.GetAttribute("checked") == "true";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -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]
|
||||||
|
|||||||
Reference in New Issue
Block a user