Wait longer for spinner in automation tests

pull/6/head
Mark McDowall 10 years ago
parent 9e0c8a60b4
commit 1e815e7525

@ -40,14 +40,12 @@ namespace NzbDrone.Automation.Test
_runner.KillAll(); _runner.KillAll();
_runner.Start(); _runner.Start();
driver.Url = "http://localhost:8989"; driver.Url = "http://localhost:8989";
var page = new PageBase(driver); var page = new PageBase(driver);
page.WaitForNoSpinner(); page.WaitForNoSpinner();
GetPageErrors().Should().BeEmpty(); GetPageErrors().Should().BeEmpty();
} }
protected IEnumerable<string> GetPageErrors() protected IEnumerable<string> GetPageErrors()

@ -1,7 +1,6 @@
using FluentAssertions; using FluentAssertions;
using NUnit.Framework; using NUnit.Framework;
using NzbDrone.Automation.Test.PageModel; using NzbDrone.Automation.Test.PageModel;
using NzbDrone.Test.Common;
using OpenQA.Selenium; using OpenQA.Selenium;
namespace NzbDrone.Automation.Test namespace NzbDrone.Automation.Test
@ -11,12 +10,10 @@ namespace NzbDrone.Automation.Test
{ {
private PageBase page; private PageBase page;
[SetUp] [SetUp]
public void Setup() public void Setup()
{ {
page = new PageBase(driver); page = new PageBase(driver);
ExceptionVerification.MarkInconclusive(typeof(StaleElementReferenceException));
} }
[Test] [Test]

@ -27,11 +27,10 @@ namespace NzbDrone.Automation.Test.PageModel
return wait.Until(d => d.FindElement(by)); return wait.Until(d => d.FindElement(by));
} }
public void WaitForNoSpinner(int timeout = 30) public void WaitForNoSpinner(int timeout = 30)
{ {
//give the spinner some time to show up. //give the spinner some time to show up.
Thread.Sleep(100); Thread.Sleep(200);
var wait = new WebDriverWait(_driver, TimeSpan.FromSeconds(timeout)); var wait = new WebDriverWait(_driver, TimeSpan.FromSeconds(timeout));
wait.Until(d => wait.Until(d =>
@ -48,7 +47,6 @@ namespace NzbDrone.Automation.Test.PageModel
}); });
} }
public IWebElement SeriesNavIcon public IWebElement SeriesNavIcon
{ {
get get
@ -96,6 +94,5 @@ namespace NzbDrone.Automation.Test.PageModel
return FindByClass("x-system-nav"); return FindByClass("x-system-nav");
} }
} }
} }
} }

@ -1,6 +1,4 @@
 using System;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using NLog; using NLog;

Loading…
Cancel
Save