techishiring-website icon indicating copy to clipboard operation
techishiring-website copied to clipboard

132 cypress test for contact us form

Open Tausifqureshi786 opened this issue 2 years ago • 4 comments

Description

Edited the current contact-form.tsx file to add some helper attributes to elements and added the test suite for the isolated component using cypress.

  • Added 'data-cy' attributes for the name, email and message input fields and error span elements in "../src/components/molecules/contact-form/contact-form.tsx" file in order to safely fetch them in the cypress tests
  • Added test suite for contact-form component handling three cases: -- No name, email and message is provided -- All three proper inputs are provided. -- Only valid email is provided

Related Issue

Resolves: #132

Motivation and Context

n/a

How Has This Been Tested?

Screenshots (if appropriate):

Case 1: Screenshot 2023-05-25 at 4 54 48 PM

Case 2: Screenshot 2023-05-25 at 4 55 34 PM

Case 3: Screenshot 2023-05-25 at 4 56 02 PM

Tausifqureshi786 avatar May 25 '23 22:05 Tausifqureshi786

Someone is attempting to deploy a commit to a Personal Account owned by @TechIsHiring on Vercel.

@TechIsHiring first needs to authorize it.

vercel[bot] avatar May 25 '23 22:05 vercel[bot]

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

Name Status Preview Comments Updated (UTC)
techishiring-website ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 29, 2023 0:51am

vercel[bot] avatar May 29 '23 12:05 vercel[bot]

Hey @Tausifqureshi786, just wanted to reach out and ask if you were able to make any further progress on this PR?

chadstewart avatar Jun 12 '23 12:06 chadstewart

@chadstewart @Tausifqureshi786 Let me know if you'd like me to finish this up. In terms of consistency with https://github.com/TechIsHiring/techishiring-website/blob/dev/src/components/organisms/footer/footer.cy.tsx, should the test file here be moved to be in same folder as the component?

dgodongm avatar Sep 19 '23 18:09 dgodongm