From 11fe5bb24edd57035710ac338d66a58ff5b83246 Mon Sep 17 00:00:00 2001 From: mahula Date: Wed, 28 Jun 2023 08:28:09 +0200 Subject: [PATCH] replace And in stepdefinition files, because since @badeball/cypress-cucumber-preprocessor v13.0.0 the support for But and And has been removed --- .../support/step_definitions/common_steps.ts | 2 +- .../step_definitions/user_authentication_steps.ts | 14 +++++++------- .../user_profile_change_password_steps.ts | 6 +++--- .../step_definitions/user_registration_steps.ts | 6 +++--- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/e2e-tests/cypress/support/step_definitions/common_steps.ts b/e2e-tests/cypress/support/step_definitions/common_steps.ts index c5d3004ac..90f556d10 100644 --- a/e2e-tests/cypress/support/step_definitions/common_steps.ts +++ b/e2e-tests/cypress/support/step_definitions/common_steps.ts @@ -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' diff --git a/e2e-tests/cypress/support/step_definitions/user_authentication_steps.ts b/e2e-tests/cypress/support/step_definitions/user_authentication_steps.ts index 5b25f5391..4e14c8056 100644 --- a/e2e-tests/cypress/support/step_definitions/user_authentication_steps.ts +++ b/e2e-tests/cypress/support/step_definitions/user_authentication_steps.ts @@ -1,4 +1,4 @@ -import { When, And } from '@badeball/cypress-cucumber-preprocessor' +import { When } from '@badeball/cypress-cucumber-preprocessor' import { ForgotPasswordPage } from '../../e2e/models/ForgotPasswordPage' import { LoginPage } from '../../e2e/models/LoginPage' import { ResetPasswordPage } from '../../e2e/models/ResetPasswordPage' @@ -36,7 +36,7 @@ When( // password reset related -And('the user navigates to the forgot password page', () => { +When('the user navigates to the forgot password page', () => { loginPage.openForgotPasswordPage() cy.url().should('include', '/forgot-password') }) @@ -45,25 +45,25 @@ When('the user enters the e-mail address {string}', (email: string) => { forgotPasswordPage.enterEmail(email) }) -And('the user submits the e-mail form', () => { +When('the user submits the e-mail form', () => { forgotPasswordPage.submitEmail() cy.get(forgotPasswordPage.successComponent).should('be.visible') }) -And('the user enters the password {string}', (password: string) => { +When('the user enters the password {string}', (password: string) => { resetPasswordPage.enterNewPassword(password) }) -And('the user repeats the password {string}', (password: string) => { +When('the user repeats the password {string}', (password: string) => { resetPasswordPage.repeatNewPassword(password) }) -And('the user submits the new password', () => { +When('the user submits the new password', () => { resetPasswordPage.submitNewPassword() cy.get(resetPasswordPage.resetPasswordMessageBlock).should('be.visible') }) -And('the user clicks the sign in button', () => { +When('the user clicks the sign in button', () => { resetPasswordPage.openSigninPage() cy.url().should('contain', '/login') }) diff --git a/e2e-tests/cypress/support/step_definitions/user_profile_change_password_steps.ts b/e2e-tests/cypress/support/step_definitions/user_profile_change_password_steps.ts index 1dcbe69ef..cb9d632bd 100644 --- a/e2e-tests/cypress/support/step_definitions/user_profile_change_password_steps.ts +++ b/e2e-tests/cypress/support/step_definitions/user_profile_change_password_steps.ts @@ -1,10 +1,10 @@ -import { And, When } from '@badeball/cypress-cucumber-preprocessor' +import { When } from '@badeball/cypress-cucumber-preprocessor' import { ProfilePage } from '../../e2e/models/ProfilePage' import { Toasts } from '../../e2e/models/Toasts' const profilePage = new ProfilePage() -And('the user opens the change password menu', () => { +When('the user opens the change password menu', () => { cy.get(profilePage.openChangePassword).click() cy.get(profilePage.newPasswordRepeatInput).should('be.visible') cy.get(profilePage.submitNewPasswordBtn).should('be.disabled') @@ -18,7 +18,7 @@ When('the user fills the password form with:', (table) => { cy.get(profilePage.submitNewPasswordBtn).should('be.enabled') }) -And('the user submits the password form', () => { +When('the user submits the password form', () => { profilePage.submitPasswordForm() }) diff --git a/e2e-tests/cypress/support/step_definitions/user_registration_steps.ts b/e2e-tests/cypress/support/step_definitions/user_registration_steps.ts index e90956b6e..c0b4df697 100644 --- a/e2e-tests/cypress/support/step_definitions/user_registration_steps.ts +++ b/e2e-tests/cypress/support/step_definitions/user_registration_steps.ts @@ -1,4 +1,4 @@ -import { And, When } from '@badeball/cypress-cucumber-preprocessor' +import { When } from '@badeball/cypress-cucumber-preprocessor' import { RegistrationPage } from '../../e2e/models/RegistrationPage' const registrationPage = new RegistrationPage() @@ -13,11 +13,11 @@ When( } ) -And('the user agrees to the privacy policy', () => { +When('the user agrees to the privacy policy', () => { registrationPage.checkPrivacyCheckbox() }) -And('the user submits the registration form', () => { +When('the user submits the registration form', () => { registrationPage.submitRegistrationForm() cy.get(registrationPage.RegistrationThanxHeadline).should('be.visible') cy.get(registrationPage.RegistrationThanxText).should('be.visible')