webdriver-w3c-0.0.1: Bindings to the WebDriver API

Copyright2018 Automattic Inc.
LicenseGPL-3
MaintainerNathan Bloomfield (nbloomf@gmail.com)
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

Test.Tasty.WebDriver

Contents

Description

Tasty integration for WebDriverT tests.

Synopsis

Documentation

defaultWebDriverMain :: TestTree -> IO () Source #

Run a tree of webdriver tests. Thin wrapper around tasty's defaultMain that attempts to determine the deployment tier and interprets remote end config command line options.

Test Case Constructors

testCase Source #

Arguments

:: TestName 
-> WebDriver IO ()

The test

-> TestTree 

WebDriver test case with the default IO effect evaluator.

testCaseM Source #

Arguments

:: (Monad eff, Typeable eff) 
=> TestName 
-> (forall a. P WDAct a -> eff a)

Evaluator

-> (forall a. eff a -> IO a)

Conversion to IO

-> WebDriver eff () 
-> TestTree 

WebDriver test case with a custom effect evaluator.

testCaseT Source #

Arguments

:: (Monad (m IO), Typeable m) 
=> TestName 
-> (forall a. IO a -> m IO a)

Lift effects to the inner monad

-> (forall a. m IO a -> IO a)

Conversion to IO

-> WebDriverT (m IO) ()

The test

-> TestTree 

WebDriverT test case with the default IO effect evaluator.

testCaseTM Source #

Arguments

:: (Monad eff, Monad (m eff), Typeable eff, Typeable m) 
=> TestName 
-> (forall a. P WDAct a -> eff a)

Evaluator

-> (forall a. eff a -> m eff a)

Lift effects to the inner monad

-> (forall a. m eff a -> IO a)

Conversion to IO.

-> WebDriverT (m eff) ()

The test

-> TestTree 

WebDriverT test case with a custom effect evaluator.

testCaseWithSetup Source #

Arguments

:: TestName 
-> WebDriver IO u

Setup

-> (v -> WebDriver IO ())

Teardown

-> (u -> WebDriver IO v)

The test

-> TestTree 

WebDriver test case with additional setup and teardown phases using the default IO effect evaluator. Setup runs before the test (for e.g. logging in) and teardown runs after the test (for e.g. deleting temp files).

testCaseWithSetupM Source #

Arguments

:: (Monad eff, Typeable eff) 
=> TestName 
-> (forall u. P WDAct u -> eff u)

Evaluator

-> (forall u. eff u -> IO u)

Conversion to IO

-> WebDriver eff u

Setup

-> (v -> WebDriver eff ())

Teardown

-> (u -> WebDriver eff v)

The test

-> TestTree 

WebDriver test case with additional setup and teardown phases and a custom effect evaluator. Setup runs before the test (for e.g. logging in) and teardown runs after the test (for e.g. deleting temp files).

testCaseWithSetupT Source #

Arguments

:: (Monad (m IO), Typeable m) 
=> TestName 
-> (forall a. IO a -> m IO a)

Lift effects to the inner monad

-> (forall a. m IO a -> IO a)

Conversion to IO

-> WebDriverT (m IO) u

Setup

-> (v -> WebDriverT (m IO) ())

Teardown

-> (u -> WebDriverT (m IO) v)

Test

-> TestTree 

WebDriverT test case with additional setup and teardown phases using the default IO effect evaluator. Setup runs before the test (for e.g. logging in) and teardown runs after the test (for e.g. deleting temp files).

testCaseWithSetupTM Source #

Arguments

:: (Monad eff, Monad (m eff), Typeable eff, Typeable m) 
=> TestName 
-> (forall a. P WDAct a -> eff a)

Evaluator

-> (forall a. eff a -> m eff a)

Lift effects to the inner monad

-> (forall a. m eff a -> IO a)

Conversion to IO.

-> WebDriverT (m eff) u

Setup

-> (v -> WebDriverT (m eff) ())

Teardown

-> (u -> WebDriverT (m eff) v)

Test

-> TestTree 

WebDriverT test case with additional setup and teardown phases and a custom effect evaluator. Setup runs before the test (for logging in, say) and teardown runs after the test (for deleting temp files, say).

Branching

ifDriverIs :: DriverName -> (TestTree -> TestTree) -> TestTree -> TestTree Source #

Set local options if the Driver option is a given value.

ifTierIs :: DeploymentTier -> (TestTree -> TestTree) -> TestTree -> TestTree Source #

Set local options if the Deployment option is a given value.

ifHeadless :: (TestTree -> TestTree) -> TestTree -> TestTree Source #

Set local options if Headless is true.

unlessDriverIs :: DriverName -> (TestTree -> TestTree) -> TestTree -> TestTree Source #

Set local options if the Driver option is not a given value.

unlessTierIs :: DeploymentTier -> (TestTree -> TestTree) -> TestTree -> TestTree Source #

Set local options if the Deployment option is not a given value.

unlessHeadless :: (TestTree -> TestTree) -> TestTree -> TestTree Source #

Set local options if Headless is false.

Options

data DeploymentTier Source #

Representation of the deployment environment.

Constructors

DEV

Local environment

TEST

CI server (for testing the library)

PROD

Production -- e.g. testing a real site