Open
Conversation
…nd the recommendations shortly
…or the user reviews to train the ML models, going to work more on logic now
…w up as a's, possibly can use a component library to make it easier
…files, have them saved locally if needed, all tests pass, will add more detail in the PR
navteniev
requested changes
Mar 23, 2025
Collaborator
navteniev
left a comment
There was a problem hiding this comment.
See additional comments in Brightspace.
Collaborator
There was a problem hiding this comment.
No need to checking OS X artifact into the repository.
| }); | ||
| }); | ||
|
|
||
| test('should store purchase data when user is logged in', async () => { |
Collaborator
There was a problem hiding this comment.
What makes this an integration tests?
| ); | ||
| }); | ||
|
|
||
| test('should schedule a review reminder with correct timing', () => { |
Collaborator
There was a problem hiding this comment.
What makes this a unit test?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds comprehensive testing for the Fit Check Chrome extension. The main focus is on validating the review functionality, purchase detection, and data storage components. I've created unit tests, integration tests, and end-to-end tests to ensure the extension works reliably across different scenarios. Additionally, I've set up a GitHub workflow for continuous integration.
Changes Made
Unit Test
__tests__/review-management.unit.test.jswhich tests the review functionality in background.js:Integration Test
__tests__/purchase-detection.integration.test.jswhich tests the interaction between contentScript.js and background.js:End to End Test
e2e/review.spec.jswhich tests the review submission flow:Checklist
Note
The test coverage for the unit tests has increased from 15% to 68% for the review management functionality. The integration tests now cover the critical path of purchase detection and storage. All tests are configured to run automatically on each PR via GitHub Actions.
All tests were conducted using mock data as we plan to integrate the different features in the main branch. The workflow files and Jest configuration files have not been pushed to this PR but are saved locally and can be provided if needed.