Skip to content

Instantly share code, notes, and snippets.

@jan-molak
Created March 19, 2021 10:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jan-molak/e717cf46cd4cede64c162d32fdd5269d to your computer and use it in GitHub Desktop.
Save jan-molak/e717cf46cd4cede64c162d32fdd5269d to your computer and use it in GitHub Desktop.
import { Task } from '@serenity-js/core';
import { Click } from '@serenity-js/protractor';
const AnswerQuizQuestion = (title: string, answer: string) =>
Task.where(`#actor answers ${ answer } to ${ title }`,
Click.on(
QuizQuestion.answers()
.of(Quiz.question(title))
.where(Text, equals(answer))
.first()
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment