From 360d76d3e62b8e9d008f66e065b99fca1fdaff47 Mon Sep 17 00:00:00 2001 From: abhishekmg <34393560+abhishekmg@users.noreply.github.com> Date: Mon, 22 Jan 2024 17:24:58 +0530 Subject: [PATCH] =?UTF-8?q?fix(cypress):=20=F0=9F=90=9B=20cypress=20setup?= =?UTF-8?q?=20fix=20(#119)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cypress.config.ts | 4 ++-- cypress/support/commands.ts | 2 +- package.json | 1 + src/pageComponents/login/index.tsx | 7 ++++++- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/cypress.config.ts b/cypress.config.ts index e82c6d49..11a1b75a 100644 --- a/cypress.config.ts +++ b/cypress.config.ts @@ -8,7 +8,7 @@ export default defineConfig({ }, }, env: { - test_email: "test@test.com", - test_password: "qqqqqq", + test_email: "test16@test.com", + test_password: "123456", }, }); diff --git a/cypress/support/commands.ts b/cypress/support/commands.ts index 096c2488..9ab399eb 100644 --- a/cypress/support/commands.ts +++ b/cypress/support/commands.ts @@ -55,7 +55,7 @@ declare global { Cypress.Commands.add("login", (email, pw) => { cy.get("#email").type(email); cy.get("#password").type(pw); - cy.get(":nth-child(4) > .flex").click(); + cy.get("#sign-in-button").click(); cy.wait(5000); }); diff --git a/package.json b/package.json index 07b02cd4..6eb0b62e 100644 --- a/package.json +++ b/package.json @@ -36,6 +36,7 @@ "commit": "gacp", "contributors:add": "all-contributors add", "contributors:generate": "all-contributors generate", + "cypress:open": "cypress open", "dev": "next dev", "dev:sourcemap": "SOURCEMAP=true pnpm dev", "format": "npx turbo run format:eslint format:css format:md format:prettier", diff --git a/src/pageComponents/login/index.tsx b/src/pageComponents/login/index.tsx index ecca832c..61472e2b 100644 --- a/src/pageComponents/login/index.tsx +++ b/src/pageComponents/login/index.tsx @@ -5,6 +5,7 @@ import { useForm, type SubmitHandler } from "react-hook-form"; import { ToastContainer } from "react-toastify"; import "react-toastify/dist/ReactToastify.css"; + import { signInWithEmailPassword, signInWithOauth, @@ -111,7 +112,11 @@ const LoginPage = () => { placeholder="Password" type="password" /> -