From 0afc241ed55e267534fc2c1ccb42ebccab29dd05 Mon Sep 17 00:00:00 2001 From: Ruby Lavender Date: Wed, 29 Jan 2025 17:48:31 +0000 Subject: [PATCH] feat(FN-3805): simplify test set up --- .../add-corrected-fee-to-existing-payment.spec.js | 4 ++-- .../add-payment-to-corrected-fee.spec.js | 4 ++-- .../delete-payment-from-corrected-fee.spec.js | 4 ++-- .../remove-corrected-fee-from-payment.spec.js | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/e2e-tests/tfm/cypress/e2e/journeys/utilisation-reports/fee-record-correction/feature-flag-enabled/to-do-amended-actions/add-corrected-fee-to-existing-payment.spec.js b/e2e-tests/tfm/cypress/e2e/journeys/utilisation-reports/fee-record-correction/feature-flag-enabled/to-do-amended-actions/add-corrected-fee-to-existing-payment.spec.js index 74068d26c6..dd34ebc888 100644 --- a/e2e-tests/tfm/cypress/e2e/journeys/utilisation-reports/fee-record-correction/feature-flag-enabled/to-do-amended-actions/add-corrected-fee-to-existing-payment.spec.js +++ b/e2e-tests/tfm/cypress/e2e/journeys/utilisation-reports/fee-record-correction/feature-flag-enabled/to-do-amended-actions/add-corrected-fee-to-existing-payment.spec.js @@ -34,8 +34,8 @@ context('When fee record correction feature flag is enabled', () => { const correction = FeeRecordCorrectionEntityMockBuilder.forFeeRecordAndIsCompleted(correctedFeeRecord, true) .withId(111) .withReasons([RECORD_CORRECTION_REASON.REPORTED_FEE_INCORRECT]) - .withCorrectedValues({ feesPaidToUkefForThePeriod: 200, feesPaidToUkefForThePeriodCurrency: null, facilityId: null, facilityUtilisation: null }) - .withPreviousValues({ feesPaidToUkefForThePeriod: 100, feesPaidToUkefForThePeriodCurrency: null, facilityId: null, facilityUtilisation: null }) + .withCorrectedValues({ feesPaidToUkefForThePeriod: 200 }) + .withPreviousValues({ feesPaidToUkefForThePeriod: 100 }) .build(); const feeRecordWithoutCorrection = FeeRecordEntityMockBuilder.forReport(report) diff --git a/e2e-tests/tfm/cypress/e2e/journeys/utilisation-reports/fee-record-correction/feature-flag-enabled/to-do-amended-actions/add-payment-to-corrected-fee.spec.js b/e2e-tests/tfm/cypress/e2e/journeys/utilisation-reports/fee-record-correction/feature-flag-enabled/to-do-amended-actions/add-payment-to-corrected-fee.spec.js index e609d62a8a..496bf7cbbb 100644 --- a/e2e-tests/tfm/cypress/e2e/journeys/utilisation-reports/fee-record-correction/feature-flag-enabled/to-do-amended-actions/add-payment-to-corrected-fee.spec.js +++ b/e2e-tests/tfm/cypress/e2e/journeys/utilisation-reports/fee-record-correction/feature-flag-enabled/to-do-amended-actions/add-payment-to-corrected-fee.spec.js @@ -53,8 +53,8 @@ context('When fee record correction feature flag is enabled', () => { const correctionTwo = FeeRecordCorrectionEntityMockBuilder.forFeeRecordAndIsCompleted(correctedFeeRecordOne, true) .withId(222) .withReasons([RECORD_CORRECTION_REASON.REPORTED_CURRENCY_INCORRECT]) - .withCorrectedValues({ feesPaidToUkefForThePeriod: null, feesPaidToUkefForThePeriodCurrency: CURRENCY.GBP, facilityId: null, facilityUtilisation: null }) - .withPreviousValues({ feesPaidToUkefForThePeriod: null, feesPaidToUkefForThePeriodCurrency: CURRENCY.EUR, facilityId: null, facilityUtilisation: null }) + .withCorrectedValues({ feesPaidToUkefForThePeriodCurrency: CURRENCY.GBP }) + .withPreviousValues({ feesPaidToUkefForThePeriodCurrency: CURRENCY.EUR }) .build(); const feeRecordWithoutCorrection = FeeRecordEntityMockBuilder.forReport(report) diff --git a/e2e-tests/tfm/cypress/e2e/journeys/utilisation-reports/fee-record-correction/feature-flag-enabled/to-do-amended-actions/delete-payment-from-corrected-fee.spec.js b/e2e-tests/tfm/cypress/e2e/journeys/utilisation-reports/fee-record-correction/feature-flag-enabled/to-do-amended-actions/delete-payment-from-corrected-fee.spec.js index 8a4c71f341..4012f49ef0 100644 --- a/e2e-tests/tfm/cypress/e2e/journeys/utilisation-reports/fee-record-correction/feature-flag-enabled/to-do-amended-actions/delete-payment-from-corrected-fee.spec.js +++ b/e2e-tests/tfm/cypress/e2e/journeys/utilisation-reports/fee-record-correction/feature-flag-enabled/to-do-amended-actions/delete-payment-from-corrected-fee.spec.js @@ -34,8 +34,8 @@ context('When fee record correction feature flag is enabled', () => { const correction = FeeRecordCorrectionEntityMockBuilder.forFeeRecordAndIsCompleted(correctedFeeRecord, true) .withId(111) .withReasons([RECORD_CORRECTION_REASON.REPORTED_FEE_INCORRECT]) - .withCorrectedValues({ feesPaidToUkefForThePeriod: 200, feesPaidToUkefForThePeriodCurrency: null, facilityId: null, facilityUtilisation: null }) - .withPreviousValues({ feesPaidToUkefForThePeriod: 100, feesPaidToUkefForThePeriodCurrency: null, facilityId: null, facilityUtilisation: null }) + .withCorrectedValues({ feesPaidToUkefForThePeriod: 200 }) + .withPreviousValues({ feesPaidToUkefForThePeriod: 100 }) .build(); const { utilisationReportPage, utilisationReportConfirmDeletePaymentPage, utilisationReportEditPaymentPage } = pages; diff --git a/e2e-tests/tfm/cypress/e2e/journeys/utilisation-reports/fee-record-correction/feature-flag-enabled/to-do-amended-actions/remove-corrected-fee-from-payment.spec.js b/e2e-tests/tfm/cypress/e2e/journeys/utilisation-reports/fee-record-correction/feature-flag-enabled/to-do-amended-actions/remove-corrected-fee-from-payment.spec.js index f254fbe6c7..4b49caf80d 100644 --- a/e2e-tests/tfm/cypress/e2e/journeys/utilisation-reports/fee-record-correction/feature-flag-enabled/to-do-amended-actions/remove-corrected-fee-from-payment.spec.js +++ b/e2e-tests/tfm/cypress/e2e/journeys/utilisation-reports/fee-record-correction/feature-flag-enabled/to-do-amended-actions/remove-corrected-fee-from-payment.spec.js @@ -34,8 +34,8 @@ context('When fee record correction feature flag is enabled', () => { const correction = FeeRecordCorrectionEntityMockBuilder.forFeeRecordAndIsCompleted(correctedFeeRecord, true) .withId(111) .withReasons([RECORD_CORRECTION_REASON.REPORTED_FEE_INCORRECT]) - .withCorrectedValues({ feesPaidToUkefForThePeriod: 200, feesPaidToUkefForThePeriodCurrency: null, facilityId: null, facilityUtilisation: null }) - .withPreviousValues({ feesPaidToUkefForThePeriod: 100, feesPaidToUkefForThePeriodCurrency: null, facilityId: null, facilityUtilisation: null }) + .withCorrectedValues({ feesPaidToUkefForThePeriod: 200 }) + .withPreviousValues({ feesPaidToUkefForThePeriod: 100 }) .build(); const feeRecordWithoutCorrection = FeeRecordEntityMockBuilder.forReport(report)