io.github.frikit.twirlspec.page
Members list
Type members
Classlikes
The name an assistive technology announces for an element.
The name an assistive technology announces for an element.
A working subset of the accessible name computation: the parts that a server-rendered page can actually be judged on. It does not resolve aria-labelledby chains beyond one hop, and knows nothing that depends on CSS or JavaScript.
This is the one answer to "what is this element called". Every rule that asks the question asks it here, so the same markup cannot pass one check and fail another.
Attributes
- Source
- AccessibleName.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
AccessibleName.type
What makes something on a page worth asserting, and what to call it.
What makes something on a page worth asserting, and what to call it.
Identity is the id, the link, or the tracking attribute rather than a position in the document, so a view asserted in one state still counts as asserted when the same view is rendered in another.
Attributes
- Source
- Anchors.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Anchors.type
Remembers which elements a spec's assertions actually looked at.
Remembers which elements a spec's assertions actually looked at.
A spec renders the same page many times over — once per test — so the record is kept per coverage group rather than per page instance. A page rendered through the DSL belongs to its spec and, within it, to the renders that produce exactly its markup, unless the spec names a group with coveredAs. The key is spec#group, so a spec's records can be dropped together. A page built directly belongs to no spec and keeps its record on itself, so it never appears here.
Attributes
- Source
- CoverageRegistry.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
CoverageRegistry.type
A readable skeleton of a rendered page.
A readable skeleton of a rendered page.
Attributes
- Source
- Outline.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Outline.type
Ways to build a page from rendered HTML.
Ways to build a page from rendered HTML.
Attributes
- Companion
- class
- Source
- Page.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Page.type
A rendered page, ready to be asked questions.
A rendered page, ready to be asked questions.
The accessors know GOV.UK and HMRC markup, so a page from another design system is still readable through css, byId, byRole and doc.
Value parameters
- document
-
the parsed markup, repaired where the parser had to
- lang
-
the language the page was rendered in
- messages
-
the messages for that language, used to resolve message keys
- parseErrors
-
what the parser had to repair, up to fifty entries
- source
-
the markup as rendered, before any repair
Attributes
- Companion
- object
- Source
- Page.scala
- Supertypes
-
class Objecttrait Matchableclass Any
Finding elements the way an assistive technology does: by role and accessible name.
Finding elements the way an assistive technology does: by role and accessible name.
Attributes
- Source
- Roles.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Roles.type
A named set of elements pulled out of a page.
A named set of elements pulled out of a page.
Value parameters
- elements
-
the matches, in document order
- name
-
what the selection is called in failure messages
- selector
-
the CSS selector that produced it, also for failure messages
Attributes
- Companion
- object
- Source
- Selection.scala
- Supertypes
-
class Objecttrait Matchableclass Any
Ways to build a selection.
Ways to build a selection.
Attributes
- Companion
- class
- Source
- Selection.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Selection.type
Whitespace and punctuation normalisation.
Whitespace and punctuation normalisation.
Attributes
- Source
- Text.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Text.type