Created
March 19, 2021 10:37
-
-
Save jan-molak/cd6d13244a5041fe74a7980a74ab68fd 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 { Target, Text } from '@serenity-js/protractor'; | |
import { equals } from '@serenity-js/assertions'; | |
import { by } from 'protractor'; | |
class Quiz { | |
static questions = () => | |
Target.all('questions').located(by.css('.quiz-question')) | |
static question = (title: string) => | |
Quiz.questions() | |
.where(Text.of(QuizQuestion.title()), equals(title)) | |
.first() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment