mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-18 22:44:29 +01:00
Code formatting updates (#4502)
* Editorconfig: Add space_before_self_closing setting This was a difference between the way dotnet-format and Rider format code. See https://www.jetbrains.com/help/rider/EditorConfig_Index.html * Editorconfig: Keep 4 spaces indentation for Swagger JSON files They are all formatted that way, let's keep it like that. * Apply dotnet-format, mostly white-space related changes
This commit is contained in:
@@ -138,7 +138,7 @@ retry:
|
||||
el.Clear();
|
||||
el.SendKeys(text);
|
||||
}
|
||||
|
||||
|
||||
public static void ScrollTo(this IWebDriver driver, IWebElement element)
|
||||
{
|
||||
driver.ExecuteJavaScript("arguments[0].scrollIntoView();", element);
|
||||
@@ -148,7 +148,7 @@ retry:
|
||||
{
|
||||
ScrollTo(driver, driver.FindElement(selector));
|
||||
}
|
||||
|
||||
|
||||
public static void WaitUntilAvailable(this IWebDriver driver, By selector, TimeSpan? waitTime = null)
|
||||
{
|
||||
// Try fast path
|
||||
@@ -165,7 +165,7 @@ retry:
|
||||
wait.UntilJsIsReady();
|
||||
|
||||
int retriesLeft = 4;
|
||||
retry:
|
||||
retry:
|
||||
try
|
||||
{
|
||||
var el = driver.FindElement(selector);
|
||||
@@ -176,18 +176,19 @@ retry:
|
||||
catch (NoSuchElementException) when (retriesLeft > 0)
|
||||
{
|
||||
retriesLeft--;
|
||||
if (waitTime != null) Thread.Sleep(waitTime.Value);
|
||||
if (waitTime != null)
|
||||
Thread.Sleep(waitTime.Value);
|
||||
goto retry;
|
||||
}
|
||||
wait.UntilJsIsReady();
|
||||
}
|
||||
|
||||
|
||||
public static void WaitForAndClick(this IWebDriver driver, By selector)
|
||||
{
|
||||
driver.WaitUntilAvailable(selector);
|
||||
driver.FindElement(selector).Click();
|
||||
}
|
||||
|
||||
|
||||
public static bool ElementDoesNotExist(this IWebDriver driver, By selector)
|
||||
{
|
||||
Assert.Throws<NoSuchElementException>(() =>
|
||||
|
||||
Reference in New Issue
Block a user