io.github.frikit.twirlspec.expect

Members list

Type members

Classlikes

final case class BackLinkExpectation(href: Option[String]) extends Expectation

Back link check, optionally pinned to a target URL.

Back link check, optionally pinned to a target URL.

Attributes

Source
FramingExpectations.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Expectation
class Object
trait Matchable
class Any
Show all
final case class CheckReport(page: Page, violations: Seq[Violation], subject: String)

The result of evaluating a set of expectations against a page.

The result of evaluating a set of expectations against a page.

Attributes

Source
Expectation.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class ChoiceGroupExpectation(name: String, kind: String, options: Option[List[(String, Expected)]] = ..., legend: Option[Expected] = ..., hint: Option[Expected] = ..., selected: Option[Set[String]] = ..., exhaustive: Boolean = ...) extends Expectation

A radio or checkbox group: its legend, its options and what is selected.

A radio or checkbox group: its legend, its options and what is selected.

Attributes

Source
FormExpectations.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Expectation
class Object
trait Matchable
class Any
Show all

Expectations about the words on the page and the components carrying them.

Expectations about the words on the page and the components carrying them.

Attributes

Source
ContentExpectations.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes

How the parts of a date input are found.

How the parts of a date input are found.

Attributes

Companion
class
Source
FormExpectations.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class DateInputExpectation(name: String, legend: Option[Expected] = ..., hint: Option[Expected] = ..., parts: List[String] = ...) extends Expectation

The GOV.UK date input: three fields under one legend.

The GOV.UK date input: three fields under one legend.

Attributes

Companion
object
Source
FormExpectations.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Expectation
class Object
trait Matchable
class Any
Show all
final case class DropdownExpectation(name: String, label: Option[Expected] = ..., optionValues: Option[List[String]] = ..., optionCount: Option[Int] = ...) extends Expectation

A `` and its options.

A `` and its options.

Attributes

Source
FormExpectations.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Expectation
class Object
trait Matchable
class Any
Show all
final case class ErrorSummaryExpectation(entries: List[(String, Expected)], exhaustive: Boolean = ...) extends Expectation

The error summary and the links inside it.

The error summary and the links inside it.

Attributes

Companion
object
Source
FormExpectations.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Expectation
class Object
trait Matchable
class Any
Show all

How an error summary's links are matched to what a spec expects of them.

How an error summary's links are matched to what a spec expects of them.

Attributes

Companion
class
Source
FormExpectations.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
trait Expectation

One question asked of a rendered page.

One question asked of a rendered page.

Attributes

Companion
object
Source
Expectation.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
Self type
object Expectation

Ways to build an expectation without naming a class.

Ways to build an expectation without naming a class.

Attributes

Companion
trait
Source
Expectation.scala
Supertypes
class Object
trait Matchable
class Any
Self type
sealed trait Expected

Something a check expects to find on the page, expressed either as a message key (the default, because that is what GOV.UK content always is) or as a literal string.

Something a check expects to find on the page, expressed either as a message key (the default, because that is what GOV.UK content always is) or as a literal string.

Attributes

Companion
object
Source
Expected.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Anything
class Key
class Literal
class Pattern
object Expected

The forms an expected value can take.

The forms an expected value can take.

Attributes

Companion
trait
Source
Expected.scala
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
Expected.type

Expectations about form controls and the error states they can be in.

Expectations about form controls and the error states they can be in.

Attributes

Source
FormExpectations.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Expectations about the frame of a GOV.UK page: what it is called, what it is headed, and the furniture the layout is responsible for.

Expectations about the frame of a GOV.UK page: what it is called, what it is headed, and the furniture the layout is responsible for.

Attributes

Source
FramingExpectations.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
final case class LinkExpectation(text: Expected, href: Option[String], id: Option[String]) extends Expectation

A link, by text and/or id, optionally pinned to a URL.

A link, by text and/or id, optionally pinned to a URL.

Attributes

Source
ContentExpectations.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Expectation
class Object
trait Matchable
class Any
Show all
final case class RoleExpectation(roleName: String, name: Option[Expected], count: Option[Int]) extends Expectation

An element located by ARIA role and accessible name.

An element located by ARIA role and accessible name.

Attributes

Source
ContentExpectations.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Expectation
class Object
trait Matchable
class Any
Show all
object Severity

The two severities a violation can have.

The two severities a violation can have.

Attributes

Companion
class
Source
Violation.scala
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
Severity.type
sealed abstract class Severity(val label: String, val order: Int)

Severity of a single failed check.

Severity of a single failed check.

Attributes

Companion
object
Source
Violation.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Error
object Warning
final case class SummaryRowExpectation(key: Expected, value: Option[String] = ..., changeHref: Option[String] = ..., actionTexts: Option[List[Expected]] = ...) extends Expectation

One row of a check-your-answers summary list.

One row of a check-your-answers summary list.

Attributes

Source
ContentExpectations.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Expectation
class Object
trait Matchable
class Any
Show all
final case class TextInputExpectation(name: String, tag: String = ..., label: Option[Expected] = ..., hint: Option[Expected] = ..., value: Option[String] = ..., autocomplete: Option[String] = ..., inputType: Option[String] = ..., labelRequired: Boolean = ...) extends Expectation

A text input (or textarea), its label, hint, value and autocomplete.

A text input (or textarea), its label, hint, value and autocomplete.

Attributes

Source
FormExpectations.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Expectation
class Object
trait Matchable
class Any
Show all
final case class Violation(rule: String, message: String, expected: Option[String] = ..., actual: Option[String] = ..., where: Option[String] = ..., severity: Severity = ..., hint: Option[String] = ...)

A single thing that was wrong with a rendered page.

A single thing that was wrong with a rendered page.

Attributes

Companion
object
Source
Violation.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Violation

Ways to build the common violations.

Ways to build the common violations.

Attributes

Companion
class
Source
Violation.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Violation.type