-
Notifications
You must be signed in to change notification settings - Fork 4
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
Date validation easy renewals #2108
base: develop
Are you sure you want to change the base?
Conversation
https://eaflood.atlassian.net/browse/IWTF-4378 Add the new date validation into easy renewals
@@ -44,7 +44,7 @@ jest.mock('../../../../routes/page-route.js') | |||
|
|||
const mockTransactionSet = jest.fn() | |||
|
|||
const getMockRequest = (permission = getSamplePermission(), year, month, day) => ({ | |||
const getMockRequest = (permission = getSamplePermission(), year, month, day, error) => ({ |
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.
I think this is getting a bit too complex and should be changed to an object parameter. Looking at how you've used it in your new test, I think this would make things a bit simpler. Also, I think year
, month
and day
should have default values.
}, | ||
'date-range': { | ||
'date.min': { ref: '#licence-start-date-day', text: mssgs.renewal_start_date_error_min }, | ||
'date.max': { ref: '#licence-start-date-day', text: mssgs.renewal_start_date_error_max_1 + data.advancedPurchaseMaxDays + mssgs.renewal_start_date_error_max_2 + data.maxStartDate } |
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.
This feels like something that should be in the getData function as it's a bit messy putting it together here, plus it's not testable
Quality Gate passedIssues Measures |
https://eaflood.atlassian.net/browse/IWTF-4378
Add the new date validation into easy renewals