diff --git a/frontend/cypress/integration/boundary_test_user_registration.js b/frontend/cypress/integration/boundary_test_user_registration.js index e6ea8de71e8102bb56a0fc6989eec7e1de715035..3648ef1b937b22ccde44fd70105f3aacf2508c4a 100644 --- a/frontend/cypress/integration/boundary_test_user_registration.js +++ b/frontend/cypress/integration/boundary_test_user_registration.js @@ -119,63 +119,63 @@ describe("Register new user", () => { cy.get(".alert").contains("Registration failed!"); }); - it("Checking for boundary error with country", () => { + it("Valid max length country", () => { cy.register(); cy.get("#form-register-user").within(($form) => { cy.get('input[name="username"]').type("testUser" + Date.now()); cy.get('input[name="email"]').type("test@mail.it"); cy.get('input[name="password"]').type("123456789"); cy.get('input[name="password1"]').type("123456789"); - cy.get('input[name="country"]').type("x".repeat(51)); + cy.get('input[name="country"]').type("x".repeat(50)); cy.get('input[name="city"]').type("Testheim"); cy.get('input[name="street_address"]').type("Testing street"); }); cy.get("#btn-create-account").click(); - cy.contains("Registration failed!"); + cy.url().should("include", "/workouts.html"); }); - it("Checking for boundry error with street", () => { + it("Too long country", () => { cy.register(); cy.get("#form-register-user").within(($form) => { cy.get('input[name="username"]').type("testUser" + Date.now()); cy.get('input[name="email"]').type("test@mail.it"); cy.get('input[name="password"]').type("123456789"); cy.get('input[name="password1"]').type("123456789"); - cy.get('input[name="street_address"]').type("x".repeat(51)); + cy.get('input[name="country"]').type("x".repeat(51)); + cy.get('input[name="city"]').type("Testheim"); + cy.get('input[name="street_address"]').type("Testing street"); }); cy.get("#btn-create-account").click(); cy.contains("Registration failed!"); }); - it("Checking for max length boundary for country", () => { + it("Valid Max lenth street", () => { cy.register(); cy.get("#form-register-user").within(($form) => { cy.get('input[name="username"]').type("testUser" + Date.now()); cy.get('input[name="email"]').type("test@mail.it"); cy.get('input[name="password"]').type("123456789"); cy.get('input[name="password1"]').type("123456789"); - cy.get('input[name="country"]').type("x".repeat(50)); - cy.get('input[name="city"]').type("Testheim"); - cy.get('input[name="street_address"]').type("Testing street"); + cy.get('input[name="street_address"]').type("x".repeat(50)); }); cy.get("#btn-create-account").click(); - cy.contains("View Workouts"); + cy.url().should("include", "/workouts.html"); }); - it("Checking for max boundary with street", () => { + it("Too long street", () => { cy.register(); cy.get("#form-register-user").within(($form) => { cy.get('input[name="username"]').type("testUser" + Date.now()); cy.get('input[name="email"]').type("test@mail.it"); cy.get('input[name="password"]').type("123456789"); cy.get('input[name="password1"]').type("123456789"); - cy.get('input[name="street_address"]').type("x".repeat(50)); + cy.get('input[name="street_address"]').type("x".repeat(51)); }); cy.get("#btn-create-account").click(); - cy.contains("View Workouts"); + cy.contains("Registration failed!"); }); - it("Checking for boundry error with phone number", () => { + it("Too long phone number", () => { cy.register(); cy.get("#form-register-user").within(($form) => { cy.get('input[name="username"]').type("testUser" + Date.now()); @@ -188,7 +188,7 @@ describe("Register new user", () => { cy.contains("Registration failed!"); }); - it("Checking for max length boundary with phone number", () => { + it("Valid max length phone number", () => { cy.register(); cy.get("#form-register-user").within(($form) => { cy.get('input[name="username"]').type("testUser" + Date.now()); @@ -198,6 +198,6 @@ describe("Register new user", () => { cy.get('input[name="street_address"]').type("x".repeat(50)); }); cy.get("#btn-create-account").click(); - cy.contains("View Workouts"); + cy.url().should("include", "/workouts.html"); }); });