Skip to content

Commit

Permalink
update FTs (#933)
Browse files Browse the repository at this point in the history
* update FTs

* disable test
  • Loading branch information
shravanmechineni authored Nov 8, 2024
1 parent 3b5dc1c commit 5b2e8ca
Show file tree
Hide file tree
Showing 8 changed files with 74 additions and 73 deletions.
36 changes: 18 additions & 18 deletions acceptance-tests/test/end-to-end/pages/add_fees.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ module.exports = {
I.click('Apply filters');
I.click('Select');
I.wait(CCPBConstants.fiveSecondWaitTime);
let numOfElements = await I.grabNumberOfVisibleElements('//input[@id=\'fee-version0\']');
if(numOfElements) {
I.click('//input[@id=\'fee-version0\']');
I.click('Continue');
I.wait(CCPBConstants.fiveSecondWaitTime);
}
// let numOfElements = await I.grabNumberOfVisibleElements('//input[@id=\'fee-version0\']');
// if(numOfElements) {
// I.click('//input[@id=\'fee-version0\']');
// I.click('Continue');
// I.wait(CCPBConstants.fiveSecondWaitTime);
// }
},

async addFeesAmount(amount, jurisdiction1, jurisdiction2) {
Expand All @@ -58,12 +58,12 @@ module.exports = {
}
I.click('Select');
I.wait(CCPBConstants.fiveSecondWaitTime);
let numOfElements = await I.grabNumberOfVisibleElements('//input[@id=\'fee-version0\']');
if(numOfElements) {
I.click('//input[@id=\'fee-version0\']');
I.click('Continue');
I.wait(CCPBConstants.fiveSecondWaitTime);
}
// let numOfElements = await I.grabNumberOfVisibleElements('//input[@id=\'fee-version0\']');
// if(numOfElements) {
// I.click('//input[@id=\'fee-version0\']');
// I.click('Continue');
// I.wait(CCPBConstants.fiveSecondWaitTime);
// }
},

async addFeesOverPayment(amount) {
Expand All @@ -74,12 +74,12 @@ module.exports = {
I.wait(CCPBConstants.fiveSecondWaitTime, 10);
I.click('Select');
I.wait(CCPBConstants.fiveSecondWaitTime);
let numOfElements = await I.grabNumberOfVisibleElements('//input[@id=\'fee-version0\']');
if(numOfElements) {
I.click('//input[@id=\'fee-version0\']');
I.click('Continue');
I.wait(CCPBConstants.fiveSecondWaitTime);
}
// let numOfElements = await I.grabNumberOfVisibleElements('//input[@id=\'fee-version0\']');
// if(numOfElements) {
// I.click('//input[@id=\'fee-version0\']');
// I.click('Continue');
// I.wait(CCPBConstants.fiveSecondWaitTime);
// }
I.click(this.locators.allocate_payment);
I.wait(CCPBConstants.tenSecondWaitTime);
I.click(this.locators.help_with_fee);
Expand Down
4 changes: 2 additions & 2 deletions acceptance-tests/test/end-to-end/pages/case_transactions.js
Original file line number Diff line number Diff line change
Expand Up @@ -416,10 +416,10 @@ module.exports = {
I.see('£280.00');
I.see('Overpayment');
},
validateTransactionPageForPartialPayments() {
validateTransactionPageForPartialPayments(amount) {
I.wait(CCPBConstants.tenSecondWaitTime);
I.see('Total payments');
I.see('£273');
I.see(${amount}`);
I.see('Total remissions');
I.see('Amount due');
I.see('Unallocated payments');
Expand Down
4 changes: 2 additions & 2 deletions acceptance-tests/test/end-to-end/pages/payment_history.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ module.exports = {
// I.dontSee('Date');
},

validatePaymentDetailsForPartialPayment(paymentReference) {
validatePaymentDetailsForPartialPayment(paymentReference, amount) {
I.see('Payment details');
I.see('Payment reference');
I.see('Payment amount');
Expand All @@ -114,7 +114,7 @@ module.exports = {
I.see('PBA account name');
I.see('PBA number');
I.see('Customer internal reference');
I.see('£273.00');
I.see(${amount}`);
I.see(`${paymentReference}`);
I.see('2024-');
},
Expand Down
6 changes: 3 additions & 3 deletions acceptance-tests/test/end-to-end/pages/steps_file.js
Original file line number Diff line number Diff line change
Expand Up @@ -911,8 +911,8 @@ module.exports = () => actor({
this.see(ccdCaseNumberFormatted);
this.click('Create service request and pay');
this.wait(CCPBConstants.fiveSecondWaitTime);
await AddFees.addFeesAmount('273.00', 'family', 'probate_registry');
FeesSummary.verifyFeeSummaryTelephonyPayment(ccdCaseNumberFormatted, 'FEE0219', '273.00', false);
await AddFees.addFeesAmount('300.00', 'family', 'probate_registry');
FeesSummary.verifyFeeSummaryTelephonyPayment(ccdCaseNumberFormatted, 'FEE0219', '300.00', false);
FeesSummary.deductRemission();
Remission.processRemission('FEE0219', '200');
Remission.confirmProcessRemission();
Expand All @@ -927,7 +927,7 @@ module.exports = () => actor({
this.see('Partially paid');
this.click('Take telephony payment');
this.wait(CCPBConstants.fiveSecondWaitTime);
FeesSummary.verifyFeeSummaryAfterRemission('FEE0219', '273.00', '73.00', '£200.00');
FeesSummary.verifyFeeSummaryAfterRemission('FEE0219', '300.00', '100.00', '£200.00');
this.click('Take payment');
this.wait(CCPBConstants.fiveSecondWaitTime);
this.waitInUrl('pcipal', 2);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,11 @@ Scenario('Normal ccd case cheque payment partial allocation 2 fees added with a
I.wait(CCPBATConstants.tenSecondWaitTime);
FeesSummary.verifyFeeSummaryAfterRemission('FEE0002', '£593.00', '£100.00', '£493.00');
FeesSummary.addFeeFromSummary();
await AddFees.addFees('19.00', 'civil', 'magistrates_court');
FeesSummary.verifyFeeSummaryBulkScan(ccdCaseNumberFormatted, 'FEE0002', '19.00', true);
await AddFees.addFees('21.00', 'civil', 'magistrates_court');
FeesSummary.verifyFeeSummaryBulkScan(ccdCaseNumberFormatted, 'FEE0362', '21.00', true);
I.wait(CCPBATConstants.tenSecondWaitTime);
ConfirmAssociation.verifyConfirmAssociationShortfallPayment('FEE0002', '1', '493.00', '593.00', '593.00', '19.00');
ConfirmAssociation.verifyConfirmAssociationShortfallPayment('FEE0362', '1', '493.00', '19.00', '19.00', '19.00');
ConfirmAssociation.verifyConfirmAssociationShortfallPayment('FEE0002', '1', '493.00', '593.00', '593.00', '21.00');
ConfirmAssociation.verifyConfirmAssociationShortfallPayment('FEE0362', '1', '493.00', '21.00', '21.00', '21.00');
ConfirmAssociation.selectShortfallReasonExplainatoryAndUser('Help with Fees', 'Contact applicant');
ConfirmAssociation.confirmPayment();
I.wait(CCPBATConstants.tenSecondWaitTime);
Expand Down Expand Up @@ -381,7 +381,7 @@ Scenario('Exception search with ccd record postal order payment surplus payment'

Scenario('Fully Paid Fee with Upfront Remission CANNOT be Refunded', async({ I, CaseSearch, CaseTransaction, AddFees, FeesSummary, ConfirmAssociation, Remission }) => {
I.login(testConfig.TestProbateCaseWorkerUserName, testConfig.TestProbateCaseWorkerPassword);
const totalAmount = 173;
const totalAmount = 200;
const ccdAndDcn = await bulkScanApiCalls.bulkScanNormalCcd('AA08', totalAmount, 'cheque');
const ccdCaseNumber = ccdAndDcn[1];
const dcnNumber = ccdAndDcn[0];
Expand All @@ -391,24 +391,24 @@ Scenario('Fully Paid Fee with Upfront Remission CANNOT be Refunded', async({ I,
await miscUtils.multipleSearch(CaseSearch, I, ccdCaseNumber);
I.wait(CCPBATConstants.fiveSecondWaitTime);
CaseTransaction.checkBulkCase(ccdCaseNumberFormatted, 'Case reference');
CaseTransaction.checkUnallocatedPayments('1', dcnNumber, '173.00', 'cheque');
CaseTransaction.checkUnallocatedPayments('1', dcnNumber, '200.00', 'cheque');
CaseTransaction.allocateToNewFee();
await AddFees.addFeesAmount('273.00', 'family', 'probate_registry');
FeesSummary.verifyFeeSummaryBulkScan(ccdCaseNumberFormatted, 'FEE0219', '273.00', false);
await AddFees.addFeesAmount('300.00', 'family', 'probate_registry');
FeesSummary.verifyFeeSummaryBulkScan(ccdCaseNumberFormatted, 'FEE0219', '300.00', false);
I.wait(CCPBATConstants.fiveSecondWaitTime);
FeesSummary.deductRemission();
I.wait(CCPBATConstants.fiveSecondWaitTime);
Remission.processRemission('FEE0219', '173');
Remission.processRemission('FEE0219', '200');
Remission.confirmProcessRemission();
I.wait(CCPBATConstants.tenSecondWaitTime);
FeesSummary.verifyFeeSummaryAfterRemission('FEE0219', 273.00', '£100.00', 173.00');
FeesSummary.verifyFeeSummaryAfterRemission('FEE0219', 300.00', '£100.00', 200.00');
FeesSummary.allocateBulkPayment();
ConfirmAssociation.verifyConfirmAssociationFullPayment('FEE0219', '1', '173.00', '273.00');
ConfirmAssociation.verifyConfirmAssociationFullPayment('FEE0219', '1', '200.00', '300.00');
ConfirmAssociation.confirmPayment();
I.wait(CCPBATConstants.tenSecondWaitTime);
CaseTransaction.checkBulkCaseSuccessPayment(ccdCaseNumberFormatted, 'Case reference');
CaseTransaction.checkIfBulkScanPaymentsAllocated(dcnNumber);
await CaseTransaction.validateCaseTransactionsDetails('173.00', '0', '100.00', '0.00', '0.00');
await CaseTransaction.validateCaseTransactionsDetails('200.00', '0', '100.00', '0.00', '0.00');
CaseTransaction.validatePaymentDetailsPageForRemission('HWF-A1B-23C', 'FEE0219', '£100.00');
await apiUtils.rollbackPaymentDateByCCDCaseNumber(ccdCaseNumber);
I.click('Back');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Scenario('Bulk scan cash Over Payment refund, preview RefundWhenContacted email

const bulkScanPaymentMethod = 'cash';
const emailAddress = stringUtil.getTodayDateAndTimeInString() + '[email protected]';
const totalAmount = 300;
const totalAmount = 327;

// Create Payment and back date for refund eligibility
const ccdAndDcn = await apiUtils.bulkScanNormalCcd('AA08', totalAmount, bulkScanPaymentMethod);
Expand All @@ -30,9 +30,9 @@ Scenario('Bulk scan cash Over Payment refund, preview RefundWhenContacted email
I.wait(CCPBATConstants.fiveSecondWaitTime);
await CaseTransaction.validateTransactionPageForOverPayments();
I.wait(CCPBATConstants.fiveSecondWaitTime);
await AddFees.addFeesOverPayment('273');
await AddFees.addFeesOverPayment('300');
I.wait(CCPBATConstants.tenSecondWaitTime);
await CaseTransaction.validateCaseTransactionsDetails('300.00', '0', '0.00', '0.00', '27.00');
await CaseTransaction.validateCaseTransactionsDetails('327.00', '0', '0.00', '0.00', '27.00');
await I.click('(//*[text()[contains(.,"Review")]])[2]');
I.wait(CCPBATConstants.fifteenSecondWaitTime);
const paymentRcReference = await I.grabTextFrom(CaseTransaction.locators.rc_reference);
Expand All @@ -57,13 +57,13 @@ Scenario('Bulk scan cash Over Payment refund, preview RefundWhenContacted email
I.fillField('//*[@id="email"]', emailAddress);
I.click('Continue');

const checkYourAnswersDataBeforeSubmitRefund = assertionData.checkYourAnswersBeforeSubmitRefund(paymentRcReference, 300.00', 273.00', 'Over payment', '£27.00', emailAddress, '', 'RefundWhenContacted');
const checkYourAnswersDataBeforeSubmitRefund = assertionData.checkYourAnswersBeforeSubmitRefund(paymentRcReference, 327.00', 300.00', 'Over payment', '£27.00', emailAddress, '', 'RefundWhenContacted');
const refundNotificationPreviewDataBeforeRefundRequest = assertionData.refundNotificationPreviewData(emailAddress, '', ccdCaseNumber, 'RF-****-****-****-****', '27', 'Refund for Overpayment', bulkScanPaymentMethod);

await InitiateRefunds.verifyCheckYourAnswersPageAndSubmitRefundForOverPaymentRefundOption(checkYourAnswersDataBeforeSubmitRefund, false, '', false, true, refundNotificationPreviewDataBeforeRefundRequest);
const refundReference = await InitiateRefunds.verifyRefundSubmittedPage('27.00');
I.wait(CCPBATConstants.tenSecondWaitTime);
await CaseTransaction.validateCaseTransactionsDetails('300.00', '0', '0.00', '0.00', '27.00');
await CaseTransaction.validateCaseTransactionsDetails('327.00', '0', '0.00', '0.00', '27.00');
await I.Logout();
I.clearCookie();
I.wait(CCPBATConstants.fiveSecondWaitTime);
Expand Down Expand Up @@ -92,7 +92,7 @@ Scenario('Bulk scan cash Over Payment refund, preview RefundWhenContacted email
I.wait(CCPBATConstants.tenSecondWaitTime);
await miscUtils.multipleSearch(CaseSearch, I, ccdCaseNumber);
I.wait(CCPBATConstants.fiveSecondWaitTime);
await CaseTransaction.validateCaseTransactionsDetails('300.00', '0', '0.00', '0.00', '27.00');
await CaseTransaction.validateCaseTransactionsDetails('327.00', '0', '0.00', '0.00', '27.00');
await I.click('(//*[text()[contains(.,"Review")]])[3]');
I.wait(CCPBATConstants.fifteenSecondWaitTime);
const reviewRefundDetailsDataAfterApproval = assertionData.reviewRefundDetailsDataAfterApproverAction(refundReference, paymentRcReference, 'Overpayment', '27.00', emailAddress, '', 'payments probate', 'approver probate');
Expand All @@ -104,7 +104,7 @@ Scenario('Bulk scan cash Over Payment refund, preview RefundWhenContacted email
I.wait(CCPBATConstants.fiveSecondWaitTime);
I.refreshPage();
I.wait(CCPBATConstants.fiveSecondWaitTime);
await CaseTransaction.validateCaseTransactionsDetails('300.00', '0', '0.00', '0.00', '0.00');
await CaseTransaction.validateCaseTransactionsDetails('327.00', '0', '0.00', '0.00', '0.00');

await I.Logout();
I.clearCookie();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ Scenario('PBA Partial Refund, preview SendRefund letter notification journey and

const postcode = 'TW4 7EZ';
// Create Payment and back date for refund eligibility
const totalAmount = 273;
const paymentDetails = await apiUtils.createAPBAPayment(totalAmount, 'FEE0219', '5', 1);
const totalAmount = '300.00';
const paymentDetails = await apiUtils.createAPBAPayment(totalAmount, 'FEE0219', '6', 1);
const ccdCaseNumber = `${paymentDetails.ccdCaseNumber}`;
const paymentRef = `${paymentDetails.paymentReference}`;
console.log('**** The value of the ccdCaseNumber - ' + ccdCaseNumber);
Expand All @@ -22,7 +22,7 @@ Scenario('PBA Partial Refund, preview SendRefund letter notification journey and
I.wait(CCPBATConstants.tenSecondWaitTime);
await miscUtils.multipleSearch(CaseSearch, I, ccdCaseNumber);
I.wait(CCPBATConstants.fiveSecondWaitTime);
await CaseTransaction.validateTransactionPageForPartialPayments();
await CaseTransaction.validateTransactionPageForPartialPayments(totalAmount);
I.wait(CCPBATConstants.fiveSecondWaitTime);
await I.click('(//*[text()[contains(.,"Review")]])[2]');
I.wait(CCPBATConstants.fifteenSecondWaitTime);
Expand All @@ -34,13 +34,13 @@ Scenario('PBA Partial Refund, preview SendRefund letter notification journey and
I.wait(CCPBATConstants.fiveSecondWaitTime);
await I.click('(//*[text()[contains(.,"Review")]])[2]');
I.wait(CCPBATConstants.fiveSecondWaitTime);
await PaymentHistory.validatePaymentDetailsForPartialPayment(paymentRef);
await PaymentHistory.validatePaymentDetailsForPartialPayment(paymentRef, totalAmount);
I.wait(CCPBATConstants.fiveSecondWaitTime);
}
// Submit refund
I.click('Issue refund');
I.wait(CCPBATConstants.fiveSecondWaitTime);
const reviewProcessRefundPageData = assertionData.reviewProcessRefundPageDataForFeeRefundSelection(paymentRcReference, 'Application for a grant of probate (Estate over 5000 GBP)', 273.00', 273.00', '200', '1');
const reviewProcessRefundPageData = assertionData.reviewProcessRefundPageDataForFeeRefundSelection(paymentRcReference, 'Application for a grant of probate (Estate over 5000 GBP)', 300.00', 300.00', '200', '1');
await InitiateRefunds.verifyProcessRefundPageForFeeRefundSelection(reviewProcessRefundPageData, ccdCaseNumber);
I.click('Continue');
I.wait(CCPBATConstants.fiveSecondWaitTime);
Expand All @@ -59,7 +59,7 @@ Scenario('PBA Partial Refund, preview SendRefund letter notification journey and
I.click('Continue');
I.wait(CCPBATConstants.fiveSecondWaitTime);

const checkYourAnswersDataBeforeSubmitRefund = assertionData.checkYourAnswersBeforeSubmitRefund(paymentRcReference, 273.00', '', refundDropDownReason + '-' + reasonText, '£200.00', '', postcode, 'SendRefund');
const checkYourAnswersDataBeforeSubmitRefund = assertionData.checkYourAnswersBeforeSubmitRefund(paymentRcReference, 300.00', '', refundDropDownReason + '-' + reasonText, '£200.00', '', postcode, 'SendRefund');
const refundNotificationPreviewDataBeforeRefundRequest = assertionData.refundNotificationPreviewData('', postcode, ccdCaseNumber, 'RF-****-****-****-****', '200', 'Other');

await InitiateRefunds.verifyCheckYourAnswersPageAndSubmitRefundForExactAmountPaidNonCashPartialOrFullRefunds(checkYourAnswersDataBeforeSubmitRefund, false, '', false, true, false, false, refundNotificationPreviewDataBeforeRefundRequest);
Expand Down
Loading

0 comments on commit 5b2e8ca

Please sign in to comment.