Safe Haskell | None |
---|---|
Language | Haskell2010 |
Test.Sandwich.Internal
Description
Internal functionality exposed for sibling libraries such as sandwich-webdriver to use. Should not be used otherwise.
Synopsis
- type Spec context m = SpecFree context m ()
- type SpecFree context m a = Free (SpecCommand context m) a
- data SpecCommand context m next
- class HasBaseContext a
- class HasLabel context (l :: Symbol) a
- data LabelValue (l :: Symbol) a = LabelValue a
- data (a :: *) :> (b :: *) = a :> b
- type ExampleM context = ExampleT context IO
- newtype ExampleT context m a = ExampleT {
- unExampleT :: ReaderT context (LoggingT m) a
- data RunNodeWithStatus context s l t where
- RunNodeBefore :: {..} -> RunNodeWithStatus context s l t
- RunNodeAfter :: {..} -> RunNodeWithStatus context s l t
- RunNodeIntroduce :: Typeable intro => {..} -> RunNodeWithStatus context s l t
- RunNodeIntroduceWith :: {..} -> RunNodeWithStatus context s l t
- RunNodeAround :: {..} -> RunNodeWithStatus context s l t
- RunNodeDescribe :: {..} -> RunNodeWithStatus context s l t
- RunNodeParallel :: {..} -> RunNodeWithStatus context s l t
- RunNodeIt :: {..} -> RunNodeWithStatus context s l t
- type RunNodeFixed context = RunNodeWithStatus context Status (Seq LogEntry) Bool
- type RunNode context = RunNodeWithStatus context (Var Status) (Var (Seq LogEntry)) (Var Bool)
- data RunNodeCommonWithStatus s l t = RunNodeCommonWithStatus {
- runTreeLabel :: String
- runTreeId :: Int
- runTreeAncestors :: Seq Int
- runTreeToggled :: t
- runTreeOpen :: t
- runTreeStatus :: s
- runTreeVisible :: Bool
- runTreeFolder :: Maybe FilePath
- runTreeVisibilityLevel :: Int
- runTreeRecordTime :: Bool
- runTreeLogs :: l
- runTreeLoc :: Maybe SrcLoc
- extractValues :: (forall context. RunNodeWithStatus context s l t -> a) -> RunNodeWithStatus context s l t -> [a]
- extractValuesControlRecurse :: (forall context. RunNodeWithStatus context s l t -> (Bool, a)) -> RunNodeWithStatus context s l t -> [a]
- getCommons :: RunNodeWithStatus context s l t -> [RunNodeCommonWithStatus s l t]
- cancelNode :: RunNode context -> IO ()
- data Status
- = NotStarted
- | Running { }
- | Done { }
- fixRunTree :: RunNode context -> STM (RunNodeFixed context)
- waitForTree :: RunNode context -> IO Result
- newtype SomeAsyncExceptionWithEq = SomeAsyncExceptionWithEq SomeAsyncException
- logEntryStr :: LogEntry -> LogStr
- countWhere :: (forall context. RunNodeWithStatus context s l t -> Bool) -> [RunNodeWithStatus context s l t] -> Int
- isItBlock :: RunNodeWithStatus context s l t -> Bool
- isRunningItBlock :: RunNodeWithStatus context Status l t -> Bool
- isSuccessItBlock :: RunNodeWithStatus context Status l t -> Bool
- isPendingItBlock :: RunNodeWithStatus context Status l t -> Bool
- isFailedItBlock :: RunNodeWithStatus context Status l t -> Bool
- isFailedBlock :: RunNodeWithStatus context Status l t -> Bool
- isDoneItBlock :: RunNodeWithStatus context Status l t -> Bool
- isNotStartedItBlock :: RunNodeWithStatus context Status l t -> Bool
- formatNominalDiffTime :: NominalDiffTime -> String
- startSandwichTree :: Options -> CoreSpec -> IO [RunNode BaseContext]
- startSandwichTree' :: BaseContext -> Options -> CoreSpec -> IO [RunNode BaseContext]
- runSandwichTree :: Options -> CoreSpec -> IO [RunNode BaseContext]
- runWithRepeat :: Int -> Int -> IO (ExitReason, Int) -> IO ()
- baseContextFromOptions :: Options -> IO BaseContext
- gatherNodeOptions :: Free (SpecCommand context m) r -> [NodeOptions]
- gatherMainFunctions :: Free (SpecCommand context m) r -> [NodeModuleInfo]
- takenMainOptions :: [Text]
- gatherShorthands :: [NodeModuleInfo] -> [(NodeModuleInfo, Text)]
Documentation
type SpecFree context m a = Free (SpecCommand context m) a Source #
data SpecCommand context m next Source #
Instances
Functor (SpecCommand context m) Source # | |
Defined in Test.Sandwich.Types.Spec Methods fmap :: (a -> b) -> SpecCommand context m a -> SpecCommand context m b # (<$) :: a -> SpecCommand context m b -> SpecCommand context m a # | |
Foldable (SpecCommand context m) Source # | |
Defined in Test.Sandwich.Types.Spec Methods fold :: Monoid m0 => SpecCommand context m m0 -> m0 # foldMap :: Monoid m0 => (a -> m0) -> SpecCommand context m a -> m0 # foldMap' :: Monoid m0 => (a -> m0) -> SpecCommand context m a -> m0 # foldr :: (a -> b -> b) -> b -> SpecCommand context m a -> b # foldr' :: (a -> b -> b) -> b -> SpecCommand context m a -> b # foldl :: (b -> a -> b) -> b -> SpecCommand context m a -> b # foldl' :: (b -> a -> b) -> b -> SpecCommand context m a -> b # foldr1 :: (a -> a -> a) -> SpecCommand context m a -> a # foldl1 :: (a -> a -> a) -> SpecCommand context m a -> a # toList :: SpecCommand context m a -> [a] # null :: SpecCommand context m a -> Bool # length :: SpecCommand context m a -> Int # elem :: Eq a => a -> SpecCommand context m a -> Bool # maximum :: Ord a => SpecCommand context m a -> a # minimum :: Ord a => SpecCommand context m a -> a # sum :: Num a => SpecCommand context m a -> a # product :: Num a => SpecCommand context m a -> a # | |
Traversable (SpecCommand context m) Source # | |
Defined in Test.Sandwich.Types.Spec Methods traverse :: Applicative f => (a -> f b) -> SpecCommand context m a -> f (SpecCommand context m b) # sequenceA :: Applicative f => SpecCommand context m (f a) -> f (SpecCommand context m a) # mapM :: Monad m0 => (a -> m0 b) -> SpecCommand context m a -> m0 (SpecCommand context m b) # sequence :: Monad m0 => SpecCommand context m (m0 a) -> m0 (SpecCommand context m a) # | |
Show1 (SpecCommand context m) Source # | |
Defined in Test.Sandwich.Types.Spec Methods liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> SpecCommand context m a -> ShowS # liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [SpecCommand context m a] -> ShowS # |
class HasBaseContext a Source #
Has-* class for asserting a BaseContext
is available.
Minimal complete definition
getBaseContext, modifyBaseContext
Instances
HasBaseContext BaseContext Source # | |
Defined in Test.Sandwich.Types.RunTree Methods getBaseContext :: BaseContext -> BaseContext modifyBaseContext :: BaseContext -> (BaseContext -> BaseContext) -> BaseContext | |
HasBaseContext context => HasBaseContext (intro :> context) Source # | |
Defined in Test.Sandwich.Types.RunTree Methods getBaseContext :: (intro :> context) -> BaseContext modifyBaseContext :: (intro :> context) -> (BaseContext -> BaseContext) -> intro :> context |
class HasLabel context (l :: Symbol) a Source #
Minimal complete definition
getLabelValue
Instances
HasLabel context l a => HasLabel (intro :> context) l a Source # | |
Defined in Test.Sandwich.Types.Spec Methods getLabelValue :: Label l a -> (intro :> context) -> a | |
HasLabel (LabelValue l a :> context) l a Source # | |
Defined in Test.Sandwich.Types.Spec Methods getLabelValue :: Label l a -> (LabelValue l a :> context) -> a | |
HasLabel (LabelValue l a) l a Source # | |
Defined in Test.Sandwich.Types.Spec Methods getLabelValue :: Label l a -> LabelValue l a -> a |
data LabelValue (l :: Symbol) a Source #
Constructors
LabelValue a |
Instances
HasLabel (LabelValue l a :> context) l a Source # | |
Defined in Test.Sandwich.Types.Spec Methods getLabelValue :: Label l a -> (LabelValue l a :> context) -> a | |
HasLabel (LabelValue l a) l a Source # | |
Defined in Test.Sandwich.Types.Spec Methods getLabelValue :: Label l a -> LabelValue l a -> a |
data (a :: *) :> (b :: *) infixr 9 Source #
Constructors
a :> b infixr 9 |
Instances
(Show a, Show b) => Show (a :> b) Source # | |
HasBaseContext context => HasBaseContext (intro :> context) Source # | |
Defined in Test.Sandwich.Types.RunTree Methods getBaseContext :: (intro :> context) -> BaseContext modifyBaseContext :: (intro :> context) -> (BaseContext -> BaseContext) -> intro :> context | |
HasLabel context l a => HasLabel (intro :> context) l a Source # | |
Defined in Test.Sandwich.Types.Spec Methods getLabelValue :: Label l a -> (intro :> context) -> a | |
HasLabel (LabelValue l a :> context) l a Source # | |
Defined in Test.Sandwich.Types.Spec Methods getLabelValue :: Label l a -> (LabelValue l a :> context) -> a |
newtype ExampleT context m a Source #
Constructors
ExampleT | |
Fields
|
Instances
data RunNodeWithStatus context s l t where Source #
Constructors
type RunNodeFixed context = RunNodeWithStatus context Status (Seq LogEntry) Bool Source #
type RunNode context = RunNodeWithStatus context (Var Status) (Var (Seq LogEntry)) (Var Bool) Source #
data RunNodeCommonWithStatus s l t Source #
Constructors
RunNodeCommonWithStatus | |
Fields
|
Instances
(Eq t, Eq s, Eq l) => Eq (RunNodeCommonWithStatus s l t) Source # | |
Defined in Test.Sandwich.Types.RunTree Methods (==) :: RunNodeCommonWithStatus s l t -> RunNodeCommonWithStatus s l t -> Bool # (/=) :: RunNodeCommonWithStatus s l t -> RunNodeCommonWithStatus s l t -> Bool # | |
(Show t, Show s, Show l) => Show (RunNodeCommonWithStatus s l t) Source # | |
Defined in Test.Sandwich.Types.RunTree Methods showsPrec :: Int -> RunNodeCommonWithStatus s l t -> ShowS # show :: RunNodeCommonWithStatus s l t -> String # showList :: [RunNodeCommonWithStatus s l t] -> ShowS # |
extractValues :: (forall context. RunNodeWithStatus context s l t -> a) -> RunNodeWithStatus context s l t -> [a] Source #
extractValuesControlRecurse :: (forall context. RunNodeWithStatus context s l t -> (Bool, a)) -> RunNodeWithStatus context s l t -> [a] Source #
getCommons :: RunNodeWithStatus context s l t -> [RunNodeCommonWithStatus s l t] Source #
cancelNode :: RunNode context -> IO () Source #
Constructors
NotStarted | |
Running | |
Fields | |
Done | |
Fields |
Instances
fixRunTree :: RunNode context -> STM (RunNodeFixed context) Source #
waitForTree :: RunNode context -> IO Result Source #
Wait for a tree, catching any synchronous exceptions and returning them as a list
newtype SomeAsyncExceptionWithEq Source #
Constructors
SomeAsyncExceptionWithEq SomeAsyncException |
Instances
Eq SomeAsyncExceptionWithEq Source # | |
Defined in Test.Sandwich.Types.Spec Methods (==) :: SomeAsyncExceptionWithEq -> SomeAsyncExceptionWithEq -> Bool # (/=) :: SomeAsyncExceptionWithEq -> SomeAsyncExceptionWithEq -> Bool # | |
Show SomeAsyncExceptionWithEq Source # | |
Defined in Test.Sandwich.Types.Spec Methods showsPrec :: Int -> SomeAsyncExceptionWithEq -> ShowS # show :: SomeAsyncExceptionWithEq -> String # showList :: [SomeAsyncExceptionWithEq] -> ShowS # |
logEntryStr :: LogEntry -> LogStr Source #
countWhere :: (forall context. RunNodeWithStatus context s l t -> Bool) -> [RunNodeWithStatus context s l t] -> Int Source #
isItBlock :: RunNodeWithStatus context s l t -> Bool Source #
isRunningItBlock :: RunNodeWithStatus context Status l t -> Bool Source #
isSuccessItBlock :: RunNodeWithStatus context Status l t -> Bool Source #
isPendingItBlock :: RunNodeWithStatus context Status l t -> Bool Source #
isFailedItBlock :: RunNodeWithStatus context Status l t -> Bool Source #
isFailedBlock :: RunNodeWithStatus context Status l t -> Bool Source #
isDoneItBlock :: RunNodeWithStatus context Status l t -> Bool Source #
isNotStartedItBlock :: RunNodeWithStatus context Status l t -> Bool Source #
startSandwichTree :: Options -> CoreSpec -> IO [RunNode BaseContext] Source #
startSandwichTree' :: BaseContext -> Options -> CoreSpec -> IO [RunNode BaseContext] Source #
runSandwichTree :: Options -> CoreSpec -> IO [RunNode BaseContext] Source #
runWithRepeat :: Int -> Int -> IO (ExitReason, Int) -> IO () Source #
For 0 repeats, repeat until a failure
gatherNodeOptions :: Free (SpecCommand context m) r -> [NodeOptions] Source #
Gather all node options from a spec
gatherMainFunctions :: Free (SpecCommand context m) r -> [NodeModuleInfo] Source #
takenMainOptions :: [Text] Source #
TODO: get these automatically from mainCommandLineOptions
gatherShorthands :: [NodeModuleInfo] -> [(NodeModuleInfo, Text)] Source #