Refactor Export Wins functional tests #6610
Merged
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 of change
This refactors the Export Wins functional tests. It breaks out the unwieldy
add-export-win-spec.js
file (~1300 lines) into the following 5 lightweight files that do not need to be reviewed as no changes have occurred:officer-details=spec.js
credit-for-this-win-spec.js
customer-details-spec.js
win-details-spec.js
support-provided-spec.js
constants.js
However, reviews are required on the following files:
add-export-win-from-export-project.js
- leverages the new utility methods for filling out a form.add-export-win.js
(Shrunk from ~1300 lines to 372 lines) leverages the new utility methods for filling out a form.utils.js
- essentially utilty functions that make it easy to fill out the fields on a given step, this is going to be extremely handy when we come to test the Export Wins editing functionality.src/client/utils/date.js
- checkout thegetRandomDateInRange
function.For example, to fill out the first 3 form steps of an Export Win you would:
Going forward, if you just wanted to edit the location on the customer details step you would:
There are no visual changes.
Checklist