MetaList <Supported_Context_Type, Item_Type>
Hierarchy
- List<Item_Type>
- MetaList
Implements
- ChainableMetaQuestion<Supported_Context_Type, MetaList<Supported_Context_Type, Item_Type>>
Index
Methods
publicas
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
Parameters
callback: (current: CurrentItem<Item_Type>, index: number, items: Item_Type[]) => void | Promise<void>
Returns Task
answeredBy
Parameters
actor: AnswersQuestions & UsesAbilities
Returns Promise<Item_Type[]>
describedAs
Changes the description of this question’s subject.
Parameters
subject: string
Returns MetaList<Supported_Context_Type, Item_Type>
toString
Human-readable description of this MetaQuestion, typically involving the description of the subject.
For example, a description of a meta question obout “the text of an element” would be
text of ${ element.toString() }
Returns string
of
Answers the given
ChainableMetaQuestion
in the context of another Answerable and returns anotherChainableMetaQuestion
ready for further chaining.Learn more
Parameters
context: Answerable<Supported_Context_Type>
Returns MetaList<Supported_Context_Type, Item_Type>
eachMappedTo
Type parameters
- Mapped_Item_Type
Parameters
question: MetaQuestion<Item_Type, Question<Mapped_Item_Type | Promise<Mapped_Item_Type>>>
Returns MetaList<Supported_Context_Type, Mapped_Item_Type>
where
Type parameters
- Answer_Type
Parameters
question: MetaQuestion<Item_Type, Question<Answer_Type | Promise<Answer_Type>>>
expectation: Expectation<Answer_Type>
Returns MetaList<Supported_Context_Type, Item_Type>
count
Returns MetaQuestionAdapter<Supported_Context_Type, number>
first
Returns MetaQuestionAdapter<Supported_Context_Type, Item_Type>
last
Returns MetaQuestionAdapter<Supported_Context_Type, Item_Type>
nth
Parameters
index: number
Returns MetaQuestionAdapter<Supported_Context_Type, Item_Type>
Constructors
constructor
Type parameters
- Supported_Context_Type
- Item_Type
Parameters
collection: Object
Returns MetaList<Supported_Context_Type, Item_Type>
Serenity/JS Screenplay Pattern-style wrapper around a ChainableMetaQuestion representing a collection that can be resolved in
Supported_Context_Type
of another Question.For example, PageElements.located returns
MetaList<PageElement>
, which allows for the collection of page elements to be resolved in the context of dynamically-provided root element.