Skip to content

Instantly share code, notes, and snippets.

@jan-molak
Created March 19, 2021 10:37
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/cd6d13244a5041fe74a7980a74ab68fd to your computer and use it in GitHub Desktop.
Save jan-molak/cd6d13244a5041fe74a7980a74ab68fd to your computer and use it in GitHub Desktop.
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