Skip to content

Commit

Permalink
Merge branch 'master' into CIV-16466-ga-e2e-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
CourtneySuhr-Solirius authored Feb 4, 2025
2 parents f1ad6fd + 578b72c commit ed6f821
Show file tree
Hide file tree
Showing 13 changed files with 271 additions and 90 deletions.
4 changes: 2 additions & 2 deletions src/main/modules/i18n/locales/cy.json
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,7 @@
"COMBO_BOX" : {
"TITLE": "A ddaethpwyd i gytundeb rhwng y partïon sy’n ymwneud â’r hawliad ynghylch pa ddogfennau electronig fydd yn cael eu datgelu?",
"ITEM1": {
"TEXT": "Ie"
"TEXT": "Do"
},
"ITEM2": {
"TEXT": "Na, ond mae'n debygol y bydd cytundeb"
Expand Down Expand Up @@ -1923,7 +1923,7 @@
"PARAGRAPH_2.2": "Er enghraifft, nid yw e-bost wedi’i argraffu yn ddogfen electronig.",
"TITLE_3": "Rhagor o wybodaeth",
"URL": {
"BEFORE": "Rhagor o wybodaeth ",
"BEFORE": "Rhagor o wybodaeth ar ",
"TEXT": "Gyfarwyddyd Ymarfer 31B (yn agor mewn tab newydd)",
"AFTER": "."
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
{{ createPageTitle(title,t) }}
{{ createDetails( whatAreFixedRecoverableCostsContent ,t) }}
{{ createPageTitle(buttonTitle,t,'m') }}
{{ yesNoRadioButton(t, 'option', 'option', '', form, '', {yesHtml: yesHtml, yes: 'COMMON.VARIATION.YES', no: 'COMMON.VARIATION.NO', noHtml: noHtml}) }}
{{ yesNoRadioButton(t, 'option', 'option', '', form, '', {yesHtml: yesHtml, yes: 'COMMON.VARIATION_4.YES', no: 'COMMON.VARIATION_4.NO', noHtml: noHtml}) }}
{{ addButton(t, 'SAVE_AND_CONTINUE') }}
{{ contactUsForHelp(t) }}
</form>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
{{ createPageTitle(title,t) }}
{{ createDetails( whatAreFixedRecoverableCostsContent ,t) }}
{{ createPageTitle(buttonTitle,t,'m') }}
{{ yesNoRadioButton(t, 'option', 'option', '', form, '', {yesHtml: yesHtml, yes: 'COMMON.VARIATION.YES', no: 'COMMON.VARIATION.NO', noHtml: noHtml}) }}
{{ yesNoRadioButton(t, 'option', 'option', '', form, '', {yesHtml: yesHtml, yes: 'COMMON.VARIATION_4.YES', no: 'COMMON.VARIATION_4.NO', noHtml: noHtml}) }}
{{ addButton(t, 'SAVE_AND_CONTINUE') }}
{{ contactUsForHelp(t) }}
</form>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
{{ createPageTitle(componentText,t, 'm') }}
<form method="post" novalidate>
{{ csrfProtection(csrf) }}
{{ yesNoRadioButton(t, 'option', 'option', '', form, '', {classes: 'govuk-radios', yes: variation.yes, no: variation.no}) }}
{{ yesNoRadioButton(t, 'option', 'option', '', form, '', {classes: 'govuk-radios', yes: 'COMMON.VARIATION_8.YES', no: 'COMMON.VARIATION_8.NO'}) }}

{{ addButton(t, 'SAVE_AND_CONTINUE') }}
{{ contactUsForHelp(t) }}
Expand Down
2 changes: 1 addition & 1 deletion src/test/e2eTests/response/steps/response.js
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ class Response {

yourRepaymentPlan(isPartial){
let futureDate = new Date();
futureDate.setDate(futureDate.getDate() + 1);
futureDate.setDate(futureDate.getDate() + 3);

I.click(responseTaskListItems.YOUR_REPAYMENT_PLAN, checkTaskList(responseTaskListItems.YOUR_REPAYMENT_PLAN, taskListStatus.INCOMPLETE));
I.seeInCurrentUrl('/payment-plan');
Expand Down
2 changes: 1 addition & 1 deletion src/test/e2eTests/tests/response/partAdmit/partAdmit.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const PartAdmit = require('../../../response/steps/response');
const {paymentType} = require('../../../commons/responseVariables');
const {yesAndNoCheckBoxOptionValue} = require('../../../commons/eligibleVariables');

Feature('Response journey defendant Part Admin').tag('@e2e');
Feature('Response journey defendant Part Admit').tag('@e2e');

Scenario('already paid', () => {
if (['preview', 'demo'].includes(config.runningEnv)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ class ApplyHelpFeeSelection {
contactUs.verifyContactUs();
}

async verifyPageContentForAdditionalFee(){
this.checkPageFullyLoaded();
this.verifyBreadcrumbs();
this.verifyHeadingDetailsForAdditionalFee();
await this.verifyPageText();
contactUs.verifyContactUs();
}

verifyBreadcrumbs() {
I.see('Back', '//a[@class="govuk-back-link"]');
}
Expand All @@ -30,6 +38,11 @@ class ApplyHelpFeeSelection {
I.see('Pay application fee', 'h1');
}

verifyHeadingDetailsForAdditionalFee() {
I.see('Additional application fee', 'span');
I.see('Pay additional application fee', 'h1');
}

async verifyPageText() {
I.see('If you\'re on a low income, have limited savings or are claiming benefits, you may be able to get help with fees (opens in a new tab).');
I.see('If you meet the criteria, you may get support to pay some or all of the fee.');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ class PaymentConfirmation {
contactUs.verifyContactUs();
}

async verifyAdditionalPaymentPageContent(){
this.checkPageFullyLoaded();
this.verifyHeadingDetails();
await this.verifyPageTextForAdditionalPayment();
contactUs.verifyContactUs();
}

verifyHeadingDetails() {
I.see('Your payment was', 'h1');
I.see('successful', 'h1');
Expand All @@ -31,6 +38,13 @@ class PaymentConfirmation {
I.see('If you chosen to inform the other parties or agreed the application, they will have 5 working days to respond to your application. If you have a hearing in the next 10 days, your application will be treated urgently.');
await I.seeElement('//a[@class=\'govuk-button\' and contains(text(), \'Close and return to dashboard\')]\n');
}

async verifyPageTextForAdditionalPayment() {
I.see('What happens next', 'h2');
I.see('The other parties will have 5 working days to respond to your application. If you have a hearing in the next 10 days, your application will be treated urgently.');
I.see('If necessary, all documents relating to this application, including any response from the court, will be translated. You will be notified when these are available.');
await I.seeElement('//a[@class=\'govuk-button\' and contains(text(), \'Close and return to dashboard\')]\n');
}
}

module.exports = PaymentConfirmation;
32 changes: 22 additions & 10 deletions src/test/functionalTests/citizenFeatures/GA/steps/createGASteps.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ class createGASteps {

let feeAmount;

switch(communicationType) {
switch (communicationType) {
case 'consent':
feeAmount = '119';
break;
Expand Down Expand Up @@ -352,7 +352,7 @@ class createGASteps {
const applicationType = 'Change a hearing date';
let feeAmount;

switch(communicationType) {
switch (communicationType) {
case 'consent':
feeAmount = '119';
break;
Expand Down Expand Up @@ -466,7 +466,7 @@ class createGASteps {
const applicationType = 'More time to do what is required by a court order';
let feeAmount;

switch(communicationType) {
switch (communicationType) {
case 'consent':
feeAmount = '119';
break;
Expand Down Expand Up @@ -581,7 +581,7 @@ class createGASteps {
const applicationType = 'Relief from a penalty you\'ve been given by the court';
let feeAmount;

switch(communicationType) {
switch (communicationType) {
case 'consent':
feeAmount = '119';
break;
Expand Down Expand Up @@ -698,7 +698,7 @@ class createGASteps {
const applicationType = 'Make a change to your claim or defence that you\'ve submitted';
let feeAmount;

switch(communicationType) {
switch (communicationType) {
case 'consent':
feeAmount = '119';
break;
Expand Down Expand Up @@ -814,7 +814,7 @@ class createGASteps {
const applicationType = 'Court to make a summary judgment on a case';
let feeAmount;

switch(communicationType) {
switch (communicationType) {
case 'consent':
feeAmount = '119';
break;
Expand Down Expand Up @@ -930,7 +930,7 @@ class createGASteps {
const applicationType = 'Court to strike out all or part of the other parties\' case without a trial';
let feeAmount;

switch(communicationType) {
switch (communicationType) {
case 'consent':
feeAmount = '119';
break;
Expand Down Expand Up @@ -1046,7 +1046,7 @@ class createGASteps {
const applicationType = 'Court to pause a claim';
let feeAmount;

switch(communicationType) {
switch (communicationType) {
case 'consent':
feeAmount = '119';
break;
Expand Down Expand Up @@ -1162,7 +1162,7 @@ class createGASteps {
const applicationType = 'Court to impose a sanction on the other parties unless they do a specific action';
let feeAmount;

switch(communicationType) {
switch (communicationType) {
case 'consent':
feeAmount = '119';
break;
Expand Down Expand Up @@ -1366,7 +1366,7 @@ class createGASteps {
const applicationType = 'Court to do something that\'s not on this list';
let feeAmount;

switch(communicationType) {
switch (communicationType) {
case 'consent':
feeAmount = '119';
break;
Expand Down Expand Up @@ -1476,6 +1476,18 @@ class createGASteps {

return generalApplicationID;
}

async additionalPayment(feeAmount) {
await applyHelpFeeSelectionPage.verifyPageContentForAdditionalFee();
await applyHelpFeeSelectionPage.nextAction('No');
await applyHelpFeeSelectionPage.nextAction('Continue');

await govPay.addValidCardDetails(feeAmount);
govPay.confirmPayment();

await paymentConfirmationPage.verifyAdditionalPaymentPageContent();
await paymentConfirmationPage.nextAction('Close and return to dashboard');
}
}

module.exports = new createGASteps();
3 changes: 3 additions & 0 deletions src/test/functionalTests/specClaimHelpers/api/steps.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ module.exports = {
case 'requestMoreInformation':
payload = makeAnOrderGA.requestMoreInformation(document);
break;
case 'withoutNoticeToWith':
payload = makeAnOrderGA.withoutNoticeToWith(document);
break;
default:
payload = makeAnOrderGA.makeAnOrderGA(document);
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -534,12 +534,21 @@ module.exports = {
};
},


// Request for more information
orderMoreInformation: () => {
return {
title: 'You must provide more information',
content: 'The court has responded to the application. You must upload a document providing more information to the court by 4pm on 5 February 2026.',
nextSteps: 'providing more information',

// The other parties have requested a change
otherPartiesRequestedChange: () => {
return {
title: 'The other parties have requested a change to the case',
content: 'Review their request and respond to it by 4pm on',
nextSteps: 'Review and respond to the request',

};
},
};
Loading

0 comments on commit ed6f821

Please sign in to comment.