gradido/e2e-tests/cypress/support/step_definitions/user_registration_steps.ts

25 lines
847 B
TypeScript

import { When } from '@badeball/cypress-cucumber-preprocessor'
import { RegistrationPage } from '../../e2e/models/RegistrationPage'
const registrationPage = new RegistrationPage()
When(
'the user fills name and email {string} {string} {string}',
(firstname: string, lastname: string, email: string) => {
const registrationPage = new RegistrationPage()
registrationPage.enterFirstname(firstname)
registrationPage.enterLastname(lastname)
registrationPage.enterEmail(email)
},
)
When('the user agrees to the privacy policy', () => {
registrationPage.checkPrivacyCheckbox()
})
When('the user submits the registration form', () => {
registrationPage.submitRegistrationForm()
cy.get(registrationPage.RegistrationThanxHeadline).should('be.visible')
cy.get(registrationPage.RegistrationThanxText).should('be.visible')
})