diff --git a/sandwich-webdriver/src/Test/Sandwich/WebDriver.hs b/sandwich-webdriver/src/Test/Sandwich/WebDriver.hs index f38cec98..22202d78 100644 --- a/sandwich-webdriver/src/Test/Sandwich/WebDriver.hs +++ b/sandwich-webdriver/src/Test/Sandwich/WebDriver.hs @@ -14,11 +14,14 @@ module Test.Sandwich.WebDriver ( , introduceWebDriverViaNix , introduceWebDriverViaNix' - -- * Specifying how to obtain dependencies + -- * Non-Nix dependency fetching + -- | When you aren't using Nix, these types specify how to obtain the necessary dependencies. , defaultWebDriverDependencies , WebDriverDependencies(..) -- * Running an example in a given session + -- | Once you have a 'WebDriver' in context, you can run one or more sessions. + -- Each session will open an independent browser instance. , withSession , withSession1 , withSession2 @@ -49,6 +52,7 @@ module Test.Sandwich.WebDriver ( , WebDriverSession , HasWebDriverSessionContext -- * Shorthands + -- | These are used to make type signatures shorter. , BaseMonad , ContextWithBaseDeps , ContextWithWebdriverDeps diff --git a/sandwich-webdriver/src/Test/Sandwich/WebDriver/Internal/Binaries/Xvfb.hs b/sandwich-webdriver/src/Test/Sandwich/WebDriver/Internal/Binaries/Xvfb.hs index ed7251ee..b269a102 100644 --- a/sandwich-webdriver/src/Test/Sandwich/WebDriver/Internal/Binaries/Xvfb.hs +++ b/sandwich-webdriver/src/Test/Sandwich/WebDriver/Internal/Binaries/Xvfb.hs @@ -26,8 +26,8 @@ obtainXvfb :: ( MonadReader context m, HasBaseContext context , MonadUnliftIO m, MonadLoggerIO m ) => XvfbToUse -> m (Either T.Text FilePath) -obtainXvfb UseXvfbFromPath = findExecutable "xvfb" >>= \case - Nothing -> return $ Left [i|Couldn't find "xvfb" on the PATH.|] +obtainXvfb UseXvfbFromPath = findExecutable "Xvfb" >>= \case + Nothing -> return $ Left [i|Couldn't find "Xvfb" on the PATH.|] Just p -> return $ Right p obtainXvfb (UseXvfbAt path) = doesFileExist path >>= \case False -> return $ Left [i|Path '#{path}' didn't exist|] diff --git a/sandwich-webdriver/src/Test/Sandwich/WebDriver/Internal/Binaries/Xvfb/Types.hs b/sandwich-webdriver/src/Test/Sandwich/WebDriver/Internal/Binaries/Xvfb/Types.hs index 81b543eb..e9ebdf04 100644 --- a/sandwich-webdriver/src/Test/Sandwich/WebDriver/Internal/Binaries/Xvfb/Types.hs +++ b/sandwich-webdriver/src/Test/Sandwich/WebDriver/Internal/Binaries/Xvfb/Types.hs @@ -12,13 +12,13 @@ data XvfbDependenciesSpec = XvfbDependenciesSpec { , xvfbDependenciesSpecFluxbox :: Maybe FluxboxToUse } --- | How to obtain the @xvfb-run@ binary. +-- | How to obtain the @Xvfb@ binary. data XvfbToUse = - -- | Search the PATH for the @xvfb-run@ binary. + -- | Search the PATH for the @Xvfb@ binary. UseXvfbFromPath - -- | Use the @xvfb-run@ at the given path. + -- | Use the @Xvfb@ at the given path. | UseXvfbAt FilePath - -- | Get @xvfb-run@ from Nixpkgs. + -- | Get @Xvfb@ from Nixpkgs. | UseXvfbFromNixpkgs NixContext deriving Show diff --git a/sandwich-webdriver/src/Test/Sandwich/WebDriver/Internal/Dependencies.hs b/sandwich-webdriver/src/Test/Sandwich/WebDriver/Internal/Dependencies.hs index c1207650..627f4920 100644 --- a/sandwich-webdriver/src/Test/Sandwich/WebDriver/Internal/Dependencies.hs +++ b/sandwich-webdriver/src/Test/Sandwich/WebDriver/Internal/Dependencies.hs @@ -71,7 +71,7 @@ data BrowserDependenciesSpec = BrowserDependenciesSpecChrome { -- * Download Selenium to @\/tmp\/tools@, reusing the one there if found. -- * Use @firefox@ from the PATH as the browser. -- * Download a compatible @geckodriver@ to @\/tmp\/tools@, reusing the one there if found. --- * If applicable, it will also get @xvfb-run@, @fluxbox@, and/or @ffmpeg@ from the PATH. +-- * If applicable, it will also get @Xvfb@, @fluxbox@, and/or @ffmpeg@ from the PATH. -- -- But, it's easy to customize this behavior. You can define your own 'WebDriverDependencies' and customize -- how each of these dependencies are found. diff --git a/sandwich-webdriver/src/Test/Sandwich/WebDriver/Internal/Types.hs b/sandwich-webdriver/src/Test/Sandwich/WebDriver/Internal/Types.hs index 1e0f6294..cc0bf3b3 100644 --- a/sandwich-webdriver/src/Test/Sandwich/WebDriver/Internal/Types.hs +++ b/sandwich-webdriver/src/Test/Sandwich/WebDriver/Internal/Types.hs @@ -47,7 +47,7 @@ data RunMode = -- ^ Run with a headless browser. Supports screenshots but videos will be black. | RunInXvfb XvfbConfig -- ^ Run inside so that tests run in their own X11 display. - -- xvfb-run script must be installed and on the PATH. + -- The @Xvfb@ binary must be installed and on the PATH. data WdOptions = WdOptions { capabilities :: W.Capabilities