mirror of
https://github.com/IT4Change/gradido.git
synced 2026-02-06 09:56:05 +00:00
lint cypress support files
This commit is contained in:
parent
8db179c517
commit
fb6ec71b3d
@ -7,6 +7,7 @@ import './e2e'
|
||||
|
||||
declare global {
|
||||
namespace Cypress {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
interface Chainable<Subject> {
|
||||
login(email: string, password: string): Chainable<any>
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { Given, Then, When } from '@badeball/cypress-cucumber-preprocessor'
|
||||
import { Given, Then } from '@badeball/cypress-cucumber-preprocessor'
|
||||
import { OverviewPage } from '../../e2e/models/OverviewPage'
|
||||
import { SideNavMenu } from '../../e2e/models/SideNavMenu'
|
||||
import { Toasts } from '../../e2e/models/Toasts'
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { And, Then, When } from '@badeball/cypress-cucumber-preprocessor'
|
||||
import { Then, When } from '@badeball/cypress-cucumber-preprocessor'
|
||||
import { OverviewPage } from '../../e2e/models/OverviewPage'
|
||||
import { ResetPasswordPage } from '../../e2e/models/ResetPasswordPage'
|
||||
import { UserEMailSite } from '../../e2e/models/UserEMailSite'
|
||||
@ -55,7 +55,7 @@ Then('the user receives an e-mail containing the {string} link', (linkName: stri
|
||||
)
|
||||
})
|
||||
|
||||
And(
|
||||
When(
|
||||
'the user receives the transaction e-mail about {string} GDD from {string}',
|
||||
(amount: string, senderName: string) => {
|
||||
cy.origin(
|
||||
@ -102,6 +102,7 @@ When('the user opens the {string} link in the browser', (linkName: string) => {
|
||||
cy.get(resetPasswordPage.newPasswordInput).should('be.visible')
|
||||
break
|
||||
case 'transaction':
|
||||
// eslint-disable-next-line no-case-declarations
|
||||
const overviewPage = new OverviewPage()
|
||||
cy.get(overviewPage.rightLastTransactionsList).should('be.visible')
|
||||
break
|
||||
|
||||
@ -35,7 +35,7 @@ Then(
|
||||
},
|
||||
)
|
||||
|
||||
When('the user submits the transaction by confirming', (receiverName: string, amount) => {
|
||||
When('the user submits the transaction by confirming', () => {
|
||||
cy.intercept({
|
||||
method: 'POST',
|
||||
url: '/graphql',
|
||||
|
||||
@ -15,6 +15,7 @@ When('the user submits no credentials', () => {
|
||||
|
||||
When('the user submits the credentials {string} {string}', (email: string, password: string) => {
|
||||
cy.intercept('POST', '/graphql', (req) => {
|
||||
// eslint-disable-next-line no-prototype-builtins
|
||||
if (req.body.hasOwnProperty('query') && req.body.query.includes('mutation')) {
|
||||
req.alias = 'login'
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { And, When } from '@badeball/cypress-cucumber-preprocessor'
|
||||
import { And, DataTable, When } from '@badeball/cypress-cucumber-preprocessor'
|
||||
import { ProfilePage } from '../../e2e/models/ProfilePage'
|
||||
import { Toasts } from '../../e2e/models/Toasts'
|
||||
|
||||
@ -10,7 +10,7 @@ And('the user opens the change password menu', () => {
|
||||
cy.get(profilePage.submitNewPasswordBtn).should('be.disabled')
|
||||
})
|
||||
|
||||
When('the user fills the password form with:', (table) => {
|
||||
When('the user fills the password form with:', (table: DataTable) => {
|
||||
const hashedTableRows = table.rowsHash()
|
||||
profilePage.enterOldPassword(hashedTableRows['Old password'])
|
||||
profilePage.enterNewPassword(hashedTableRows['New password'])
|
||||
@ -22,7 +22,7 @@ And('the user submits the password form', () => {
|
||||
profilePage.submitPasswordForm()
|
||||
})
|
||||
|
||||
When('the user is presented a {string} message', (type: string) => {
|
||||
When('the user is presented a {string} message', () => {
|
||||
const toast = new Toasts()
|
||||
cy.get(toast.toastSlot).within(() => {
|
||||
cy.get(toast.toastTypeSuccess)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user