From e8daa6c86da83c3cce05cb967a654de0c3aedf41 Mon Sep 17 00:00:00 2001 From: Chris Sherlock <99017916+cshnimble@users.noreply.github.com> Date: Wed, 29 Nov 2023 16:23:34 +0000 Subject: [PATCH] Fix Cypress check order (#430) * Cypress: Update dependencies, migrate folder structure for cypress v10+ * Cypress - Move dep to dev dependency * Cypress: tidy up lingering unnecessary package.json info * Cypress: Add skeleton test classes for v4 endpoints * Add basic tests for v4 establishment endpoints * Add basic v4 trusts endpoints tests * Add more checks for trust and endpoint tests * Cypress: Reorder response checks from bulk trust endpoint --- CypressTests/cypress/e2e/v4/trusts.cy.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/CypressTests/cypress/e2e/v4/trusts.cy.js b/CypressTests/cypress/e2e/v4/trusts.cy.js index 166deb8b3..3d79da3a0 100644 --- a/CypressTests/cypress/e2e/v4/trusts.cy.js +++ b/CypressTests/cypress/e2e/v4/trusts.cy.js @@ -154,10 +154,11 @@ describe('Trusts endpoints tests', () => { }) .then((response) => { expect(response.status).to.eq(200); - expect(response.body[0].name).to.eq(groupName) - expect(response.body[0].ukprn).to.eq(ukprns[0]) - expect(response.body[1].name).to.eq('THE BISHOP FRASER TRUST') - expect(response.body[1].ukprn).to.eq(ukprns[1]) + // Response isn't in UKPRN order + expect(response.body[1].name).to.eq(groupName) + expect(response.body[1].ukprn).to.eq(ukprns[0]) + expect(response.body[0].name).to.eq('THE BISHOP FRASER TRUST') + expect(response.body[0].ukprn).to.eq(ukprns[1]) }) }) })