Revert "Fix test"

This reverts commit 0096250384.
This commit is contained in:
nicolas.dorier
2019-09-11 16:22:27 +09:00
parent 0096250384
commit 60a8b23c03

View File

@@ -99,7 +99,9 @@ namespace BTCPayServer.Tests
public string RegisterNewUser(bool isAdmin = false)
{
EnsureLogout();
GoToHome();
if (Driver.PageSource.Contains("id=\"Logout\""))
Logout();
var usr = RandomUtils.GetUInt256().ToString().Substring(20) + "@a.com";
Driver.FindElement(By.Id("Register")).Click();
Driver.FindElement(By.Id("Email")).SendKeys(usr);
@@ -112,13 +114,6 @@ namespace BTCPayServer.Tests
return usr;
}
private void EnsureLogout()
{
GoToHome();
if (Driver.PageSource.Contains("id=\"Logout\""))
Logout();
}
public (string storeName, string storeId) CreateNewStore()
{
var usr = "Store" + RandomUtils.GetUInt64().ToString();
@@ -210,10 +205,10 @@ namespace BTCPayServer.Tests
public void Login(string user, string password)
{
EnsureLogout();
Driver.FindElement(By.Id("Email")).SendKeys(user);
Driver.FindElement(By.Id("Password")).SendKeys(password);
Driver.FindElement(By.Id("LoginButton")).Click();
}
public void GoToStore(string storeId, StoreNavPages storeNavPage = StoreNavPages.Index)