webdriver-w3c-0.0.3: Bindings to the WebDriver API
Copyright2018 Automattic Inc.
LicenseGPL-3
MaintainerNathan Bloomfield (nbloomf@gmail.com)
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

Test.Tasty.WebDriver

Description

Tasty integration for WebDriverT tests.

Synopsis

Documentation

defaultWebDriverMain :: TestTree -> IO () Source #

Run a tree of WebDriverT 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 
-> WebDriverT 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

-> WebDriverT eff () 
-> TestTree 

WebDriver test case with a custom effect evaluator.

testCaseT Source #

Arguments

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

Conversion to IO

-> WebDriverTT t IO ()

The test

-> TestTree 

WebDriverT test case with the default IO effect evaluator.

testCaseTM Source #

Arguments

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

Evaluator

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

Conversion to IO.

-> WebDriverTT t eff ()

The test

-> TestTree 

WebDriverT test case with a custom effect evaluator.

testCaseWithSetup Source #

Arguments

:: TestName 
-> WebDriverT IO u

Setup

-> (v -> WebDriverT IO ())

Teardown

-> (u -> WebDriverT 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 a. P WDAct a -> eff a)

Evaluator

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

Conversion to IO

-> WebDriverT eff u

Setup

-> (v -> WebDriverT eff ())

Teardown

-> (u -> WebDriverT 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 (t IO), MonadTrans t, Typeable t) 
=> TestName 
-> (forall a. t IO a -> IO a)

Conversion to IO

-> WebDriverTT t IO u

Setup

-> (v -> WebDriverTT t IO ())

Teardown

-> (u -> WebDriverTT t 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 (t eff), MonadTrans t, Typeable eff, Typeable t) 
=> TestName 
-> (forall a. P WDAct a -> eff a)

Evaluator

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

Conversion to IO.

-> WebDriverTT t eff u

Setup

-> (v -> WebDriverTT t eff ())

Teardown

-> (u -> WebDriverTT t 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

newtype Driver Source #

Remote end name.

Constructors

Driver 

newtype DataPath Source #

Path where secrets are stored.

Constructors

DataPath 

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

Instances

Instances details
Eq DeploymentTier Source # 
Instance details

Defined in Test.Tasty.WebDriver

Show DeploymentTier Source # 
Instance details

Defined in Test.Tasty.WebDriver

newtype TestDelay Source #

Delay between test attempts.

Constructors

TestDelay 

Fields

newtype LogColors Source #

Governs whether logs are printed in color

Constructors

LogColors 

Fields