Skip to content

Commit 9249ab7

Browse files
Merge pull request #1230 from guardian/ahe/amend-holiday-stop-cypress
Check for 'patch' request in amend holiday stops cypress test
2 parents 958ea74 + 17bcbc7 commit 9249ab7

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

cypress/e2e/parallel-3/holidayStops.cy.ts

+11
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,13 @@ describe('Holiday stops', () => {
4141
message: 'success',
4242
},
4343
}).as('create_holiday_stop');
44+
45+
cy.intercept('PATCH', '/api/holidays/**', {
46+
statusCode: 200,
47+
body: {
48+
message: 'success',
49+
},
50+
}).as('amend_holiday_stop');
4451
});
4552

4653
it('can add a new holiday stop and add another', () => {
@@ -129,6 +136,10 @@ describe('Holiday stops', () => {
129136

130137
cy.get('@fetch_existing_holidays.all').should('have.length', 1);
131138
cy.get('@product_detail.all').should('have.length', 1);
139+
140+
cy.findByText('Confirm').click();
141+
cy.wait('@amend_holiday_stop');
142+
cy.findByText('Your schedule has been set');
132143
});
133144

134145
it('can delete an existing holiday stop from overview page', () => {

0 commit comments

Comments
 (0)