Tests: Wait for advanced settings closing animation

This commit is contained in:
Dennis Reimann 2021-02-17 12:34:49 +01:00
parent 6c9c463da9
commit db5f64432e
No known key found for this signature in database
GPG key ID: 5009E1797F03F8D0

View file

@ -3,6 +3,7 @@ using System.Globalization;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using BTCPayServer.Abstractions.Models; using BTCPayServer.Abstractions.Models;
using BTCPayServer.Lightning; using BTCPayServer.Lightning;
@ -151,16 +152,11 @@ namespace BTCPayServer.Tests
Driver.FindElement(By.CssSelector($"#ScriptPubKeyType option[value={format}]")).Click(); Driver.FindElement(By.CssSelector($"#ScriptPubKeyType option[value={format}]")).Click();
Driver.FindElement(By.Id("AdvancedSettingsButton")).Click(); Driver.FindElement(By.Id("AdvancedSettingsButton")).Click();
Driver.SetCheckbox(By.Id("ImportKeysToRPC"), importkeys); Driver.SetCheckbox(By.Id("ImportKeysToRPC"), importkeys);
Driver.FindElement(By.Id("AdvancedSettingsButton")).Click(); // close again
try // close again and wait for close
{ Driver.FindElement(By.Id("AdvancedSettingsButton")).Click();
Driver.FindElement(By.Id("Continue")).Click(); Thread.Sleep(250);
} Driver.FindElement(By.Id("Continue")).Click();
catch (ElementClickInterceptedException)
{
Driver.WaitForAndClick(By.Id("Continue"));
}
// Seed backup page // Seed backup page
FindAlertMessage(); FindAlertMessage();