refactor email step definitions

This commit is contained in:
mahula 2023-03-02 13:26:58 +01:00
parent d66356c040
commit 10c7e8e2de

View File

@ -2,8 +2,7 @@ import { defineConfig } from 'cypress'
import { addCucumberPreprocessorPlugin } from '@badeball/cypress-cucumber-preprocessor'
import browserify from '@badeball/cypress-cucumber-preprocessor/browserify'
let activationLink:string
let resetPasswordLink: string
let emailLink: string
async function setupNodeEvents(
on: Cypress.PluginEvents,
@ -19,17 +18,11 @@ async function setupNodeEvents(
)
on('task', {
setResetPasswordLink: (val) => {
return (resetPasswordLink = val)
setEmailLink: (link: string) => {
return (emailLink = link)
},
getResetPasswordLink: () => {
return resetPasswordLink
},
setActivationLink: (val) => {
return (activationLink = val)
},
getActivationLink: () => {
return activationLink
getEmailLink: () => {
return emailLink
},
})