mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
25 lines
849 B
TypeScript
25 lines
849 B
TypeScript
import { And, 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)
|
|
}
|
|
)
|
|
|
|
And('the user agrees to the privacy policy', () => {
|
|
registrationPage.checkPrivacyCheckbox()
|
|
})
|
|
|
|
And('the user submits the registration form', () => {
|
|
registrationPage.submitRegistrationPage()
|
|
cy.get(registrationPage.RegistrationThanxHeadline).should('be.visible')
|
|
cy.get(registrationPage.RegistrationThanxText).should('be.visible')
|
|
})
|