From 1e815e7525efc64c7be0021b7239c1c56eafdcf4 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Mon, 11 Aug 2014 21:26:49 -0700 Subject: [PATCH] Wait longer for spinner in automation tests --- src/NzbDrone.Automation.Test/AutomationTest.cs | 2 -- src/NzbDrone.Automation.Test/MainPagesTest.cs | 3 --- src/NzbDrone.Automation.Test/PageModel/PageBase.cs | 5 +---- src/NzbDrone.Test.Common/ExceptionVerification.cs | 4 +--- 4 files changed, 2 insertions(+), 12 deletions(-) diff --git a/src/NzbDrone.Automation.Test/AutomationTest.cs b/src/NzbDrone.Automation.Test/AutomationTest.cs index ed0b7dfa2..3e0209232 100644 --- a/src/NzbDrone.Automation.Test/AutomationTest.cs +++ b/src/NzbDrone.Automation.Test/AutomationTest.cs @@ -40,14 +40,12 @@ namespace NzbDrone.Automation.Test _runner.KillAll(); _runner.Start(); - driver.Url = "http://localhost:8989"; var page = new PageBase(driver); page.WaitForNoSpinner(); GetPageErrors().Should().BeEmpty(); - } protected IEnumerable GetPageErrors() diff --git a/src/NzbDrone.Automation.Test/MainPagesTest.cs b/src/NzbDrone.Automation.Test/MainPagesTest.cs index acb40c0c5..df082ed3c 100644 --- a/src/NzbDrone.Automation.Test/MainPagesTest.cs +++ b/src/NzbDrone.Automation.Test/MainPagesTest.cs @@ -1,7 +1,6 @@ using FluentAssertions; using NUnit.Framework; using NzbDrone.Automation.Test.PageModel; -using NzbDrone.Test.Common; using OpenQA.Selenium; namespace NzbDrone.Automation.Test @@ -11,12 +10,10 @@ namespace NzbDrone.Automation.Test { private PageBase page; - [SetUp] public void Setup() { page = new PageBase(driver); - ExceptionVerification.MarkInconclusive(typeof(StaleElementReferenceException)); } [Test] diff --git a/src/NzbDrone.Automation.Test/PageModel/PageBase.cs b/src/NzbDrone.Automation.Test/PageModel/PageBase.cs index 93c804703..bf54db7e3 100644 --- a/src/NzbDrone.Automation.Test/PageModel/PageBase.cs +++ b/src/NzbDrone.Automation.Test/PageModel/PageBase.cs @@ -27,11 +27,10 @@ namespace NzbDrone.Automation.Test.PageModel return wait.Until(d => d.FindElement(by)); } - public void WaitForNoSpinner(int timeout = 30) { //give the spinner some time to show up. - Thread.Sleep(100); + Thread.Sleep(200); var wait = new WebDriverWait(_driver, TimeSpan.FromSeconds(timeout)); wait.Until(d => @@ -48,7 +47,6 @@ namespace NzbDrone.Automation.Test.PageModel }); } - public IWebElement SeriesNavIcon { get @@ -96,6 +94,5 @@ namespace NzbDrone.Automation.Test.PageModel return FindByClass("x-system-nav"); } } - } } \ No newline at end of file diff --git a/src/NzbDrone.Test.Common/ExceptionVerification.cs b/src/NzbDrone.Test.Common/ExceptionVerification.cs index 79bb6c2c7..82fe76927 100644 --- a/src/NzbDrone.Test.Common/ExceptionVerification.cs +++ b/src/NzbDrone.Test.Common/ExceptionVerification.cs @@ -1,6 +1,4 @@ - - -using System; +using System; using System.Collections.Generic; using System.Linq; using NLog;