yesod-test-1.4.2.1: integration testing for WAI/Yesod Applications

Safe HaskellNone
LanguageHaskell98

Yesod.Test.CssQuery

Description

Parsing CSS selectors into queries.

Synopsis

Documentation

data Selector Source

Constructors

ById Text 
ByClass Text 
ByTagName Text 
ByAttrExists Text 
ByAttrEquals Text Text 
ByAttrContains Text Text 
ByAttrStarts Text Text 
ByAttrEnds Text Text 

Instances

parseQuery :: Text -> Either String [[SelectorGroup]] Source

Parses a query into an intermediate format which is easy to feed to HXT

  • The top-level lists represent the top level comma separated queries.
  • SelectorGroup is a group of qualifiers which are separated with spaces or > like these three: table.main.odd tr.even > td.big
  • A SelectorGroup as a list of Selector items, following the above example the selectors in the group are: table, .main and .odd