Converted the Parcels Page test from Cypress to Jest.
Checklist
[x] The ticket is up-to-date - Please document any deviations from the original approach if there is any.
[x] I have documented the testing steps for QA
[x] I have self-reviewed this PR
[x] Make sure you've verified it works via npm run dev
[x] Make sure you've verified it works via npm run build and npm run start
[x] Make sure you've fixed all linting problems with npm run lint_fix
[x] Make sure you've tested via npm run test
AI generated change summary
The following is a summary of the changes in the PR generated by What The Diff.
Delete the command below if you don't want this to be generataed.
Update to GitHub Workflows
Automated Testing Updates
We made some updates to our automated checks on code changes. Specifically, we've added steps for "Cypress component tests", "Cypress end-to-end tests", and "Jest tests" in our system, so these will now run automatically whenever code changes are proposed.
New and Modified Files
Unit Testing
Several new files were added to implement unit tests for different parts of our software – these help us make sure each individual piece is working as expected.
ActionAndStatusBar.test.tsx tests the function of the ActionBar
ActionModals.test.tsx tests the various modal dialogs within the ActionBar
StatusesModal.test.tsx tests the modal that displays parcel status history.
Code Organization Improvements
We've organized some of our code better by correcting the paths of imported components in files like Actions.tsx, DuplicateDownloadWarning.tsx, StatusesModal.tsx, and Statuses.tsx.
New Setup File
A new setup file jest.setup.ts was added to configure any settings related to the Jest testing framework for consistency across all tests.
Back-end Processing Tests in ParcelsPage.test.tsx
Backend Logic Verification
A new file ParcelsPage.test.tsx was added in the parcelsTable directory to check the accuracy of data processing for our parcels page. It validates the functions creating family categories, formatting dates, statuses and addresses, and processing event details and breakdowns of children details. These tests help ensure that the backend is processing the data correctly before it reaches the user.
What's changed
Converted the Parcels Page test from Cypress to Jest.
Checklist
npm run dev
npm run build
andnpm run start
npm run lint_fix
[x] Make sure you've tested via
npm run test
AI generated change summary
The following is a summary of the changes in the PR generated by What The Diff. Delete the command below if you don't want this to be generataed.
Update to GitHub Workflows
New and Modified Files
Unit Testing Several new files were added to implement unit tests for different parts of our software – these help us make sure each individual piece is working as expected.
ActionAndStatusBar.test.tsx
tests the function of the ActionBarActionModals.test.tsx
tests the various modal dialogs within the ActionBarStatusesModal.test.tsx
tests the modal that displays parcel status history.Code Organization Improvements We've organized some of our code better by correcting the paths of imported components in files like
Actions.tsx
,DuplicateDownloadWarning.tsx
,StatusesModal.tsx
, andStatuses.tsx
.New Setup File A new setup file
jest.setup.ts
was added to configure any settings related to the Jest testing framework for consistency across all tests.Back-end Processing Tests in
ParcelsPage.test.tsx
ParcelsPage.test.tsx
was added in theparcelsTable
directory to check the accuracy of data processing for our parcels page. It validates the functions creating family categories, formatting dates, statuses and addresses, and processing event details and breakdowns of children details. These tests help ensure that the backend is processing the data correctly before it reaches the user.