sydtest-webdriver-yesod-0.0.0.1: A webdriver+yesod companion library for sydtest
Safe HaskellSafe-Inferred
LanguageHaskell2010

Test.Syd.Webdriver.Yesod

Description

This is a helper module for Webdriver to let you use Yesod routes to define webdriver tests.

Synopsis

Defining webdriver tests with yesod

webdriverYesodSpec :: YesodDispatch app => (Manager -> SetupFunc app) -> WebdriverSpec app -> Spec Source #

Run webdriver tests given a SetupFunc for your app.

Implementing webdriver tests with yesod

openRoute :: RenderRoute app => Route app -> WebdriverTestM app () Source #

Open a given yesod Route

openRouteWithParams :: RenderRoute app => Route app -> [(Text, Text)] -> WebdriverTestM app () Source #

Open a given yesod Route with parameters

getCurrentRoute :: ParseRoute app => WebdriverTestM app (Route app) Source #

Get the current Route

currentRouteShouldBe :: (Show (Route app), ParseRoute app) => Route app -> WebdriverTestM app () Source #

Get the current Route and check that it equals the given route

Finding elements by I18N Messages

getLinkTextI :: RenderMessage app message => message -> WebdriverTestM app Text Source #

Get the link text for a given I18N message.

This will only work if the language hasn't been set.

findElemByLinkTextI :: RenderMessage app message => message -> WebdriverTestM app Element Source #

Find an Element, ByLinkText the text obtained by getLinkTextI

findElemByPartialLinkTextI :: RenderMessage app message => message -> WebdriverTestM app Element Source #

Find an Element, ByPartialLinkText the text obtained by getLinkTextI

findElemByButtonTextI :: RenderMessage app message => message -> WebdriverTestM app Element Source #

Find an Element, ByLinkText the text obtained by getLinkTextI