FormExpectations

io.github.frikit.twirlspec.expect.FormExpectations

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

Attributes

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

Members list

Value members

Concrete methods

def button(id: String, key: String): Expectation

The button with this id says this.

The button with this id says this.

Attributes

Source
FormExpectations.scala
def checkboxGroup(name: String = ...): ChoiceGroupExpectation

The checkboxes sharing this name, value by default.

The checkboxes sharing this name, value by default.

Attributes

Source
FormExpectations.scala
def dateInput(name: String = ...): DateInputExpectation

A GOV.UK date input, three fields under one legend, named value by default.

A GOV.UK date input, three fields under one legend, named value by default.

Attributes

Source
FormExpectations.scala
def describedAs(nameOrId: String, key: String, args: Any*): Expectation

What an assistive technology reads after the control's name.

What an assistive technology reads after the control's name.

Attributes

Source
FormExpectations.scala
def disabled(nameOrId: String): Expectation

The control is disabled, on itself or through an enclosing fieldset.

The control is disabled, on itself or through an enclosing fieldset.

Attributes

Source
FormExpectations.scala
def enabled(nameOrId: String): Expectation

This control is not disabled.

This control is not disabled.

Attributes

Source
FormExpectations.scala
def errorSummary(entries: (String, String)*): Expectation

The error summary lists exactly these field -> message key entries, in order, and every entry links to an element that exists on the page.

The error summary lists exactly these field -> message key entries, in order, and every entry links to an element that exists on the page.

Attributes

Source
FormExpectations.scala
def errorSummaryContaining(field: String, key: String, args: Any*): Expectation

The error summary mentions this field, whatever else it lists.

The error summary mentions this field, whatever else it lists.

Attributes

Source
FormExpectations.scala
def errorSummaryTitle(key: String = ...): Expectation

The heading above the error summary.

The heading above the error summary.

Attributes

Source
FormExpectations.scala
def fieldError(field: String, key: String, args: Any*): Expectation

The inline error message rendered against a specific field.

The inline error message rendered against a specific field.

Attributes

Source
FormExpectations.scala
def fileUpload(name: String): Expectation

A file input with this name or id is present.

A file input with this name or id is present.

Attributes

Source
FormExpectations.scala
def formGetsFrom(url: String): Expectation

The form is a GET to this action.

The form is a GET to this action.

Attributes

Source
FormExpectations.scala
def formPostsTo(url: String): Expectation

The form posts (or gets) to a specific URL.

The form posts (or gets) to a specific URL.

Attributes

Source
FormExpectations.scala
def formValues(expected: (String, String)*): Expectation

Each name submits this value, as a browser would submit the form. For a name submitted more than once, such as a group of checkboxes, the value has to be among the ones it submits.

Each name submits this value, as a browser would submit the form. For a name submitted more than once, such as a group of checkboxes, the value has to be among the ones it submits.

Attributes

Source
FormExpectations.scala
def hiddenInput(name: String, value: String): Expectation

A hidden input with this name carries this value.

A hidden input with this name carries this value.

Attributes

Source
FormExpectations.scala
def invalid(nameOrId: String): Expectation

The control is marked invalid for an assistive technology.

The control is marked invalid for an assistive technology.

Attributes

Source
FormExpectations.scala
def radioGroup(name: String = ...): ChoiceGroupExpectation

The radio buttons sharing this name, value by default as Play's form helpers name them.

The radio buttons sharing this name, value by default as Play's form helpers name them.

Attributes

Source
FormExpectations.scala
def required(nameOrId: String): Expectation

This control is marked required.

This control is marked required.

Attributes

Source
FormExpectations.scala
def submitButton(key: String = ...): Expectation

The submit control says this, site.continue by default.

The submit control says this, site.continue by default.

Attributes

Source
FormExpectations.scala
def submitButtonText(literal: String): Expectation

The submit control says exactly these words.

The submit control says exactly these words.

Attributes

Source
FormExpectations.scala
def textArea(name: String): TextInputExpectation

A textarea found by name or id, with the same builders as textInput.

A textarea found by name or id, with the same builders as textInput.

Attributes

Source
FormExpectations.scala
def textInput(name: String): TextInputExpectation

A text input found by name or id; chain the builders for its label, hint, value, autocomplete and type.

A text input found by name or id; chain the builders for its label, hint, value, autocomplete and type.

Attributes

Source
FormExpectations.scala

Concrete fields

GOV.UK requires the browser title of a page in an error state to be prefixed, so screen reader users hear that something went wrong before the page name.

GOV.UK requires the browser title of a page in an error state to be prefixed, so screen reader users hear that something went wrong before the page name.

Attributes

Source
FormExpectations.scala

A submit control is present, whatever it says.

A submit control is present, whatever it says.

Attributes

Source
FormExpectations.scala

No error summary and no inline error messages anywhere on the page.

No error summary and no inline error messages anywhere on the page.

Attributes

Source
FormExpectations.scala