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

Adding Automated Testing for Resources Page - User Story 5 #52

Open
wants to merge 167 commits into
base: f24
Choose a base branch
from

Conversation

AlAnoud2003
Copy link

@AlAnoud2003 AlAnoud2003 commented Oct 19, 2024

Made a new branch called "testing-resources-userstory5" to test the front and back-end implementation of the resources button and page.

Files created:

- test/link-extraction.js:
- This file demonstrates the functionality of the "extractLinks" function which extracts links from a text. The test covers various scenarios to show that the function works correctly.

- test/resources-button.js:
- This file demonstrates the functionality of the "resources button" by simulating user interactions and ensuring expected results. It tests the behavior when the button is clicked and that the resources page is displayed with the links.

- test/resources-page.js
- This file demonstrates the rendering of the resources page after the resources button is clicked, by simulating the controller and ensuring expected results. The tests check the successful rendering of the page with the correct links.

- test/api-resources-button.js
- This file demonstrates the rendering of the resources page from the api/resources-button endpoint by simulating HTTP GET requests to the endpoint and ensuring the resource page rendering and correct responses.

When running the test files individually: "node test/[file name]", they pass locally, however when running "npm run test" there are errors

This pull request isn't merged into the main branch of the repository as it is failing the npm tests

This resolves issue #51

AlAnoud2003 and others added 30 commits September 26, 2024 13:36
@AlAnoud2003 AlAnoud2003 self-assigned this Oct 19, 2024
@AlAnoud2003 AlAnoud2003 added documentation Improvements or additions to documentation low effort low effort task UserStory5 labels Oct 19, 2024
Copy link

@Hakaabi Hakaabi left a comment

Choose a reason for hiding this comment

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

Comprehensive testing! Well done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation low effort low effort task testing UserStory5
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants