Skip to content

Commit

Permalink
feat(EMS-3338): no pdf - application submission - XLSX - export contr…
Browse files Browse the repository at this point in the history
…act (#2583)

* feat(EMS-3338): no pdf - application submission - xlsx - e2e improvements

* chore(EMS-3338): fix typo

* feat(EMS-3338): no pdf - application submission - xlsx - e2e improvements

* feat(EMS-3338): no pdf - application submission - xlsx - export contract section

* feat(EMS-3338): no pdf - application submission - xlsx - agent charges

* feat(EMS-3338): no pdf - application submission - xlsx - indexes

* feat(EMS-3338): no pdf - application submission - xlsx - export contract indexes

* feat(EMS-3338): remove commented code

* feat(EMS-3338): fix/update unit tests

* feat(EMS-3338): address todo comment

* feat(EMS-3338): minor code improvements

* feat(EMS-3338): fix linting issue
  • Loading branch information
ttbarnes authored Jun 18, 2024
1 parent 7925d2f commit 051c3c8
Show file tree
Hide file tree
Showing 48 changed files with 1,325 additions and 186 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ const completeSignInAndSubmitAnApplication = ({
completeSignInAndGoToApplication({ totalContractValueOverThreshold }).then(({ referenceNumber }) => {
if (policyType === APPLICATION.POLICY_TYPE.MULTIPLE) {
cy.completePrepareApplicationMultiplePolicyType({
agentIsCharging,
agentChargeMethodFixedSum,
agentChargeMethodPercentage,
agentIsCharging,
attemptedPrivateMarketCover,
alternativeBuyerCurrency,
buyerOutstandingPayments,
Expand All @@ -95,6 +95,7 @@ const completeSignInAndSubmitAnApplication = ({
cy.completePrepareApplicationSinglePolicyType({
agentChargeMethodFixedSum,
agentChargeMethodPercentage,
agentIsCharging,
alternativeBuyerCurrency,
attemptedPrivateMarketCover,
buyerFailedToPayOnTime,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import { APPLICATION } from '../../../../../../../constants';

context('Insurance - submit an application - Multiple policy type, fully populated export contract', () => {
let referenceNumber;

before(() => {
cy.completeSignInAndSubmitAnApplication({
policyType: APPLICATION.POLICY_TYPE.MULTIPLE,
totalContractValueOverThreshold: true,
attemptedPrivateMarketCover: true,
isUsingAgent: true,
agentIsCharging: true,
agentChargeMethodFixedSum: true,
}).then((refNumber) => {
referenceNumber = refNumber;
});
});

beforeEach(() => {
cy.saveSession();
});

after(() => {
cy.deleteApplication(referenceNumber);
});

it('should successfully submit the application and redirect to `application submitted`', () => {
cy.assertApplicationSubmittedUrl(referenceNumber);
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { APPLICATION } from '../../../../../../../constants';

context('Insurance - submit an application - Multiple policy type, minimal export contract', () => {
let referenceNumber;

before(() => {
cy.completeSignInAndSubmitAnApplication({
policyType: APPLICATION.POLICY_TYPE.MULTIPLE,
totalContractValueOverThreshold: false,
attemptedPrivateMarketCover: false,
isUsingAgent: false,
agentIsCharging: false,
}).then((refNumber) => {
referenceNumber = refNumber;
});
});

beforeEach(() => {
cy.saveSession();
});

after(() => {
cy.deleteApplication(referenceNumber);
});

it('should successfully submit the application and redirect to `application submitted`', () => {
cy.assertApplicationSubmittedUrl(referenceNumber);
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
context('Insurance - submit an application - Single policy type, fully populated export contract', () => {
let referenceNumber;

before(() => {
cy.completeSignInAndSubmitAnApplication({
totalContractValueOverThreshold: true,
attemptedPrivateMarketCover: true,
isUsingAgent: true,
agentIsCharging: true,
agentChargeMethodFixedSum: true,
}).then((refNumber) => {
referenceNumber = refNumber;
});
});

beforeEach(() => {
cy.saveSession();
});

after(() => {
cy.deleteApplication(referenceNumber);
});

it('should successfully submit the application and redirect to `application submitted`', () => {
cy.assertApplicationSubmittedUrl(referenceNumber);
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
context('Insurance - submit an application - Single policy type, minimal export contract', () => {
let referenceNumber;

before(() => {
cy.completeSignInAndSubmitAnApplication({
totalContractValueOverThreshold: false,
attemptedPrivateMarketCover: false,
isUsingAgent: false,
agentIsCharging: false,
}).then((refNumber) => {
referenceNumber = refNumber;
});
});

beforeEach(() => {
cy.saveSession();
});

after(() => {
cy.deleteApplication(referenceNumber);
});

it('should successfully submit the application and redirect to `application submitted`', () => {
cy.assertApplicationSubmittedUrl(referenceNumber);
});
});
Loading

0 comments on commit 051c3c8

Please sign in to comment.