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 footer component #1809

Merged
merged 15 commits into from
Jul 10, 2023

Conversation

reachaadrika
Copy link
Contributor

@reachaadrika reachaadrika commented Jun 19, 2023

Description

  • Footer component previously was a standalone file in the code , with a lot of nested li and div tags for various social media and initiative links , thus to make code more readable and module I created 2 arrays one for initiative links and one for social media links and then rendered the data via map , so now if any new link is to be added to the website footer , one can easily add it to the array .

  • This was also done so that it is easier for the unit test to function , in the previous code , whenever any new link is added to the website , user would be required to change the test file as well as the code file .

  • Thus in the new structure I have created a folder "Footer" in the components folder and have modified the necessary imports .

  • Unit tests for this component are as follows :

  1. renders initiative links
  2. displays correct initiative link labels and URLs
  3. renders social media links
  4. displays correct social media links
  5. displays the end contentimage
    Related issue(s)
    fixes add unit tests for Footer Component #1808

@netlify
Copy link

netlify bot commented Jun 19, 2023

Deploy Preview for asyncapi-website ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit b04815c
🔍 Latest deploy log https://app.netlify.com/sites/asyncapi-website/deploys/64ac4b8aa6da9200081dce8e
😎 Deploy Preview https://deploy-preview-1809--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.

@github-actions
Copy link

github-actions bot commented Jun 19, 2023

⚡️ Lighthouse report for the changes in this PR:

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

Lighthouse ran on https://deploy-preview-1809--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
Copy link
Member

@akshatnema akshatnema left a comment

Choose a reason for hiding this comment

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

Remove the unnecessary imports from the files you have changed.

@@ -0,0 +1,22 @@
export const initiativeLinks = [
Copy link
Member

Choose a reason for hiding this comment

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

Rename the file to more meaningful name for this array. You can also define this array in FooterList.js.

beforeEach(() => {
mount(<Footer />)
})

Copy link
Member

Choose a reason for hiding this comment

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

Add a case for checking AsyncAPI logo in footer and the link connected to the logo.

akshatnema
akshatnema previously approved these changes Jul 10, 2023
@reachaadrika
Copy link
Contributor Author

/rtm

@asyncapi-bot asyncapi-bot merged commit 92b5e7a into asyncapi:master Jul 10, 2023
11 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 Footer Component
3 participants