Skip to main content

abstractList <Item_Type>

Serenity/JS Screenplay Pattern-style wrapper around Array and array-like structures - see PageElements.

Hierarchy

Index

Constructors

constructor

  • new List<Item_Type>(collection: Answerable<Item_Type[]>): List<Item_Type>
  • Type parameters

    • Item_Type

    Parameters

    Returns List<Item_Type>

Methods

staticof

publicas

  • as<O>(mapping: (answer: Item_Type[]) => O | Promise<O>): QuestionAdapter<O>
  • Maps this question to one of a different type.

    Question.about('number returned as string', actor => '42')   // returns: QuestionAdapter<string>
    .as(Number) // returns: QuestionAdapter<number>

    Type parameters

    • O

    Parameters

    • mapping: (answer: Item_Type[]) => O | Promise<O>

    Returns QuestionAdapter<O>

forEach

  • forEach(callback: (current: CurrentItem<Item_Type>, index: number, items: Item_Type[]) => void | Promise<void>): Task
  • Parameters

    • callback: (current: CurrentItem<Item_Type>, index: number, items: Item_Type[]) => void | Promise<void>

    Returns Task

abstracteachMappedTo

  • eachMappedTo<Mapped_Item_Type>(question: MetaQuestion<Item_Type, Question<Mapped_Item_Type | Promise<Mapped_Item_Type>>>): List<Mapped_Item_Type>
  • Type parameters

    • Mapped_Item_Type

    Parameters

    Returns List<Mapped_Item_Type>

abstractwhere

  • Type parameters

    • Answer_Type

    Parameters

    Returns List<Item_Type>

abstractcount

abstractfirst

abstractlast

abstractnth

answeredBy

describedAs

  • describedAs(subject: string): List<Item_Type>
  • Changes the description of this question’s subject.


    Parameters

    • subject: string

    Returns List<Item_Type>

toString

  • toString(): string
  • Returns the description of the subject of this Question.


    Returns string