Anchors

io.github.frikit.twirlspec.page.Anchors
object Anchors

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
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Anchors.type

Members list

Value members

Concrete methods

def linkName(e: Element): String

The coverage name of a link: its text, or its destination when it has no text.

The coverage name of a link: its text, or its destination when it has no text.

Attributes

Source
Anchors.scala
def linkTo(e: Element): String

A link's name with where it goes: two links reading the same and going to different places are two things to assert.

A link's name with where it goes: two links reading the same and going to different places are two things to assert.

Attributes

Source
Anchors.scala
def namesOf(e: Element, tracked: Set[String] = ...): List[String]

The names this element is known by for coverage: its id, its link, and any tracked attribute it carries.

The names this element is known by for coverage: its id, its link, and any tracked attribute it carries.

Attributes

Source
Anchors.scala
def touchedBy(e: Element): List[String]

What an assertion touching this element counts for: its id, its link with where it goes, and every attribute it carries, because which of them a spec tracks is only known when coverage is measured.

What an assertion touching this element counts for: its id, its link with where it goes, and every attribute it carries, because which of them a spec tracks is only known when coverage is measured.

Attributes

Source
Anchors.scala

Concrete fields

val defaultTrackedAttributes: Set[String]

Attributes that make an element worth asserting on their own: analytics markers, by default.

Attributes that make an element worth asserting on their own: analytics markers, by default.

Attributes

Source
Anchors.scala