Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
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 :: Type) :> (b :: Type) = 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
- 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]
- unwrapTreeFilter :: Maybe TreeFilter -> [String]
- 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
Foldable (SpecCommand context m) Source # | |
Defined in Test.Sandwich.Types.Spec 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 # | |
Show1 (SpecCommand context m) Source # | |
Defined in Test.Sandwich.Types.Spec liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> SpecCommand context m a -> ShowS # liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [SpecCommand context m a] -> ShowS # | |
Traversable (SpecCommand context m) Source # | |
Defined in Test.Sandwich.Types.Spec 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) # | |
Functor (SpecCommand context m) Source # | |
Defined in Test.Sandwich.Types.Spec fmap :: (a -> b) -> SpecCommand context m a -> SpecCommand context m b # (<$) :: a -> SpecCommand context m b -> SpecCommand context m a # | |
Show t => Show (SpecCommand context m t) Source # | |
Defined in Test.Sandwich.Types.Spec showsPrec :: Int -> SpecCommand context m t -> ShowS # show :: SpecCommand context m t -> String # showList :: [SpecCommand context m t] -> ShowS # |
class HasBaseContext a Source #
Has-* class for asserting a BaseContext
is available.
getBaseContext, modifyBaseContext
Instances
HasBaseContext BaseContext Source # | |
Defined in Test.Sandwich.Types.RunTree getBaseContext :: BaseContext -> BaseContext modifyBaseContext :: BaseContext -> (BaseContext -> BaseContext) -> BaseContext | |
HasBaseContext context => HasBaseContext (intro :> context) Source # | |
Defined in Test.Sandwich.Types.RunTree getBaseContext :: (intro :> context) -> BaseContext modifyBaseContext :: (intro :> context) -> (BaseContext -> BaseContext) -> intro :> context |
class HasLabel context (l :: Symbol) a Source #
getLabelValue
Instances
HasLabel (LabelValue l a :> context) l a Source # | |
Defined in Test.Sandwich.Types.Spec getLabelValue :: Label l a -> (LabelValue l a :> context) -> a | |
HasLabel context l a => HasLabel (intro :> context) l a Source # | |
Defined in Test.Sandwich.Types.Spec getLabelValue :: Label l a -> (intro :> context) -> a | |
HasLabel (LabelValue l a) l a Source # | |
Defined in Test.Sandwich.Types.Spec getLabelValue :: Label l a -> LabelValue l a -> a |
data LabelValue (l :: Symbol) a Source #
Instances
HasLabel (LabelValue l a :> context) l a Source # | |
Defined in Test.Sandwich.Types.Spec getLabelValue :: Label l a -> (LabelValue l a :> context) -> a | |
HasLabel (LabelValue l a) l a Source # | |
Defined in Test.Sandwich.Types.Spec getLabelValue :: Label l a -> LabelValue l a -> a |
data (a :: Type) :> (b :: Type) infixr 9 Source #
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 getBaseContext :: (intro :> context) -> BaseContext modifyBaseContext :: (intro :> context) -> (BaseContext -> BaseContext) -> intro :> context | |
HasLabel (LabelValue l a :> context) l a Source # | |
Defined in Test.Sandwich.Types.Spec getLabelValue :: Label l a -> (LabelValue l a :> context) -> a | |
HasLabel context l a => HasLabel (intro :> context) l a Source # | |
Defined in Test.Sandwich.Types.Spec getLabelValue :: Label l a -> (intro :> context) -> a |
newtype ExampleT context m a Source #
ExampleT | |
|
Instances
data RunNodeWithStatus context s l t where Source #
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 #
RunNodeCommonWithStatus | |
|
Instances
(Show t, Show s, Show l) => Show (RunNodeCommonWithStatus s l t) Source # | |
Defined in Test.Sandwich.Types.RunTree showsPrec :: Int -> RunNodeCommonWithStatus s l t -> ShowS # show :: RunNodeCommonWithStatus s l t -> String # showList :: [RunNodeCommonWithStatus s l t] -> ShowS # | |
(Eq t, Eq s, Eq l) => Eq (RunNodeCommonWithStatus s l t) Source # | |
Defined in Test.Sandwich.Types.RunTree (==) :: RunNodeCommonWithStatus s l t -> RunNodeCommonWithStatus s l t -> Bool # (/=) :: RunNodeCommonWithStatus s l t -> RunNodeCommonWithStatus s l t -> Bool # |
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 #
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 #
Instances
Show SomeAsyncExceptionWithEq Source # | |
Defined in Test.Sandwich.Types.Spec showsPrec :: Int -> SomeAsyncExceptionWithEq -> ShowS # show :: SomeAsyncExceptionWithEq -> String # showList :: [SomeAsyncExceptionWithEq] -> ShowS # | |
Eq SomeAsyncExceptionWithEq Source # | |
Defined in Test.Sandwich.Types.Spec |
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 #
unwrapTreeFilter :: Maybe TreeFilter -> [String] 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 #