From 187d6f39c635aa1ea5c9f85fb7e2474bf8d4e2d4 Mon Sep 17 00:00:00 2001 From: Sagar Khalasi Date: Wed, 5 Feb 2025 13:24:25 +0530 Subject: [PATCH 1/2] Sign in and Sign up cases --- .../ClientSide/Login/SignInSignUp_spec.ts | 32 +++++++++++++++++++ app/client/cypress/locators/LoginPage.json | 8 ++--- app/client/cypress/locators/SignupPage.json | 3 +- 3 files changed, 38 insertions(+), 5 deletions(-) create mode 100644 app/client/cypress/e2e/Regression/ClientSide/Login/SignInSignUp_spec.ts diff --git a/app/client/cypress/e2e/Regression/ClientSide/Login/SignInSignUp_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Login/SignInSignUp_spec.ts new file mode 100644 index 000000000000..65684cdef233 --- /dev/null +++ b/app/client/cypress/e2e/Regression/ClientSide/Login/SignInSignUp_spec.ts @@ -0,0 +1,32 @@ +import { agHelper, homePage } from "../../../../support/Objects/ObjectsCore"; +import SignupPageLocators from "../../../../locators/SignupPage.json"; +import loginPage from "../../../../locators/LoginPage.json"; +import welcomePage from "../../../../locators/welcomePage.json"; + +const emailOne = `sagarspecSignIn1.${Math.random().toString(36).substring(2, 25)}@appsmith.com`; +const tempPassword = "testPassword"; + +describe("Sign in and Sign up verification", { tags: ["@tag.Visual"] }, () => { + it("1. User can sign up to application with form.", () => { + homePage.LogOutviaAPI(); + agHelper.VisitNAssert("/"); + agHelper.WaitUntilEleAppear(SignupPageLocators.forgetPasswordLink); + agHelper.AssertElementExist(SignupPageLocators.signupLink); + agHelper.GetNClick(SignupPageLocators.signupLink); + agHelper.AssertURL("/user/signup"); + cy.get(loginPage.username).type(emailOne); + cy.get(loginPage.password).type(tempPassword, { log: false }); + cy.get(loginPage.submitBtn).click(); + cy.wait("@getConsolidatedData"); + agHelper.AssertURL("/signup-success?"); + agHelper.AssertContains("Brand New"); + agHelper.GetNClick(welcomePage.proficiencyGroupButton, 0); + agHelper.GetNClick(welcomePage.useCaseGroupButton, 0); + agHelper.ClickButton("Get started"); + }); + + it("2. User can sign in to application with form.", () => { + homePage.LogOutviaAPI(); + cy.LoginFromAPI(emailOne, tempPassword); + }); +}); diff --git a/app/client/cypress/locators/LoginPage.json b/app/client/cypress/locators/LoginPage.json index ac587a596f84..a13558ec2393 100644 --- a/app/client/cypress/locators/LoginPage.json +++ b/app/client/cypress/locators/LoginPage.json @@ -1,6 +1,6 @@ { - "username":"input[name='username']", - "password":"input[name='password']", - "submitBtn":"button[type='submit']", - "signupLink":".t--sign-up" + "username": "input[name='username'], input[name='email']", + "password": "input[name='password']", + "submitBtn": "button[type='submit']", + "signupLink": ".t--sign-up" } diff --git a/app/client/cypress/locators/SignupPage.json b/app/client/cypress/locators/SignupPage.json index 13bc4d70ce38..411bb04ccac1 100644 --- a/app/client/cypress/locators/SignupPage.json +++ b/app/client/cypress/locators/SignupPage.json @@ -6,5 +6,6 @@ "useCaseGroupButton": "[data-testid='t--user-use-case'] button", "dropdownOption": ".rc-select-item-option:first", "getStartedSubmit": ".t--get-started-button", - "forgetPasswordLink": "[href='/user/forgotPassword']" + "forgetPasswordLink": "[href='/user/forgotPassword']", + "signupLink": ".t--signup-link" } From 6a16e3a46842f21333e01c1943d1fc74217924d3 Mon Sep 17 00:00:00 2001 From: Sagar Khalasi Date: Wed, 5 Feb 2025 13:29:57 +0530 Subject: [PATCH 2/2] Added tag --- .../e2e/Regression/ClientSide/Login/SignInSignUp_spec.ts | 2 +- app/client/cypress/tags.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/client/cypress/e2e/Regression/ClientSide/Login/SignInSignUp_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Login/SignInSignUp_spec.ts index 65684cdef233..73fcd92e2649 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Login/SignInSignUp_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Login/SignInSignUp_spec.ts @@ -6,7 +6,7 @@ import welcomePage from "../../../../locators/welcomePage.json"; const emailOne = `sagarspecSignIn1.${Math.random().toString(36).substring(2, 25)}@appsmith.com`; const tempPassword = "testPassword"; -describe("Sign in and Sign up verification", { tags: ["@tag.Visual"] }, () => { +describe("Sign in and Sign up verification", { tags: ["@tag.SignIn"] }, () => { it("1. User can sign up to application with form.", () => { homePage.LogOutviaAPI(); agHelper.VisitNAssert("/"); diff --git a/app/client/cypress/tags.js b/app/client/cypress/tags.js index 40f64308979c..048e6d6fff08 100644 --- a/app/client/cypress/tags.js +++ b/app/client/cypress/tags.js @@ -54,6 +54,7 @@ module.exports = { "@tag.Scanner", "@tag.Select", "@tag.Settings", + "@tag.SignIn", "@tag.Slider", "@tag.Statbox", "@tag.Switch",