-
-
Notifications
You must be signed in to change notification settings - Fork 632
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
Conversation
✅ Deploy Preview for asyncapi-website ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
⚡️ Lighthouse report for the changes in this PR:
Lighthouse ran on https://deploy-preview-1809--asyncapi-website.netlify.app/ |
There was a problem hiding this 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.
components/footer/FooterList2.js
Outdated
@@ -0,0 +1,22 @@ | |||
export const initiativeLinks = [ |
There was a problem hiding this comment.
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
.
cypress/test/footer/footer.cy.js
Outdated
beforeEach(() => { | ||
mount(<Footer />) | ||
}) | ||
|
There was a problem hiding this comment.
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.
/rtm |
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 :
Related issue(s)
fixes add unit tests for Footer Component #1808