git.iko.soy/typeable/servant-reflex
on nixify-ci help sign in
typeable/servant-reflex/nix/hspec-webdriver.patch
36 lines 1.9 kB history raw
1diff --git a/Test/Hspec/WebDriver.hs b/Test/Hspec/WebDriver.hs
2index 3162656..313360c 100644
3--- a/Test/Hspec/WebDriver.hs
4+++ b/Test/Hspec/WebDriver.hs
5@@ -111,7 +111,8 @@ import Data.Traversable (traverse)
6
7 import qualified Test.Hspec as H
8 import Test.Hspec hiding (shouldReturn, shouldBe, shouldSatisfy, shouldThrow, pending, pendingWith, example)
9-import Test.Hspec.Core.Spec (Result(..), Item(..), Example(..), SpecTree, Tree(..), fromSpecList, runSpecM)
10+import qualified Test.Hspec.Core as H
11+import Test.Hspec.Core.Spec (Result(..), ResultStatus(..), Item(..), Example(..), SpecTree, Tree(..), fromSpecList, runSpecM)
13 import Test.WebDriver (WD, Capabilities)
14 import qualified Test.WebDriver as W
15@@ -398,7 +399,7 @@ procTestSession cfg cap s = do
17 instance Eq multi => Example (WdExample multi) where
18 type Arg (WdExample multi) = WdTestSession multi
19- evaluateExample (WdPending msg) _ _ _ = return $ Pending msg
20+ evaluateExample (WdPending msg) _ _ _ = return $ Result "" $ Pending Nothing msg
21 evaluateExample (WdExample multi (WdOptions {skipRemainingTestsAfterFailure}) wd) _ act _ = do
22 prevHadError <- newIORef False
23 aborted <- newIORef False
24@@ -445,9 +446,9 @@ instance Eq multi => Example (WdExample multi) where
25 merr <- readIORef prevHadError
26 mabort <- readIORef aborted
27 return $ case (merr, mabort) of
28- (True, _) -> Pending (Just "Previous example had an error")
29- (_, True) -> Pending (Just "Session has been aborted")
30- _ -> Success
31+ (True, _) -> Result "" $ Pending Nothing (Just "Previous example had an error")
32+ (_, True) -> Result "" $ Pending Nothing (Just "Session has been aborted")
33+ _ -> Result "" $ Success
35 --------------------------------------------------------------------------------
36 --- Utils