hspec-webdriver 1.2.1 → 1.2.2
raw patch · 3 files changed
+22/−3 lines, 3 filesdep ~hspecdep ~hspec-corePVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: hspec, hspec-core
API changes (from Hackage documentation)
- Test.Hspec.WebDriver: data Capabilities
+ Test.Hspec.WebDriver: data () => Capabilities
- Test.Hspec.WebDriver: data WD a
+ Test.Hspec.WebDriver: data () => WD a
Files
- Changelog.md +4/−0
- Test/Hspec/WebDriver.hs +15/−0
- hspec-webdriver.cabal +3/−3
Changelog.md view
@@ -1,3 +1,7 @@+## 1.2.2++* Fix build with hspec >= 2.10+ ## 1.2.1 * Fix build with hspec >= 2.5
Test/Hspec/WebDriver.hs view
@@ -390,7 +390,11 @@ procTestSession :: W.WDConfig -> Capabilities -> SpecWith (WdTestSession multi) -> Spec procTestSession cfg cap s = do (mvars, trees) <- runIO $ do+#if MIN_VERSION_hspec_core(2,10,0)+ (_, trees) <- runSpecM s+#else trees <- runSpecM s+#endif let cnt = countItems trees mvars <- replicateM cnt newEmptyMVar return (mvars, trees)@@ -454,17 +458,28 @@ --- Utils -------------------------------------------------------------------------------- +#if MIN_VERSION_hspec_core(2,10,0)+traverseSpec :: Applicative f => (Item a -> f (Item b)) -> [SpecTree a] -> f [SpecTree b]+traverseSpec = traverse . traverse++#else -- | Traverse a spec allowing the type to change traverseTree :: Applicative f => (Item a -> f (Item b)) -> SpecTree a -> f (SpecTree b) traverseTree f (Leaf i) = Leaf <$> f i traverseTree f (Node msg ss) = Node msg <$> traverse (traverseTree f) ss+#if MIN_VERSION_hspec_core(2,8,0)+traverseTree f (NodeWithCleanup loc c ss) = NodeWithCleanup loc c' <$> traverse (traverseTree f) ss+#else traverseTree f (NodeWithCleanup c ss) = NodeWithCleanup c' <$> traverse (traverseTree f) ss+#endif where c' _b = c undefined -- this undefined is OK since we do not export the definition of WdTestSession -- so the user cannot do anything with the passed in value to 'afterAll' traverseSpec :: Applicative f => (Item a -> f (Item b)) -> [SpecTree a] -> f [SpecTree b] traverseSpec f = traverse (traverseTree f)+#endif+ -- | Process the items in a depth-first walk, passing in the item counter value. mapWithCounter :: (Int -> Item a -> Item b) -> [SpecTree a] -> [SpecTree b]
hspec-webdriver.cabal view
@@ -1,5 +1,5 @@ name: hspec-webdriver-version: 1.2.1+version: 1.2.2 cabal-version: >= 1.10 build-type: Simple synopsis: Write end2end web application tests using webdriver and hspec@@ -34,8 +34,8 @@ , aeson >= 0.8 , data-default >= 0.5 , hashable >= 1.2- , hspec-core >= 2.0 && < 2.8- , hspec >= 2.0 && < 2.8+ , hspec-core >= 2.7 && < 2.12+ , hspec >= 2.7 && < 2.12 , lifted-base >= 0.2 , stm >= 2.4 , text >= 0.11