-
Notifications
You must be signed in to change notification settings - Fork 0
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
Automated testing for bug log page (User Story 2) #38
base: f24
Are you sure you want to change the base?
Conversation
Pull Request Test Coverage Report for Build 11496174786Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
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.
Looks good to me
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.
The tests cover all key functionalities of the bug-log feature and behavior, specifically addressing data storage.
The use of querySelectorAll to mock and return elements, such as #bug-logs-container and #bug-report-description effectively simulates the environment to validate functionality. Moreover, realistic simulation of DOM interactions with mock elements guarantees that the page behaves correctly with regards to data handling.
This approach keeps the tests thorough and isolated from external dependencies. Thus, the code is ready for merging.
I have created automated tests that cover all the functionalities of the
public/admin/dashboard/bug-logs.js
page, including data storage. The tests are located intest/bug-logs.js
.These tests use a mock
document
object to simulate a browser environment. A customquerySelectorAll
method is defined to return mock elements for specific selectors, such as#bug-logs-container
and#bug-report-description
. These mock elements replicate basic properties and methods of real DOM elements, ensuring realistic simulation for testing purposes.This completes issue #39