TextInputExpectation

io.github.frikit.twirlspec.expect.TextInputExpectation
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.

Attributes

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

Members list

Value members

Concrete methods

def check(page: Page): Seq[Violation]

Empty means satisfied.

Empty means satisfied.

Attributes

Source
FormExpectations.scala
def description: String

Human description, used when listing what a page was checked against.

Human description, used when listing what a page was checked against.

Attributes

Source
FormExpectations.scala
def hinted(key: String, args: Any*): TextInputExpectation

The hint's text, from a message key, and that the hint is announced with the field.

The hint's text, from a message key, and that the hint is announced with the field.

Attributes

Source
FormExpectations.scala
def hintedText(literal: String): TextInputExpectation

The hint's exact words, and that the hint is announced with the field.

The hint's exact words, and that the hint is announced with the field.

Attributes

Source
FormExpectations.scala
def labelled(key: String, args: Any*): TextInputExpectation

The label's text, from a message key.

The label's text, from a message key.

Attributes

Source
FormExpectations.scala

For the rare control that is legitimately labelled by a legend instead.

For the rare control that is legitimately labelled by a legend instead.

Attributes

Source
FormExpectations.scala
def labelledText(literal: String): TextInputExpectation

The label's exact words.

The label's exact words.

Attributes

Source
FormExpectations.scala
def ofType(t: String): TextInputExpectation

The input's type attribute.

The input's type attribute.

Attributes

Source
FormExpectations.scala

The autocomplete token the control declares.

The autocomplete token the control declares.

Attributes

Source
FormExpectations.scala

The value the control was rendered with.

The value the control was rendered with.

Attributes

Source
FormExpectations.scala

Inherited methods

def and(other: Expectation): Expectation

Both this expectation and another, as one.

Both this expectation and another, as one.

Attributes

Inherited from:
Expectation
Source
Expectation.scala

Downgrade every violation this expectation produces to a warning.

Downgrade every violation this expectation produces to a warning.

Attributes

Inherited from:
Expectation
Source
Expectation.scala
def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product
def when(p: Page => Boolean): Expectation

Only apply this expectation when the page satisfies a predicate.

Only apply this expectation when the page satisfies a predicate.

Attributes

Inherited from:
Expectation
Source
Expectation.scala