quickcheck-webdriver (empty) → 0.1.0.0
raw patch · 4 files changed
+92/−0 lines, 4 filesdep +QuickCheckdep +basedep +transformerssetup-changed
Dependencies added: QuickCheck, base, transformers, webdriver
Files
- LICENSE +20/−0
- Setup.hs +2/−0
- Test/QuickCheck/Monadic/WebDriver.hs +43/−0
- quickcheck-webdriver.cabal +27/−0
+ LICENSE view
@@ -0,0 +1,20 @@+Copyright (c) 2014 Christian Brink++Permission is hereby granted, free of charge, to any person obtaining+a copy of this software and associated documentation files (the+"Software"), to deal in the Software without restriction, including+without limitation the rights to use, copy, modify, merge, publish,+distribute, sublicense, and/or sell copies of the Software, and to+permit persons to whom the Software is furnished to do so, subject to+the following conditions:++The above copyright notice and this permission notice shall be included+in all copies or substantial portions of the Software.++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ Setup.hs view
@@ -0,0 +1,2 @@+import Distribution.Simple+main = defaultMain
+ Test/QuickCheck/Monadic/WebDriver.hs view
@@ -0,0 +1,43 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE StandaloneDeriving #-}+{-# LANGUAGE GADTs #-}+{-# LANGUAGE TemplateHaskell #-}+{-# LANGUAGE ScopedTypeVariables #-}+{-# LANGUAGE OverloadedStrings #-}++module Test.QuickCheck.Monadic.WebDriver + (+ -- * Example+ -- $example+ ) where++import Prelude++import Test.QuickCheck+import Test.QuickCheck.Property+import Test.QuickCheck.Monadic as QCM++import Test.WebDriver++import Data.Monoid ((<>))+import Control.Monad.IO.Class++-- |Patterned after `Test.QuickCheck.Monadic.monadicIO`.+monadicWD capabilities wd = monadic wdProperty wd+ where runSesh = runSession defaultSession capabilities+ wdProperty = ioProperty . runSesh++runIO :: IO a -> PropertyM WD a+runIO = QCM.run . liftIO++-- $example+-- > import Test.QuickCheck+-- > import Test.QuickCheck.Monadic (run, pick, assert)+-- > import Test.WebDriver+-- > prop_Example = monadicWD allCaps $ do+-- > pick $ oneof ("http://www.yesodweb.com", "http://snapframework.com/")+-- > run $ openPage url+-- > assert True+-- > runIO $ putStrLn $ "We've just evaluated a `Gen a` using `pick` and \+-- > \a `WD ()` using `run`, then asserted a that a \+-- > \property holds using `assert`."
+ quickcheck-webdriver.cabal view
@@ -0,0 +1,27 @@+-- Initial quickcheck-webdriver.cabal generated by cabal init. For further+-- documentation, see http://haskell.org/cabal/users-guide/++name: quickcheck-webdriver+version: 0.1.0.0+synopsis: Utilities for using WebDriver with QuickCheck+-- description: +license: MIT+license-file: LICENSE+author: Christian Brink+maintainer: christianpbrink@gmail.com+-- copyright: +category: Testing+build-type: Simple+-- extra-source-files: +cabal-version: >=1.10++library+ exposed-modules: Test.QuickCheck.Monadic.WebDriver+ -- other-modules: + -- other-extensions: + build-depends: base >=4.6 && <4.7+ , QuickCheck+ , webdriver+ , transformers+ -- hs-source-dirs: + default-language: Haskell2010