Skip to content

Commit

Permalink
add test case for multiple delivery addresses, where one is national
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewHEguardian committed Nov 3, 2023
1 parent 68c643f commit 9a44240
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions cypress/e2e/parallel-4/deliveryAddress.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,30 @@ describe('Delivery address', () => {
cy.findByText(/Changed address?/).should('exist');
});

it('Cannot update Guardian Weekly address, if also have National delivery', () => {
cy.intercept('GET', '/api/me/mma**', {
statusCode: 200,
body: toMembersDataApiResponse(
nationalDelivery(),
guardianWeeklyPaidByCard(),
supporterPlus(),
),
}).as('mma');

cy.visit('/guardianweekly');

cy.wait('@mma');

cy.findByText('Manage delivery address').click();

cy.intercept('GET', '/api/me/mma?productType=ContentSubscription', {
statusCode: 200,
body: toMembersDataApiResponse(nationalDelivery(), supporterPlus()),
});

cy.findByText(/Changed address?/).should('exist');
});

it('Shows updated address when returning to manage subscription page', () => {
cy.intercept('GET', '/api/me/mma', {
statusCode: 200,
Expand Down

0 comments on commit 9a44240

Please sign in to comment.