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: adding unit tests for calendar modal and caption component #1811

Merged
merged 16 commits into from
Jul 10, 2023

Conversation

reachaadrika
Copy link
Contributor

@reachaadrika reachaadrika commented Jun 20, 2023

Description

  • This PR includes tests for 3 components : Calendar , Modal and Caption . These are standalone files in the component folder itself.

  • Calendar , component here , renders the list of meetings / events scheduled , along with a link to Google Calendar button . The tests that I have included here are as follows :

  1. renders the upcoming events
  2. renders the "View Calendar" button if events exist
  3. renders the "No meetings scheduled" message if no events exist
    image
  • Caption , component here renders a small caption and children or the content to be entered here is passed as props .
    The tests that I have included here are as follows :
  1. renders the caption text correctly
  2. check correct CSS classes
    image

-Modal , this is the modal component , tests that I have included for this component are as follows .
1 . should call onModalClose when the close button is clicked
2. should call onModalClose when the backdrop is clicked
3. should call onModalClose when the Escape key is pressed

NOTE : In this cypress doesn't provide functionality to exactly interact with the components , thus I have created a simulation for these actions in test window .
image

Related issue(s)
fixes #1810

@netlify
Copy link

netlify bot commented Jun 20, 2023

Deploy Preview for asyncapi-website ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 1a41234
🔍 Latest deploy log https://app.netlify.com/sites/asyncapi-website/deploys/64ac42ef2a9edc0009d9282b
😎 Deploy Preview https://deploy-preview-1811--asyncapi-website.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@reachaadrika reachaadrika changed the title Calender tests feat : add Calender tests Jun 20, 2023
@reachaadrika reachaadrika changed the title feat : add Calender tests feat: adding unit tests for calendar modal and caption component Jun 20, 2023
@github-actions
Copy link

github-actions bot commented Jun 20, 2023

⚡️ Lighthouse report for the changes in this PR:

Category Score
🔴 Performance 45
🟢 Accessibility 98
🟢 Best practices 100
🟢 SEO 100
🔴 PWA 30

Lighthouse ran on https://deploy-preview-1811--asyncapi-website.netlify.app/

@akshatnema akshatnema added the gsoc This label should be used for issues or discussions related to ideas for Google Summer of Code label Jun 27, 2023
components/Calendar.js Outdated Show resolved Hide resolved
components/JobSummary.js Outdated Show resolved Hide resolved
cypress/test/Calendar.cy.js Outdated Show resolved Hide resolved
@reachaadrika
Copy link
Contributor Author

/rtm

@asyncapi-bot asyncapi-bot merged commit 33b2479 into asyncapi:master Jul 10, 2023
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gsoc This label should be used for issues or discussions related to ideas for Google Summer of Code ready-to-merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add unit tests for Calendar , Caption , Modal components
3 participants