Skip to content

Commit

Permalink
fix(cypress): 🐛 cypress setup fix (#119)
Browse files Browse the repository at this point in the history
  • Loading branch information
abhishekmg authored Jan 22, 2024
1 parent 7fffa03 commit 360d76d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default defineConfig({
},
},
env: {
test_email: "test@test.com",
test_password: "qqqqqq",
test_email: "test16@test.com",
test_password: "123456",
},
});
2 changes: 1 addition & 1 deletion cypress/support/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});

Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
7 changes: 6 additions & 1 deletion src/pageComponents/login/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -111,7 +112,11 @@ const LoginPage = () => {
placeholder="Password"
type="password"
/>
<button className={buttonDarkClassName} type="submit">
<button
className={buttonDarkClassName}
id="sign-in-button"
type="submit"
>
{!isLoading ? "Sign in" : <Spinner />}
</button>
<div
Expand Down

1 comment on commit 360d76d

@vercel
Copy link

@vercel vercel bot commented on 360d76d Jan 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.