ChoiceGroupExpectation

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

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 containingOption(value: String, key: String): ChoiceGroupExpectation

This option, with this label key, among possibly others.

This option, with this label key, among possibly others.

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*): ChoiceGroupExpectation

The group's hint, from a message key, and that the fieldset announces it.

The group's hint, from a message key, and that the fieldset announces it.

Attributes

Source
FormExpectations.scala
def legendIs(key: String, args: Any*): ChoiceGroupExpectation

The fieldset's legend, from a message key.

The fieldset's legend, from a message key.

Attributes

Source
FormExpectations.scala

No option is checked.

No option is checked.

Attributes

Source
FormExpectations.scala
def selectedIs(values: String*): ChoiceGroupExpectation

Exactly these values are checked.

Exactly these values are checked.

Attributes

Source
FormExpectations.scala

Exactly these option values, whatever their labels say.

Exactly these option values, whatever their labels say.

Attributes

Source
FormExpectations.scala
def withOptions(opts: (String, String)*): ChoiceGroupExpectation

Exactly these options, as value -> label key pairs, every label checked.

Exactly these options, as value -> label key pairs, every label checked.

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