Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add GitHub Actions for Cypress tests and code quality checks #101

Open
wants to merge 55 commits into
base: main
Choose a base branch
from

Conversation

wawrzonnn
Copy link
Collaborator

No description provided.

Copy link

vercel bot commented Dec 12, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
good-dev-hunting-app ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 2, 2024 7:44pm

Updated actions scripts so they would run on more recent node versions.
this is stupid.
added term to fight back error occuring in cypress run
Copy link
Collaborator

@Sumick Sumick left a comment

Choose a reason for hiding this comment

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

I know I have to help here, but can't do it right now - let's do little cleanup first, I will return to it probably tomorrow

const TextInputWithDropdown = () => {
interface TextInputWithDropdownProps {
dataTestId?: string
dataTestId2?: string
Copy link
Collaborator

Choose a reason for hiding this comment

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

nitpick: we should not have to pass such props. Only id would be enough

yarn.lock Outdated
Copy link
Collaborator

Choose a reason for hiding this comment

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

nitpick: yarn.lock to remove

@@ -52,12 +60,14 @@ const TextInputWithDropdown = () => {
excludeDigits
onClick={handleCountryInputClick}
inputRef={inputRef}
dataTestId={dataTestId}
Copy link
Collaborator

Choose a reason for hiding this comment

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

nitpick: No need to pass dataTest this deep, we can do it directly in component

}: {
value: string
setIsDropdownActive: React.Dispatch<React.SetStateAction<boolean>>
dataTestId?: string | undefined
Copy link
Collaborator

Choose a reason for hiding this comment

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

nitpick: We should not need such prop drilling here

const user = await prisma.user.findUnique({
where: { email },
include: { profile: true },
})
Copy link
Collaborator

Choose a reason for hiding this comment

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

nitpick: We should check it earlier:

 const user = await prisma.user.findUnique({
    where: { email },
    include: { profile: true },
  })

if (!user) {
 throw Error("User not found")
}

await prisma.profile.delete({
      where: { id: user.profile.id },
})

Copy link
Collaborator

Choose a reason for hiding this comment

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

nitpick: Why /test path - we should add it normally in /api/profile/route.ts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants