Created
March 19, 2021 10:39
-
-
Save jan-molak/e717cf46cd4cede64c162d32fdd5269d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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