mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
refactor login query in e2e test
This commit is contained in:
parent
3d9909b98e
commit
b992b1fb53
@ -2,7 +2,7 @@ import { defineConfig } from 'cypress'
|
|||||||
import { addCucumberPreprocessorPlugin } from '@badeball/cypress-cucumber-preprocessor'
|
import { addCucumberPreprocessorPlugin } from '@badeball/cypress-cucumber-preprocessor'
|
||||||
import browserify from '@badeball/cypress-cucumber-preprocessor/browserify'
|
import browserify from '@badeball/cypress-cucumber-preprocessor/browserify'
|
||||||
|
|
||||||
let emailLink: string
|
let resetPasswordLink: string
|
||||||
|
|
||||||
async function setupNodeEvents(
|
async function setupNodeEvents(
|
||||||
on: Cypress.PluginEvents,
|
on: Cypress.PluginEvents,
|
||||||
@ -18,11 +18,11 @@ async function setupNodeEvents(
|
|||||||
)
|
)
|
||||||
|
|
||||||
on('task', {
|
on('task', {
|
||||||
setEmailLink: (link: string) => {
|
setResetPasswordLink: (val) => {
|
||||||
return (emailLink = link)
|
return (resetPasswordLink = val)
|
||||||
},
|
},
|
||||||
getEmailLink: () => {
|
getResetPasswordLink: () => {
|
||||||
return emailLink
|
return resetPasswordLink
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -56,7 +56,7 @@ export default defineConfig({
|
|||||||
env: {
|
env: {
|
||||||
backendURL: 'http://localhost:4000',
|
backendURL: 'http://localhost:4000',
|
||||||
mailserverURL: 'http://localhost:1080',
|
mailserverURL: 'http://localhost:1080',
|
||||||
loginQuery: `query ($email: String!, $password: String!, $publisherId: Int) {
|
loginQuery: `mutation ($email: String!, $password: String!, $publisherId: Int) {
|
||||||
login(email: $email, password: $password, publisherId: $publisherId) {
|
login(email: $email, password: $password, publisherId: $publisherId) {
|
||||||
email
|
email
|
||||||
firstName
|
firstName
|
||||||
@ -69,7 +69,8 @@ export default defineConfig({
|
|||||||
hasElopage
|
hasElopage
|
||||||
publisherId
|
publisherId
|
||||||
isAdmin
|
isAdmin
|
||||||
creation
|
hideAmountGDD
|
||||||
|
hideAmountGDT
|
||||||
__typename
|
__typename
|
||||||
}
|
}
|
||||||
}`,
|
}`,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user