Skip to content
Open

PO-2983 #2288

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -696,6 +696,7 @@ describe('FinesMacPaymentTermsComponent', () => {
'@JIRA-STORY:PO-429',
'@JIRA-STORY:PO-592',
'@JIRA-STORY:PO-545',
'@JIRA-STORY:PO-2983',
'@JIRA-KEY:POT-4295',
),
},
Expand All @@ -706,7 +707,9 @@ describe('FinesMacPaymentTermsComponent', () => {

finesMacState.paymentTerms.formData.fm_payment_terms_payment_terms = 'payInFull';
finesMacState.paymentTerms.formData.fm_payment_terms_pay_by_date = '01/01/2033';
cy.get(DOM_ELEMENTS.mojTicketPanel).should('contain', ERROR_MESSAGES.dateInFuture);
cy.get(DOM_ELEMENTS.mojTicketPanel)
.should('contain', ERROR_MESSAGES.dateInFuture)
.and('contain', ERROR_MESSAGES.dateInFutureMessage);
});
});
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
export const ERROR_MESSAGES = {
dateInPast: 'Pay by date is in the past',
dateInFuture: 'Pay by date is more than 3 years in the future',
dateInFutureMessage: 'You can continue with this date or change',
startDateInPast: 'Start date is in the past',
startDateInFuture: 'Start date is more than 3 years in the future',
paymentTerms: 'Select payment terms',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,6 @@ <h1 class="govuk-heading-l">Payment terms</h1>
<ng-template #dateInFutureTemplate let-fieldName>
<opal-lib-moj-ticket-panel sectionClasses="moj-ticket-panel__content--orange" [alert]="true">
<strong>{{ fieldName }} is more than 3 years in the future</strong>
<p>You can continue with date in the past or change</p>
<p>You can continue with this date or change</p>
</opal-lib-moj-ticket-panel>
</ng-template>
Loading