From 2a82faff47fbbb83886524d48b65cf74d31f5ccf Mon Sep 17 00:00:00 2001 From: mahula Date: Wed, 28 Sep 2022 13:01:27 +0200 Subject: [PATCH] fix error caused by missing files regarding rgistration tests --- .../cypress/e2e/User.Registration.feature | 13 ++++++ .../cypress/e2e/models/RegistrationPage.ts | 42 +++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 e2e-tests/cypress/tests/cypress/e2e/User.Registration.feature create mode 100644 e2e-tests/cypress/tests/cypress/e2e/models/RegistrationPage.ts diff --git a/e2e-tests/cypress/tests/cypress/e2e/User.Registration.feature b/e2e-tests/cypress/tests/cypress/e2e/User.Registration.feature new file mode 100644 index 000000000..9361d2b84 --- /dev/null +++ b/e2e-tests/cypress/tests/cypress/e2e/User.Registration.feature @@ -0,0 +1,13 @@ +Feature: User registration + As a user + I want to register to create an account + + @skip + Scenario: Register successfully + Given the browser navigates to page "/register" + When the user fills name and email "Regina" "Register" "regina@register.com" + And the user agrees to the privacy policy + And the user submits the registration form + Then the user can use a provided activation link + And the user can set a password "Aa12345_" + And the user can login with the credentials "regina@register.com" "Aa12345_" diff --git a/e2e-tests/cypress/tests/cypress/e2e/models/RegistrationPage.ts b/e2e-tests/cypress/tests/cypress/e2e/models/RegistrationPage.ts new file mode 100644 index 000000000..27a9cb8cc --- /dev/null +++ b/e2e-tests/cypress/tests/cypress/e2e/models/RegistrationPage.ts @@ -0,0 +1,42 @@ +/// + +export class RegistrationPage { + // selectors + firstnameInput = "#registerFirstname"; + lastnameInput = "#registerLastname"; + emailInput = "#Email-input-field"; + checkbox = "#registerCheckbox"; + submitBtn = "[type=submit]"; + + RegistrationThanxHeadline = ".test-message-headline"; + RegistrationThanxText = ".test-message-subtitle"; + + goto() { + cy.visit("/register"); + return this; + } + + enterFirstname(firstname: string) { + cy.get(this.firstnameInput).clear().type(firstname); + return this; + } + + enterLastname(lastname: string) { + cy.get(this.lastnameInput).clear().type(lastname); + return this; + } + + enterEmail(email: string) { + cy.get(this.emailInput).clear().type(email); + return this; + } + + checkPrivacyCheckbox() { + cy.get(this.checkbox).click({ force: true }); + } + + submitRegistrationPage() { + cy.get(this.submitBtn).should("be.enabled"); + cy.get(this.submitBtn).click(); + } +}