From 3720c4e33daddc1098dae732173b7a8cad1ec17e Mon Sep 17 00:00:00 2001 From: Dan Good Date: Wed, 5 Feb 2025 10:26:20 +0000 Subject: [PATCH 01/10] Unskipped Cypress automation tests with value and got them working in Dev environment --- .../cypress/e2e/FAM-AddTrustKeyPerson.cy.js | 2 +- .../cypress/e2e/Get-UpdateApplication.cy.js | 2 +- CypressTests/cypress/e2e/Transfers-SAT.cy.js | 18 +++++++++--------- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/CypressTests/cypress/e2e/FAM-AddTrustKeyPerson.cy.js b/CypressTests/cypress/e2e/FAM-AddTrustKeyPerson.cy.js index f598c371c..622141d40 100644 --- a/CypressTests/cypress/e2e/FAM-AddTrustKeyPerson.cy.js +++ b/CypressTests/cypress/e2e/FAM-AddTrustKeyPerson.cy.js @@ -3,7 +3,7 @@ import { AuthorisedUserCanUpdateNewFAMTrustKeyPersonBodyPayload } from '../fixtu import { AuthorisedUserCannotCreateNewFAMTrustKeyPersonWITHINVALIDDOBBodyPayload } from '../fixtures/payloads/FAM-TrustKeyPerson/AuthorisedUserCannotCreateNewFAMTrustKeyPersonWITHINVALIDDOB.spec' import { UnauthorisedUserCannotUpdateNewFAMTrustKeyPersonBodyPayload } from '../fixtures/payloads/FAM-TrustKeyPerson/UnauthorisedUserCannotUpdateNewFAMTrustKeyPerson.spec' -describe.skip('Academisation API Testing - FAM - Add Trust Key Person', () => { +describe('Academisation API Testing - FAM - Add Trust Key Person', () => { let apiKey = Cypress.env('apiKey') let url = Cypress.env('url') let applicationNumber = 10038 diff --git a/CypressTests/cypress/e2e/Get-UpdateApplication.cy.js b/CypressTests/cypress/e2e/Get-UpdateApplication.cy.js index de8b29d2d..baef697f7 100644 --- a/CypressTests/cypress/e2e/Get-UpdateApplication.cy.js +++ b/CypressTests/cypress/e2e/Get-UpdateApplication.cy.js @@ -9,7 +9,7 @@ import { AuthorisedUserCannotUpdatePreviousFinancialYearEndDateToInvalidDateBody import { AuthorisedUserCannotUpdateCurrentFinancialYearEndDateToInvalidDateBodyPayload } from '../fixtures/payloads/AuthorisedUserCannotChangeCurrentFinancialYearEndDateToInvalidDate.spec' import { AuthorisedUserCannotUpdateNextFinancialYearEndDateToInvalidDateBodyPayload } from '../fixtures/payloads/AuthorisedUserCannotChangeNextFinancialYearEndDateToInvalidDate.spec' -describe.skip('Academisation API Testing', () => { +describe('Academisation API Testing', () => { let apiKey = Cypress.env('apiKey') let url = Cypress.env('url') let applicationNumber = 10002 diff --git a/CypressTests/cypress/e2e/Transfers-SAT.cy.js b/CypressTests/cypress/e2e/Transfers-SAT.cy.js index 2b63b5ee6..892e8f44b 100644 --- a/CypressTests/cypress/e2e/Transfers-SAT.cy.js +++ b/CypressTests/cypress/e2e/Transfers-SAT.cy.js @@ -8,7 +8,7 @@ import { AuthorisedUserCanSetAdditionalSchoolDataPayload } from '../fixtures/pay import { AuthorisedUserCanSetTrustInfoAndProjectDatesPayload } from '../fixtures/payloads/Transfers/AuthorisedUserCanSetTrustInfoAndProjectsDates.spec' import { AuthorisedUserCanAssignUserDataPayload } from '../fixtures/payloads/Transfers/AuthorisedUserCanAssignUser.spec' -describe.skip('Academisation API Testing - Transfers SAT Projects', () => { +describe('Academisation API Testing - Transfers SAT Projects', () => { let apiKey = Cypress.env('apiKey') let url = Cypress.env('url') let URN = Cypress.env('URN') @@ -268,7 +268,7 @@ it('PUT - Verify An Authorised User Can SET-RATIONALE On New SAT Transfer We Cre }) // TRY TO SET LEGAL REQUIREMENTS IN PUT REQUEST - it.skip('PUT - Verify An Authorised User Can SET-LEGAL REQUIREMENTS On New SAT Transfer We Created - 200 OK EXPECTED', () => { + it('PUT - Verify An Authorised User Can SET-LEGAL REQUIREMENTS On New SAT Transfer We Created - 200 OK EXPECTED', () => { cy.api({ url: url + '/transfer-project/' + URN + '/set-legal-requirements', method: 'PUT', @@ -285,7 +285,7 @@ it('PUT - Verify An Authorised User Can SET-RATIONALE On New SAT Transfer We Cre }) // CHECK UPDATED LEGAL REQUIREMENTS COME BACK CORRECTLY IN GET RESPONSE - it.skip('GET - Verify An Authorised User Can GET THE New SAT Transfer We Created WITH THE UPDATED LEGAL REQUIREMENTS - 200 OK EXPECTED', () => { + it('GET - Verify An Authorised User Can GET THE New SAT Transfer We Created WITH THE UPDATED LEGAL REQUIREMENTS - 200 OK EXPECTED', () => { cy.api({ url: url + '/transfer-project/' + URN, method: 'GET', @@ -342,7 +342,7 @@ it('PUT - Verify An Authorised User Can SET-RATIONALE On New SAT Transfer We Cre }) // TRY TO SET FEATURES IN PUT REQUEST - it.skip('PUT - Verify An Authorised User Can SET-FEATURES On New SAT Transfer We Created - 200 OK EXPECTED', () => { + it('PUT - Verify An Authorised User Can SET-FEATURES On New SAT Transfer We Created - 200 OK EXPECTED', () => { cy.api({ url: url + '/transfer-project/' + URN + '/set-features', method: 'PUT', @@ -359,7 +359,7 @@ it('PUT - Verify An Authorised User Can SET-RATIONALE On New SAT Transfer We Cre }) // CHECK UPDATED FEATURES COME BACK CORRECTLY IN GET RESPONSE - it.skip('GET - Verify An Authorised User Can GET THE New SAT Transfer We Created WITH THE UPDATED FEATURES - 200 OK EXPECTED', () => { + it('GET - Verify An Authorised User Can GET THE New SAT Transfer We Created WITH THE UPDATED FEATURES - 200 OK EXPECTED', () => { cy.api({ url: url + '/transfer-project/' + URN, method: 'GET', @@ -420,7 +420,7 @@ it('PUT - Verify An Authorised User Can SET-RATIONALE On New SAT Transfer We Cre }) // TRY TO SET BENEFITS IN PUT REQUEST - it.skip('PUT - Verify An Authorised User Can SET-BENEFITS On New SAT Transfer We Created - 200 OK EXPECTED', () => { + it('PUT - Verify An Authorised User Can SET-BENEFITS On New SAT Transfer We Created - 200 OK EXPECTED', () => { cy.api({ url: url + '/transfer-project/' + URN + '/set-benefits', method: 'PUT', @@ -437,7 +437,7 @@ it('PUT - Verify An Authorised User Can SET-RATIONALE On New SAT Transfer We Cre }) // CHECK SET BENEFITS IN GET RESPONSE... - it.skip('GET - Verify An Authorised User Can GET THE New SAT Transfer We Created WITH THE UPDATED BENEFITS - 200 OK EXPECTED', () => { + it('GET - Verify An Authorised User Can GET THE New SAT Transfer We Created WITH THE UPDATED BENEFITS - 200 OK EXPECTED', () => { cy.api({ url: url + '/transfer-project/' + URN, method: 'GET', @@ -610,7 +610,7 @@ it('PUT - Verify An Authorised User Can SET-RATIONALE On New SAT Transfer We Cre }) // TRY TO SET TRUST GENERAL INFO - it.skip('PUT - Verify An Authorised User Can SET-SCHOOL-TRUST-GENERAL-INFORMATION On New SAT Transfer We Created - 200 OK EXPECTED', () => { + it('PUT - Verify An Authorised User Can SET-SCHOOL-TRUST-GENERAL-INFORMATION On New SAT Transfer We Created - 200 OK EXPECTED', () => { cy.api({ url: url + '/transfer-project/' + URN + '/set-general-information', method: 'PUT', @@ -627,7 +627,7 @@ it('PUT - Verify An Authorised User Can SET-RATIONALE On New SAT Transfer We Cre }) // CHECK SET TRUST INFO IN GET RESPONSE... - it.skip('GET - Verify An Authorised User Can GET THE New SAT Transfer We Created WITH THE UPDATED SCHOOL ADDITIONAL DATA - 200 OK EXPECTED', () => { + it('GET - Verify An Authorised User Can GET THE New SAT Transfer We Created WITH THE UPDATED SCHOOL ADDITIONAL DATA - 200 OK EXPECTED', () => { cy.api({ url: url + '/transfer-project/' + URN, method: 'GET', From 966295918f4f78d43bf5fc9e3f3c50844c2c1754 Mon Sep 17 00:00:00 2001 From: Dan Good Date: Wed, 5 Feb 2025 10:37:44 +0000 Subject: [PATCH 02/10] Removed cy.skipWhen() function calls as they're now redundant and existed from way back when the Dev API key could be bypassed --- CypressTests/cypress/e2e/FAM-AddTrustKeyPerson.cy.js | 7 ------- CypressTests/cypress/e2e/Get-UpdateApplication.cy.js | 4 ---- 2 files changed, 11 deletions(-) diff --git a/CypressTests/cypress/e2e/FAM-AddTrustKeyPerson.cy.js b/CypressTests/cypress/e2e/FAM-AddTrustKeyPerson.cy.js index 622141d40..c7e0f2735 100644 --- a/CypressTests/cypress/e2e/FAM-AddTrustKeyPerson.cy.js +++ b/CypressTests/cypress/e2e/FAM-AddTrustKeyPerson.cy.js @@ -10,8 +10,6 @@ describe('Academisation API Testing - FAM - Add Trust Key Person', () => { let trustKeyPersonNumber = 0 it('POST - Verify An UnAuthorised User Is Unable To Create New FAM-Trust Key Person - Form-Trust Key-Person - 401 UNAUTHORISED Expected', function () { - cy.skipWhen(url.includes('d01'), this) - cy.api({ method: 'POST', url: url + '/application/' + applicationNumber + '/form-trust/key-person', @@ -59,8 +57,6 @@ describe('Academisation API Testing - FAM - Add Trust Key Person', () => { }) it('GET - Verify An UNAuthorised User Is UNAble To GET FAM-Trust Key PERSONS - Form-Trust Key-PersonS - 401 UNAUTHORISED Expected', function () { - cy.skipWhen(url.includes('d01'), this) - cy.api({ method: 'GET', url: url + '/application/' + applicationNumber + '/form-trust/key-person', @@ -90,8 +86,6 @@ describe('Academisation API Testing - FAM - Add Trust Key Person', () => { }) it('GET - Verify An UNAuthorised User Is UNAble To GET FAM-Trust Key Person - Form-Trust Key-Person - 401 UNAUTHORISED Expected', function () { - cy.skipWhen(url.includes('d01'), this) - cy.api({ method: 'GET', url: url + '/application/' + applicationNumber + '/form-trust/key-person' + '/' + 105, @@ -120,7 +114,6 @@ describe('Academisation API Testing - FAM - Add Trust Key Person', () => { }) it('PUT - Verify An UNAuthorised User Is UNAble To UPDATE a FAM-Trust Key Person - Form-Trust Key-Person - 401 UNAUTHORISED Expected', function () { - cy.skipWhen(url.includes('d01'), this) cy.log(JSON.stringify('Id = ' + Cypress.env('responseIDForRequest'))) cy.api({ diff --git a/CypressTests/cypress/e2e/Get-UpdateApplication.cy.js b/CypressTests/cypress/e2e/Get-UpdateApplication.cy.js index baef697f7..b154a512d 100644 --- a/CypressTests/cypress/e2e/Get-UpdateApplication.cy.js +++ b/CypressTests/cypress/e2e/Get-UpdateApplication.cy.js @@ -66,8 +66,6 @@ describe('Academisation API Testing', () => { }) it('GET - Verify An UNAUTHORISED USER CANNOT Retreive An Application - 401 UNAUTHORISED EXPECTED', function () { - cy.skipWhen(url.includes('d01'), this) - cy.api({ method: 'GET', url: url + '/application/' + applicationNumber, @@ -222,8 +220,6 @@ describe('Academisation API Testing', () => { }) it('PUT - Verify An UNAUTHORISED USER CANNOT Update An Application - 401 UNAUTHORISED EXPECTED', function () { - cy.skipWhen(url.includes('d01'), this) - cy.api({ method: 'PUT', url: url + '/application/' + applicationNumber, From b5a457254a3d0152d95a346d1ea040a7fbec8ba0 Mon Sep 17 00:00:00 2001 From: Dan Good Date: Wed, 5 Feb 2025 11:09:26 +0000 Subject: [PATCH 03/10] added logic to Get-UpdateApplication e2e spec file & AuthorisedUserCanUpdate payload to retrieve different applicationNumber based on environment url --- CypressTests/cypress/e2e/Get-UpdateApplication.cy.js | 2 +- .../cypress/fixtures/payloads/AuthorisedUserCanUpdate.spec.js | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CypressTests/cypress/e2e/Get-UpdateApplication.cy.js b/CypressTests/cypress/e2e/Get-UpdateApplication.cy.js index b154a512d..299f02806 100644 --- a/CypressTests/cypress/e2e/Get-UpdateApplication.cy.js +++ b/CypressTests/cypress/e2e/Get-UpdateApplication.cy.js @@ -12,7 +12,7 @@ import { AuthorisedUserCannotUpdateNextFinancialYearEndDateToInvalidDateBodyPayl describe('Academisation API Testing', () => { let apiKey = Cypress.env('apiKey') let url = Cypress.env('url') - let applicationNumber = 10002 + let applicationNumber = url.includes('test') ? 281 : 10002; let emailRegex = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/ let getDateTimestampFormatRegex = /^(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2})Z?$/ diff --git a/CypressTests/cypress/fixtures/payloads/AuthorisedUserCanUpdate.spec.js b/CypressTests/cypress/fixtures/payloads/AuthorisedUserCanUpdate.spec.js index efe871b2e..84416acda 100644 --- a/CypressTests/cypress/fixtures/payloads/AuthorisedUserCanUpdate.spec.js +++ b/CypressTests/cypress/fixtures/payloads/AuthorisedUserCanUpdate.spec.js @@ -1,6 +1,8 @@ +let url = Cypress.env('url'); +let applicationNumber = url.includes('test') ? 281 : 10002; const AuthorisedUserCanUpdatePayload = { - applicationId: 10002, + applicationId: applicationNumber, applicationType: 'joinAMat', applicationStatus: 'inProgress', contributors: [ From b53a88e48404e808d8ff200af1bf35922f918ac2 Mon Sep 17 00:00:00 2001 From: Dan Good Date: Wed, 5 Feb 2025 11:20:26 +0000 Subject: [PATCH 04/10] added logic to FAM-AddTrustKeyPerson spec file to use different applicationNumber based on environment URL --- CypressTests/cypress/e2e/FAM-AddTrustKeyPerson.cy.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CypressTests/cypress/e2e/FAM-AddTrustKeyPerson.cy.js b/CypressTests/cypress/e2e/FAM-AddTrustKeyPerson.cy.js index c7e0f2735..8fd70ea6a 100644 --- a/CypressTests/cypress/e2e/FAM-AddTrustKeyPerson.cy.js +++ b/CypressTests/cypress/e2e/FAM-AddTrustKeyPerson.cy.js @@ -6,7 +6,7 @@ import { UnauthorisedUserCannotUpdateNewFAMTrustKeyPersonBodyPayload } from '../ describe('Academisation API Testing - FAM - Add Trust Key Person', () => { let apiKey = Cypress.env('apiKey') let url = Cypress.env('url') - let applicationNumber = 10038 + let applicationNumber = url.includes('test') ? 10491 : 10038; let trustKeyPersonNumber = 0 it('POST - Verify An UnAuthorised User Is Unable To Create New FAM-Trust Key Person - Form-Trust Key-Person - 401 UNAUTHORISED Expected', function () { From 818f895add529da9ffc138bdbed9e362e1e4e02d Mon Sep 17 00:00:00 2001 From: Dan Good Date: Wed, 5 Feb 2025 12:35:46 +0000 Subject: [PATCH 05/10] Renamed FAM-TrustKeyPerson payloads from yucky .spec.js to proper .js suffixes --- ...son.spec.js => AuthorisedUserCanCreateNewFAMTrustKeyPerson.js} | 0 ...son.spec.js => AuthorisedUserCanUpdateNewFAMTrustKeyPerson.js} | 0 ...thorisedUserCannotCreateNewFAMTrustKeyPersonWITHINVALIDDOB.js} | 0 ...pec.js => UnauthorisedUserCannotUpdateNewFAMTrustKeyPerson.js} | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename CypressTests/cypress/fixtures/payloads/FAM-TrustKeyPerson/{AuthorisedUserCanCreateNewFAMTrustKeyPerson.spec.js => AuthorisedUserCanCreateNewFAMTrustKeyPerson.js} (100%) rename CypressTests/cypress/fixtures/payloads/FAM-TrustKeyPerson/{AuthorisedUserCanUpdateNewFAMTrustKeyPerson.spec.js => AuthorisedUserCanUpdateNewFAMTrustKeyPerson.js} (100%) rename CypressTests/cypress/fixtures/payloads/FAM-TrustKeyPerson/{AuthorisedUserCannotCreateNewFAMTrustKeyPersonWITHINVALIDDOB.spec.js => AuthorisedUserCannotCreateNewFAMTrustKeyPersonWITHINVALIDDOB.js} (100%) rename CypressTests/cypress/fixtures/payloads/FAM-TrustKeyPerson/{UnauthorisedUserCannotUpdateNewFAMTrustKeyPerson.spec.js => UnauthorisedUserCannotUpdateNewFAMTrustKeyPerson.js} (100%) diff --git a/CypressTests/cypress/fixtures/payloads/FAM-TrustKeyPerson/AuthorisedUserCanCreateNewFAMTrustKeyPerson.spec.js b/CypressTests/cypress/fixtures/payloads/FAM-TrustKeyPerson/AuthorisedUserCanCreateNewFAMTrustKeyPerson.js similarity index 100% rename from CypressTests/cypress/fixtures/payloads/FAM-TrustKeyPerson/AuthorisedUserCanCreateNewFAMTrustKeyPerson.spec.js rename to CypressTests/cypress/fixtures/payloads/FAM-TrustKeyPerson/AuthorisedUserCanCreateNewFAMTrustKeyPerson.js diff --git a/CypressTests/cypress/fixtures/payloads/FAM-TrustKeyPerson/AuthorisedUserCanUpdateNewFAMTrustKeyPerson.spec.js b/CypressTests/cypress/fixtures/payloads/FAM-TrustKeyPerson/AuthorisedUserCanUpdateNewFAMTrustKeyPerson.js similarity index 100% rename from CypressTests/cypress/fixtures/payloads/FAM-TrustKeyPerson/AuthorisedUserCanUpdateNewFAMTrustKeyPerson.spec.js rename to CypressTests/cypress/fixtures/payloads/FAM-TrustKeyPerson/AuthorisedUserCanUpdateNewFAMTrustKeyPerson.js diff --git a/CypressTests/cypress/fixtures/payloads/FAM-TrustKeyPerson/AuthorisedUserCannotCreateNewFAMTrustKeyPersonWITHINVALIDDOB.spec.js b/CypressTests/cypress/fixtures/payloads/FAM-TrustKeyPerson/AuthorisedUserCannotCreateNewFAMTrustKeyPersonWITHINVALIDDOB.js similarity index 100% rename from CypressTests/cypress/fixtures/payloads/FAM-TrustKeyPerson/AuthorisedUserCannotCreateNewFAMTrustKeyPersonWITHINVALIDDOB.spec.js rename to CypressTests/cypress/fixtures/payloads/FAM-TrustKeyPerson/AuthorisedUserCannotCreateNewFAMTrustKeyPersonWITHINVALIDDOB.js diff --git a/CypressTests/cypress/fixtures/payloads/FAM-TrustKeyPerson/UnauthorisedUserCannotUpdateNewFAMTrustKeyPerson.spec.js b/CypressTests/cypress/fixtures/payloads/FAM-TrustKeyPerson/UnauthorisedUserCannotUpdateNewFAMTrustKeyPerson.js similarity index 100% rename from CypressTests/cypress/fixtures/payloads/FAM-TrustKeyPerson/UnauthorisedUserCannotUpdateNewFAMTrustKeyPerson.spec.js rename to CypressTests/cypress/fixtures/payloads/FAM-TrustKeyPerson/UnauthorisedUserCannotUpdateNewFAMTrustKeyPerson.js From f4c834a80197fedc821c9dd0df6aea7176519e2b Mon Sep 17 00:00:00 2001 From: Dan Good Date: Wed, 5 Feb 2025 12:40:02 +0000 Subject: [PATCH 06/10] Renamed more payload files from yucky .spec.js to standard .js --- ...AuthorisedUserCanUpdate.spec.js => AuthorisedUserCanUpdate.js} | 0 ...edUserCannotChangeCurrentFinancialYearEndDateToInvalidDate.js} | 0 ...risedUserCannotChangeNextFinancialYearEndDateToInvalidDate.js} | 0 ...dUserCannotChangePreviousFinancialYearEndDateToInvalidDate.js} | 0 ...thorisedUserCannotChangeSacreExemptionEndDateToInvalidDate.js} | 0 ...orisedUserCannotChangeTheirContributorsEmailToAnotherEmail.js} | 0 ...orisedUserCannotChangeTheirContributorsEmailToInvalidEmail.js} | 0 ...=> AuthorisedUserCannotChangeWorksPlannedDateToInvalidDate.js} | 0 ...serCannotUpdateSchoolConversionTargetDateToInvalidDateBody.js} | 0 ...nnotUpdateBody.spec.js => UnauthorisedUserCannotUpdateBody.js} | 0 10 files changed, 0 insertions(+), 0 deletions(-) rename CypressTests/cypress/fixtures/payloads/{AuthorisedUserCanUpdate.spec.js => AuthorisedUserCanUpdate.js} (100%) rename CypressTests/cypress/fixtures/payloads/{AuthorisedUserCannotChangeCurrentFinancialYearEndDateToInvalidDate.spec.js => AuthorisedUserCannotChangeCurrentFinancialYearEndDateToInvalidDate.js} (100%) rename CypressTests/cypress/fixtures/payloads/{AuthorisedUserCannotChangeNextFinancialYearEndDateToInvalidDate.spec.js => AuthorisedUserCannotChangeNextFinancialYearEndDateToInvalidDate.js} (100%) rename CypressTests/cypress/fixtures/payloads/{AuthorisedUserCannotChangePreviousFinancialYearEndDateToInvalidDate.spec.js => AuthorisedUserCannotChangePreviousFinancialYearEndDateToInvalidDate.js} (100%) rename CypressTests/cypress/fixtures/payloads/{AuthorisedUserCannotChangeSacreExemptionEndDateToInvalidDate.spec.js => AuthorisedUserCannotChangeSacreExemptionEndDateToInvalidDate.js} (100%) rename CypressTests/cypress/fixtures/payloads/{AuthorisedUserCannotChangeTheirContributorsEmailToAnotherEmail.spec.js => AuthorisedUserCannotChangeTheirContributorsEmailToAnotherEmail.js} (100%) rename CypressTests/cypress/fixtures/payloads/{AuthorisedUserCannotChangeTheirContributorsEmailToInvalidEmail.spec.js => AuthorisedUserCannotChangeTheirContributorsEmailToInvalidEmail.js} (100%) rename CypressTests/cypress/fixtures/payloads/{AuthorisedUserCannotChangeWorksPlannedDateToInvalidDate.spec.js => AuthorisedUserCannotChangeWorksPlannedDateToInvalidDate.js} (100%) rename CypressTests/cypress/fixtures/payloads/{AuthorisedUserCannotUpdateSchoolConversionTargetDateToInvalidDateBody.spec.js => AuthorisedUserCannotUpdateSchoolConversionTargetDateToInvalidDateBody.js} (100%) rename CypressTests/cypress/fixtures/payloads/{UnauthorisedUserCannotUpdateBody.spec.js => UnauthorisedUserCannotUpdateBody.js} (100%) diff --git a/CypressTests/cypress/fixtures/payloads/AuthorisedUserCanUpdate.spec.js b/CypressTests/cypress/fixtures/payloads/AuthorisedUserCanUpdate.js similarity index 100% rename from CypressTests/cypress/fixtures/payloads/AuthorisedUserCanUpdate.spec.js rename to CypressTests/cypress/fixtures/payloads/AuthorisedUserCanUpdate.js diff --git a/CypressTests/cypress/fixtures/payloads/AuthorisedUserCannotChangeCurrentFinancialYearEndDateToInvalidDate.spec.js b/CypressTests/cypress/fixtures/payloads/AuthorisedUserCannotChangeCurrentFinancialYearEndDateToInvalidDate.js similarity index 100% rename from CypressTests/cypress/fixtures/payloads/AuthorisedUserCannotChangeCurrentFinancialYearEndDateToInvalidDate.spec.js rename to CypressTests/cypress/fixtures/payloads/AuthorisedUserCannotChangeCurrentFinancialYearEndDateToInvalidDate.js diff --git a/CypressTests/cypress/fixtures/payloads/AuthorisedUserCannotChangeNextFinancialYearEndDateToInvalidDate.spec.js b/CypressTests/cypress/fixtures/payloads/AuthorisedUserCannotChangeNextFinancialYearEndDateToInvalidDate.js similarity index 100% rename from CypressTests/cypress/fixtures/payloads/AuthorisedUserCannotChangeNextFinancialYearEndDateToInvalidDate.spec.js rename to CypressTests/cypress/fixtures/payloads/AuthorisedUserCannotChangeNextFinancialYearEndDateToInvalidDate.js diff --git a/CypressTests/cypress/fixtures/payloads/AuthorisedUserCannotChangePreviousFinancialYearEndDateToInvalidDate.spec.js b/CypressTests/cypress/fixtures/payloads/AuthorisedUserCannotChangePreviousFinancialYearEndDateToInvalidDate.js similarity index 100% rename from CypressTests/cypress/fixtures/payloads/AuthorisedUserCannotChangePreviousFinancialYearEndDateToInvalidDate.spec.js rename to CypressTests/cypress/fixtures/payloads/AuthorisedUserCannotChangePreviousFinancialYearEndDateToInvalidDate.js diff --git a/CypressTests/cypress/fixtures/payloads/AuthorisedUserCannotChangeSacreExemptionEndDateToInvalidDate.spec.js b/CypressTests/cypress/fixtures/payloads/AuthorisedUserCannotChangeSacreExemptionEndDateToInvalidDate.js similarity index 100% rename from CypressTests/cypress/fixtures/payloads/AuthorisedUserCannotChangeSacreExemptionEndDateToInvalidDate.spec.js rename to CypressTests/cypress/fixtures/payloads/AuthorisedUserCannotChangeSacreExemptionEndDateToInvalidDate.js diff --git a/CypressTests/cypress/fixtures/payloads/AuthorisedUserCannotChangeTheirContributorsEmailToAnotherEmail.spec.js b/CypressTests/cypress/fixtures/payloads/AuthorisedUserCannotChangeTheirContributorsEmailToAnotherEmail.js similarity index 100% rename from CypressTests/cypress/fixtures/payloads/AuthorisedUserCannotChangeTheirContributorsEmailToAnotherEmail.spec.js rename to CypressTests/cypress/fixtures/payloads/AuthorisedUserCannotChangeTheirContributorsEmailToAnotherEmail.js diff --git a/CypressTests/cypress/fixtures/payloads/AuthorisedUserCannotChangeTheirContributorsEmailToInvalidEmail.spec.js b/CypressTests/cypress/fixtures/payloads/AuthorisedUserCannotChangeTheirContributorsEmailToInvalidEmail.js similarity index 100% rename from CypressTests/cypress/fixtures/payloads/AuthorisedUserCannotChangeTheirContributorsEmailToInvalidEmail.spec.js rename to CypressTests/cypress/fixtures/payloads/AuthorisedUserCannotChangeTheirContributorsEmailToInvalidEmail.js diff --git a/CypressTests/cypress/fixtures/payloads/AuthorisedUserCannotChangeWorksPlannedDateToInvalidDate.spec.js b/CypressTests/cypress/fixtures/payloads/AuthorisedUserCannotChangeWorksPlannedDateToInvalidDate.js similarity index 100% rename from CypressTests/cypress/fixtures/payloads/AuthorisedUserCannotChangeWorksPlannedDateToInvalidDate.spec.js rename to CypressTests/cypress/fixtures/payloads/AuthorisedUserCannotChangeWorksPlannedDateToInvalidDate.js diff --git a/CypressTests/cypress/fixtures/payloads/AuthorisedUserCannotUpdateSchoolConversionTargetDateToInvalidDateBody.spec.js b/CypressTests/cypress/fixtures/payloads/AuthorisedUserCannotUpdateSchoolConversionTargetDateToInvalidDateBody.js similarity index 100% rename from CypressTests/cypress/fixtures/payloads/AuthorisedUserCannotUpdateSchoolConversionTargetDateToInvalidDateBody.spec.js rename to CypressTests/cypress/fixtures/payloads/AuthorisedUserCannotUpdateSchoolConversionTargetDateToInvalidDateBody.js diff --git a/CypressTests/cypress/fixtures/payloads/UnauthorisedUserCannotUpdateBody.spec.js b/CypressTests/cypress/fixtures/payloads/UnauthorisedUserCannotUpdateBody.js similarity index 100% rename from CypressTests/cypress/fixtures/payloads/UnauthorisedUserCannotUpdateBody.spec.js rename to CypressTests/cypress/fixtures/payloads/UnauthorisedUserCannotUpdateBody.js From ec0bdece04d07637e143eba18bda0251c14429f2 Mon Sep 17 00:00:00 2001 From: Dan Good Date: Wed, 5 Feb 2025 12:44:33 +0000 Subject: [PATCH 07/10] Removed unnecessary .spec suffixes from import statements in Cypress spec files --- .../cypress/e2e/FAM-AddTrustKeyPerson.cy.js | 8 ++++---- .../cypress/e2e/Get-UpdateApplication.cy.js | 16 ++++++++-------- CypressTests/cypress/e2e/Transfers-MAT.cy.js | 18 +++++++++--------- CypressTests/cypress/e2e/Transfers-SAT.cy.js | 18 +++++++++--------- 4 files changed, 30 insertions(+), 30 deletions(-) diff --git a/CypressTests/cypress/e2e/FAM-AddTrustKeyPerson.cy.js b/CypressTests/cypress/e2e/FAM-AddTrustKeyPerson.cy.js index 8fd70ea6a..e5fcb28ac 100644 --- a/CypressTests/cypress/e2e/FAM-AddTrustKeyPerson.cy.js +++ b/CypressTests/cypress/e2e/FAM-AddTrustKeyPerson.cy.js @@ -1,7 +1,7 @@ -import { AuthorisedUserCanCreateNewFAMTrustKeyPersonBodyPayload } from '../fixtures/payloads/FAM-TrustKeyPerson/AuthorisedUserCanCreateNewFAMTrustKeyPerson.spec' -import { AuthorisedUserCanUpdateNewFAMTrustKeyPersonBodyPayload } from '../fixtures/payloads/FAM-TrustKeyPerson/AuthorisedUserCanUpdateNewFAMTrustKeyPerson.spec' -import { AuthorisedUserCannotCreateNewFAMTrustKeyPersonWITHINVALIDDOBBodyPayload } from '../fixtures/payloads/FAM-TrustKeyPerson/AuthorisedUserCannotCreateNewFAMTrustKeyPersonWITHINVALIDDOB.spec' -import { UnauthorisedUserCannotUpdateNewFAMTrustKeyPersonBodyPayload } from '../fixtures/payloads/FAM-TrustKeyPerson/UnauthorisedUserCannotUpdateNewFAMTrustKeyPerson.spec' +import { AuthorisedUserCanCreateNewFAMTrustKeyPersonBodyPayload } from '../fixtures/payloads/FAM-TrustKeyPerson/AuthorisedUserCanCreateNewFAMTrustKeyPerson' +import { AuthorisedUserCanUpdateNewFAMTrustKeyPersonBodyPayload } from '../fixtures/payloads/FAM-TrustKeyPerson/AuthorisedUserCanUpdateNewFAMTrustKeyPerson' +import { AuthorisedUserCannotCreateNewFAMTrustKeyPersonWITHINVALIDDOBBodyPayload } from '../fixtures/payloads/FAM-TrustKeyPerson/AuthorisedUserCannotCreateNewFAMTrustKeyPersonWITHINVALIDDOB' +import { UnauthorisedUserCannotUpdateNewFAMTrustKeyPersonBodyPayload } from '../fixtures/payloads/FAM-TrustKeyPerson/UnauthorisedUserCannotUpdateNewFAMTrustKeyPerson' describe('Academisation API Testing - FAM - Add Trust Key Person', () => { let apiKey = Cypress.env('apiKey') diff --git a/CypressTests/cypress/e2e/Get-UpdateApplication.cy.js b/CypressTests/cypress/e2e/Get-UpdateApplication.cy.js index 299f02806..ee7354125 100644 --- a/CypressTests/cypress/e2e/Get-UpdateApplication.cy.js +++ b/CypressTests/cypress/e2e/Get-UpdateApplication.cy.js @@ -1,13 +1,13 @@ import { UnauthorisedUserCannotUpdatePayload } from '../fixtures/payloads/UnauthorisedUserCannotUpdateBody.spec' import { AuthorisedUserCanUpdatePayload } from '../fixtures/payloads/AuthorisedUserCanUpdate.spec' -import { AuthorisedUserCannotUpdateTheirContributorsEmailToAnotherEmailBodyPayload } from '../fixtures/payloads/AuthorisedUserCannotChangeTheirContributorsEmailToAnotherEmail.spec' -import { AuthorisedUserCannotUpdateTheirContributorsEmailToInvalidEmailBodyPayload } from '../fixtures/payloads/AuthorisedUserCannotChangeTheirContributorsEmailToInvalidEmail.spec' -import { AuthorisedUserCannotUpdateWorksPlannedDateToInvalidDateBodyPayload } from '../fixtures/payloads/AuthorisedUserCannotChangeWorksPlannedDateToInvalidDate.spec' -import { AuthorisedUserCannotUpdateSacreExemptionEndDateToInvalidDateBodyPayload } from '../fixtures/payloads/AuthorisedUserCannotChangeSacreExemptionEndDateToInvalidDate.spec' -import { AuthorisedUserCannotUpdateSchoolConversionTargetDateToInvalidDateBodyPayload } from '../fixtures/payloads/AuthorisedUserCannotUpdateSchoolConversionTargetDateToInvalidDateBody.spec' -import { AuthorisedUserCannotUpdatePreviousFinancialYearEndDateToInvalidDateBodyPayload } from '../fixtures/payloads/AuthorisedUserCannotChangePreviousFinancialYearEndDateToInvalidDate.spec' -import { AuthorisedUserCannotUpdateCurrentFinancialYearEndDateToInvalidDateBodyPayload } from '../fixtures/payloads/AuthorisedUserCannotChangeCurrentFinancialYearEndDateToInvalidDate.spec' -import { AuthorisedUserCannotUpdateNextFinancialYearEndDateToInvalidDateBodyPayload } from '../fixtures/payloads/AuthorisedUserCannotChangeNextFinancialYearEndDateToInvalidDate.spec' +import { AuthorisedUserCannotUpdateTheirContributorsEmailToAnotherEmailBodyPayload } from '../fixtures/payloads/AuthorisedUserCannotChangeTheirContributorsEmailToAnotherEmail' +import { AuthorisedUserCannotUpdateTheirContributorsEmailToInvalidEmailBodyPayload } from '../fixtures/payloads/AuthorisedUserCannotChangeTheirContributorsEmailToInvalidEmail' +import { AuthorisedUserCannotUpdateWorksPlannedDateToInvalidDateBodyPayload } from '../fixtures/payloads/AuthorisedUserCannotChangeWorksPlannedDateToInvalidDate' +import { AuthorisedUserCannotUpdateSacreExemptionEndDateToInvalidDateBodyPayload } from '../fixtures/payloads/AuthorisedUserCannotChangeSacreExemptionEndDateToInvalidDate' +import { AuthorisedUserCannotUpdateSchoolConversionTargetDateToInvalidDateBodyPayload } from '../fixtures/payloads/AuthorisedUserCannotUpdateSchoolConversionTargetDateToInvalidDateBody' +import { AuthorisedUserCannotUpdatePreviousFinancialYearEndDateToInvalidDateBodyPayload } from '../fixtures/payloads/AuthorisedUserCannotChangePreviousFinancialYearEndDateToInvalidDate' +import { AuthorisedUserCannotUpdateCurrentFinancialYearEndDateToInvalidDateBodyPayload } from '../fixtures/payloads/AuthorisedUserCannotChangeCurrentFinancialYearEndDateToInvalidDate' +import { AuthorisedUserCannotUpdateNextFinancialYearEndDateToInvalidDateBodyPayload } from '../fixtures/payloads/AuthorisedUserCannotChangeNextFinancialYearEndDateToInvalidDate' describe('Academisation API Testing', () => { let apiKey = Cypress.env('apiKey') diff --git a/CypressTests/cypress/e2e/Transfers-MAT.cy.js b/CypressTests/cypress/e2e/Transfers-MAT.cy.js index c81f5ba26..0e8f13226 100644 --- a/CypressTests/cypress/e2e/Transfers-MAT.cy.js +++ b/CypressTests/cypress/e2e/Transfers-MAT.cy.js @@ -1,12 +1,12 @@ -import { AuthorisedUserCanCreateNewMATTransferPayload } from '../fixtures/payloads/Transfers/AuthorisedUserCanCreateNewMATTransfer.spec' -import { AuthorisedUserCanSetRationalePayload } from '../fixtures/payloads/Transfers/AuthorisedUserCanSetRationale.spec' -import { AuthorisedUserCanSetTransferDatesPayload } from '../fixtures/payloads/Transfers/AuthorisedUserCanSetTransferDates.spec' -import { AuthorisedUserCanSetLegalRequirementsPayload } from '../fixtures/payloads/Transfers/AuthorisedUserCanSetLegalRequirements.spec' -import { AuthorisedUserCanSetFeaturesPayload } from '../fixtures/payloads/Transfers/AuthorisedUserCanSetFeatures.spec' -import { AuthorisedUserCanSetBenefitsPayload } from '../fixtures/payloads/Transfers/AuthorisedUserCanSetBenefits.spec' -import { AuthorisedUserCanSetAdditionalSchoolDataPayload } from '../fixtures/payloads/Transfers/AuthorisedUserCanSetAdditionalSchoolData.spec' -import { AuthorisedUserCanSetTrustInfoAndProjectDatesPayload } from '../fixtures/payloads/Transfers/AuthorisedUserCanSetTrustInfoAndProjectsDates.spec' -import { AuthorisedUserCanAssignUserDataPayload } from '../fixtures/payloads/Transfers/AuthorisedUserCanAssignUser.spec' +import { AuthorisedUserCanCreateNewMATTransferPayload } from '../fixtures/payloads/Transfers/AuthorisedUserCanCreateNewMATTransfer' +import { AuthorisedUserCanSetRationalePayload } from '../fixtures/payloads/Transfers/AuthorisedUserCanSetRationale' +import { AuthorisedUserCanSetTransferDatesPayload } from '../fixtures/payloads/Transfers/AuthorisedUserCanSetTransferDates' +import { AuthorisedUserCanSetLegalRequirementsPayload } from '../fixtures/payloads/Transfers/AuthorisedUserCanSetLegalRequirements' +import { AuthorisedUserCanSetFeaturesPayload } from '../fixtures/payloads/Transfers/AuthorisedUserCanSetFeatures' +import { AuthorisedUserCanSetBenefitsPayload } from '../fixtures/payloads/Transfers/AuthorisedUserCanSetBenefits' +import { AuthorisedUserCanSetAdditionalSchoolDataPayload } from '../fixtures/payloads/Transfers/AuthorisedUserCanSetAdditionalSchoolData' +import { AuthorisedUserCanSetTrustInfoAndProjectDatesPayload } from '../fixtures/payloads/Transfers/AuthorisedUserCanSetTrustInfoAndProjectsDates' +import { AuthorisedUserCanAssignUserDataPayload } from '../fixtures/payloads/Transfers/AuthorisedUserCanAssignUser' describe.skip('Academisation API Testing - Transfers MAT Projects', () => { let apiKey = Cypress.env('apiKey') diff --git a/CypressTests/cypress/e2e/Transfers-SAT.cy.js b/CypressTests/cypress/e2e/Transfers-SAT.cy.js index 892e8f44b..b7b88e53a 100644 --- a/CypressTests/cypress/e2e/Transfers-SAT.cy.js +++ b/CypressTests/cypress/e2e/Transfers-SAT.cy.js @@ -1,12 +1,12 @@ -import { AuthorisedUserCanCreateNewSATTransferPayload } from '../fixtures/payloads/Transfers/AuthorisedUserCanCreateNewSATTransfer.spec' -import { AuthorisedUserCanSetRationalePayload } from '../fixtures/payloads/Transfers/AuthorisedUserCanSetRationale.spec' -import { AuthorisedUserCanSetTransferDatesPayload } from '../fixtures/payloads/Transfers/AuthorisedUserCanSetTransferDates.spec' -import { AuthorisedUserCanSetLegalRequirementsPayload } from '../fixtures/payloads/Transfers/AuthorisedUserCanSetLegalRequirements.spec' -import { AuthorisedUserCanSetFeaturesPayload } from '../fixtures/payloads/Transfers/AuthorisedUserCanSetFeatures.spec' -import { AuthorisedUserCanSetBenefitsPayload } from '../fixtures/payloads/Transfers/AuthorisedUserCanSetBenefits.spec' -import { AuthorisedUserCanSetAdditionalSchoolDataPayload } from '../fixtures/payloads/Transfers/AuthorisedUserCanSetAdditionalSchoolData.spec' -import { AuthorisedUserCanSetTrustInfoAndProjectDatesPayload } from '../fixtures/payloads/Transfers/AuthorisedUserCanSetTrustInfoAndProjectsDates.spec' -import { AuthorisedUserCanAssignUserDataPayload } from '../fixtures/payloads/Transfers/AuthorisedUserCanAssignUser.spec' +import { AuthorisedUserCanCreateNewSATTransferPayload } from '../fixtures/payloads/Transfers/AuthorisedUserCanCreateNewSATTransfer' +import { AuthorisedUserCanSetRationalePayload } from '../fixtures/payloads/Transfers/AuthorisedUserCanSetRationale' +import { AuthorisedUserCanSetTransferDatesPayload } from '../fixtures/payloads/Transfers/AuthorisedUserCanSetTransferDates' +import { AuthorisedUserCanSetLegalRequirementsPayload } from '../fixtures/payloads/Transfers/AuthorisedUserCanSetLegalRequirements' +import { AuthorisedUserCanSetFeaturesPayload } from '../fixtures/payloads/Transfers/AuthorisedUserCanSetFeatures' +import { AuthorisedUserCanSetBenefitsPayload } from '../fixtures/payloads/Transfers/AuthorisedUserCanSetBenefits' +import { AuthorisedUserCanSetAdditionalSchoolDataPayload } from '../fixtures/payloads/Transfers/AuthorisedUserCanSetAdditionalSchoolData' +import { AuthorisedUserCanSetTrustInfoAndProjectDatesPayload } from '../fixtures/payloads/Transfers/AuthorisedUserCanSetTrustInfoAndProjectsDates' +import { AuthorisedUserCanAssignUserDataPayload } from '../fixtures/payloads/Transfers/AuthorisedUserCanAssignUser' describe('Academisation API Testing - Transfers SAT Projects', () => { let apiKey = Cypress.env('apiKey') From 8a078c06febbdab19971f98c64f4b939b25b86de Mon Sep 17 00:00:00 2001 From: Dan Good Date: Wed, 5 Feb 2025 12:50:02 +0000 Subject: [PATCH 08/10] Renamed a couple of missed import statements to correctly EXCLUDE the .spec suffix --- CypressTests/cypress/e2e/Get-UpdateApplication.cy.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CypressTests/cypress/e2e/Get-UpdateApplication.cy.js b/CypressTests/cypress/e2e/Get-UpdateApplication.cy.js index ee7354125..0e4caafe6 100644 --- a/CypressTests/cypress/e2e/Get-UpdateApplication.cy.js +++ b/CypressTests/cypress/e2e/Get-UpdateApplication.cy.js @@ -1,5 +1,5 @@ -import { UnauthorisedUserCannotUpdatePayload } from '../fixtures/payloads/UnauthorisedUserCannotUpdateBody.spec' -import { AuthorisedUserCanUpdatePayload } from '../fixtures/payloads/AuthorisedUserCanUpdate.spec' +import { UnauthorisedUserCannotUpdatePayload } from '../fixtures/payloads/UnauthorisedUserCannotUpdateBody' +import { AuthorisedUserCanUpdatePayload } from '../fixtures/payloads/AuthorisedUserCanUpdate' import { AuthorisedUserCannotUpdateTheirContributorsEmailToAnotherEmailBodyPayload } from '../fixtures/payloads/AuthorisedUserCannotChangeTheirContributorsEmailToAnotherEmail' import { AuthorisedUserCannotUpdateTheirContributorsEmailToInvalidEmailBodyPayload } from '../fixtures/payloads/AuthorisedUserCannotChangeTheirContributorsEmailToInvalidEmail' import { AuthorisedUserCannotUpdateWorksPlannedDateToInvalidDateBodyPayload } from '../fixtures/payloads/AuthorisedUserCannotChangeWorksPlannedDateToInvalidDate' From 11b28196eca89edc816478677d47da2c99b6929a Mon Sep 17 00:00:00 2001 From: Dan Good Date: Wed, 5 Feb 2025 14:09:44 +0000 Subject: [PATCH 09/10] Renamed Transfers folder payloads to not have .spec suffixes --- ...edUserCanAssignUser.spec.js => AuthorisedUserCanAssignUser.js} | 0 ...TTransfer.spec.js => AuthorisedUserCanCreateNewMATTransfer.js} | 0 ...TTransfer.spec.js => AuthorisedUserCanCreateNewSATTransfer.js} | 0 ...olData.spec.js => AuthorisedUserCanSetAdditionalSchoolData.js} | 0 ...UserCanSetBenefits.spec.js => AuthorisedUserCanSetBenefits.js} | 0 ...UserCanSetFeatures.spec.js => AuthorisedUserCanSetFeatures.js} | 0 ...uirements.spec.js => AuthorisedUserCanSetLegalRequirements.js} | 0 ...erCanSetRationale.spec.js => AuthorisedUserCanSetRationale.js} | 0 ...TransferDates.spec.js => AuthorisedUserCanSetTransferDates.js} | 0 ...s.spec.js => AuthorisedUserCanSetTrustInfoAndProjectsDates.js} | 0 10 files changed, 0 insertions(+), 0 deletions(-) rename CypressTests/cypress/fixtures/payloads/Transfers/{AuthorisedUserCanAssignUser.spec.js => AuthorisedUserCanAssignUser.js} (100%) rename CypressTests/cypress/fixtures/payloads/Transfers/{AuthorisedUserCanCreateNewMATTransfer.spec.js => AuthorisedUserCanCreateNewMATTransfer.js} (100%) rename CypressTests/cypress/fixtures/payloads/Transfers/{AuthorisedUserCanCreateNewSATTransfer.spec.js => AuthorisedUserCanCreateNewSATTransfer.js} (100%) rename CypressTests/cypress/fixtures/payloads/Transfers/{AuthorisedUserCanSetAdditionalSchoolData.spec.js => AuthorisedUserCanSetAdditionalSchoolData.js} (100%) rename CypressTests/cypress/fixtures/payloads/Transfers/{AuthorisedUserCanSetBenefits.spec.js => AuthorisedUserCanSetBenefits.js} (100%) rename CypressTests/cypress/fixtures/payloads/Transfers/{AuthorisedUserCanSetFeatures.spec.js => AuthorisedUserCanSetFeatures.js} (100%) rename CypressTests/cypress/fixtures/payloads/Transfers/{AuthorisedUserCanSetLegalRequirements.spec.js => AuthorisedUserCanSetLegalRequirements.js} (100%) rename CypressTests/cypress/fixtures/payloads/Transfers/{AuthorisedUserCanSetRationale.spec.js => AuthorisedUserCanSetRationale.js} (100%) rename CypressTests/cypress/fixtures/payloads/Transfers/{AuthorisedUserCanSetTransferDates.spec.js => AuthorisedUserCanSetTransferDates.js} (100%) rename CypressTests/cypress/fixtures/payloads/Transfers/{AuthorisedUserCanSetTrustInfoAndProjectsDates.spec.js => AuthorisedUserCanSetTrustInfoAndProjectsDates.js} (100%) diff --git a/CypressTests/cypress/fixtures/payloads/Transfers/AuthorisedUserCanAssignUser.spec.js b/CypressTests/cypress/fixtures/payloads/Transfers/AuthorisedUserCanAssignUser.js similarity index 100% rename from CypressTests/cypress/fixtures/payloads/Transfers/AuthorisedUserCanAssignUser.spec.js rename to CypressTests/cypress/fixtures/payloads/Transfers/AuthorisedUserCanAssignUser.js diff --git a/CypressTests/cypress/fixtures/payloads/Transfers/AuthorisedUserCanCreateNewMATTransfer.spec.js b/CypressTests/cypress/fixtures/payloads/Transfers/AuthorisedUserCanCreateNewMATTransfer.js similarity index 100% rename from CypressTests/cypress/fixtures/payloads/Transfers/AuthorisedUserCanCreateNewMATTransfer.spec.js rename to CypressTests/cypress/fixtures/payloads/Transfers/AuthorisedUserCanCreateNewMATTransfer.js diff --git a/CypressTests/cypress/fixtures/payloads/Transfers/AuthorisedUserCanCreateNewSATTransfer.spec.js b/CypressTests/cypress/fixtures/payloads/Transfers/AuthorisedUserCanCreateNewSATTransfer.js similarity index 100% rename from CypressTests/cypress/fixtures/payloads/Transfers/AuthorisedUserCanCreateNewSATTransfer.spec.js rename to CypressTests/cypress/fixtures/payloads/Transfers/AuthorisedUserCanCreateNewSATTransfer.js diff --git a/CypressTests/cypress/fixtures/payloads/Transfers/AuthorisedUserCanSetAdditionalSchoolData.spec.js b/CypressTests/cypress/fixtures/payloads/Transfers/AuthorisedUserCanSetAdditionalSchoolData.js similarity index 100% rename from CypressTests/cypress/fixtures/payloads/Transfers/AuthorisedUserCanSetAdditionalSchoolData.spec.js rename to CypressTests/cypress/fixtures/payloads/Transfers/AuthorisedUserCanSetAdditionalSchoolData.js diff --git a/CypressTests/cypress/fixtures/payloads/Transfers/AuthorisedUserCanSetBenefits.spec.js b/CypressTests/cypress/fixtures/payloads/Transfers/AuthorisedUserCanSetBenefits.js similarity index 100% rename from CypressTests/cypress/fixtures/payloads/Transfers/AuthorisedUserCanSetBenefits.spec.js rename to CypressTests/cypress/fixtures/payloads/Transfers/AuthorisedUserCanSetBenefits.js diff --git a/CypressTests/cypress/fixtures/payloads/Transfers/AuthorisedUserCanSetFeatures.spec.js b/CypressTests/cypress/fixtures/payloads/Transfers/AuthorisedUserCanSetFeatures.js similarity index 100% rename from CypressTests/cypress/fixtures/payloads/Transfers/AuthorisedUserCanSetFeatures.spec.js rename to CypressTests/cypress/fixtures/payloads/Transfers/AuthorisedUserCanSetFeatures.js diff --git a/CypressTests/cypress/fixtures/payloads/Transfers/AuthorisedUserCanSetLegalRequirements.spec.js b/CypressTests/cypress/fixtures/payloads/Transfers/AuthorisedUserCanSetLegalRequirements.js similarity index 100% rename from CypressTests/cypress/fixtures/payloads/Transfers/AuthorisedUserCanSetLegalRequirements.spec.js rename to CypressTests/cypress/fixtures/payloads/Transfers/AuthorisedUserCanSetLegalRequirements.js diff --git a/CypressTests/cypress/fixtures/payloads/Transfers/AuthorisedUserCanSetRationale.spec.js b/CypressTests/cypress/fixtures/payloads/Transfers/AuthorisedUserCanSetRationale.js similarity index 100% rename from CypressTests/cypress/fixtures/payloads/Transfers/AuthorisedUserCanSetRationale.spec.js rename to CypressTests/cypress/fixtures/payloads/Transfers/AuthorisedUserCanSetRationale.js diff --git a/CypressTests/cypress/fixtures/payloads/Transfers/AuthorisedUserCanSetTransferDates.spec.js b/CypressTests/cypress/fixtures/payloads/Transfers/AuthorisedUserCanSetTransferDates.js similarity index 100% rename from CypressTests/cypress/fixtures/payloads/Transfers/AuthorisedUserCanSetTransferDates.spec.js rename to CypressTests/cypress/fixtures/payloads/Transfers/AuthorisedUserCanSetTransferDates.js diff --git a/CypressTests/cypress/fixtures/payloads/Transfers/AuthorisedUserCanSetTrustInfoAndProjectsDates.spec.js b/CypressTests/cypress/fixtures/payloads/Transfers/AuthorisedUserCanSetTrustInfoAndProjectsDates.js similarity index 100% rename from CypressTests/cypress/fixtures/payloads/Transfers/AuthorisedUserCanSetTrustInfoAndProjectsDates.spec.js rename to CypressTests/cypress/fixtures/payloads/Transfers/AuthorisedUserCanSetTrustInfoAndProjectsDates.js From 3f947557fab46681f28bb21badb2c9ab164c099e Mon Sep 17 00:00:00 2001 From: Dan Good Date: Wed, 5 Feb 2025 15:46:45 +0000 Subject: [PATCH 10/10] rm currently unnecessary Transfers-MAT.cy.js spec file and AuthorisedUserCanCreateNewMATTransfer.js payload file --- CypressTests/cypress/e2e/Transfers-MAT.cy.js | 816 ------------------ .../AuthorisedUserCanCreateNewMATTransfer.js | 51 -- 2 files changed, 867 deletions(-) delete mode 100644 CypressTests/cypress/e2e/Transfers-MAT.cy.js delete mode 100644 CypressTests/cypress/fixtures/payloads/Transfers/AuthorisedUserCanCreateNewMATTransfer.js diff --git a/CypressTests/cypress/e2e/Transfers-MAT.cy.js b/CypressTests/cypress/e2e/Transfers-MAT.cy.js deleted file mode 100644 index 0e8f13226..000000000 --- a/CypressTests/cypress/e2e/Transfers-MAT.cy.js +++ /dev/null @@ -1,816 +0,0 @@ -import { AuthorisedUserCanCreateNewMATTransferPayload } from '../fixtures/payloads/Transfers/AuthorisedUserCanCreateNewMATTransfer' -import { AuthorisedUserCanSetRationalePayload } from '../fixtures/payloads/Transfers/AuthorisedUserCanSetRationale' -import { AuthorisedUserCanSetTransferDatesPayload } from '../fixtures/payloads/Transfers/AuthorisedUserCanSetTransferDates' -import { AuthorisedUserCanSetLegalRequirementsPayload } from '../fixtures/payloads/Transfers/AuthorisedUserCanSetLegalRequirements' -import { AuthorisedUserCanSetFeaturesPayload } from '../fixtures/payloads/Transfers/AuthorisedUserCanSetFeatures' -import { AuthorisedUserCanSetBenefitsPayload } from '../fixtures/payloads/Transfers/AuthorisedUserCanSetBenefits' -import { AuthorisedUserCanSetAdditionalSchoolDataPayload } from '../fixtures/payloads/Transfers/AuthorisedUserCanSetAdditionalSchoolData' -import { AuthorisedUserCanSetTrustInfoAndProjectDatesPayload } from '../fixtures/payloads/Transfers/AuthorisedUserCanSetTrustInfoAndProjectsDates' -import { AuthorisedUserCanAssignUserDataPayload } from '../fixtures/payloads/Transfers/AuthorisedUserCanAssignUser' - -describe.skip('Academisation API Testing - Transfers MAT Projects', () => { - let apiKey = Cypress.env('apiKey') - let url = Cypress.env('url') - let URN = Cypress.env('URN') - - let getTransferDateTimeFormatRegex = /^\d{2}\/\d{2}\/\d{4}$/ - - // VERIFY AN UNAUTH USER CANNOT GET ALL TRANSFERPROJECTS REGARDLESS OF MAT OR SAT TYPE - it('GET - Verify An UNAuthorised User CANNOT GET ALL MAT AND SAT Transfer Projects - 401 UNAUTH EXPECTED', () => { - cy.api({ - url: url + '/transfer-project/GetTransferProjects', - failOnStatusCode: false, - method: 'GET', - headers: - { - 'x-api-key': 'INCORRECT API-KEY LOOKING FOR 401 RESPONSE', - }, - }).then((response) => { - cy.log(JSON.stringify(response)) - expect(response).to.have.property('status', 401) - }) - }) - - // GET ALL TRANSFER PROJECTS REGARDLESS OF MAT OR SAT TYPE - - it('GET - Verify An Authorised User Can GET ALL MAT AND SAT Transfer Projects - 200 OK EXPECTED', () => { - cy.api({ - url: url + '/transfer-project/GetTransferProjects', - method: 'GET', - headers: - { - 'x-api-key': apiKey, - }, - }).then((response) => { - cy.log(JSON.stringify(response)) - expect(response).to.have.property('status', 200) - const totalCount = response.body.totalCount - expect(totalCount).to.be.greaterThan(0) - }) - }) - - // TRY TO CREATE A NEW TRANSFER AS AN UNAUTH USER AND HOPE FOR 401 UNAUTH - it('POST - Verify An UN-Authorised User CANNOT Create A New MAT Transfer - 401 UNAUTHORISED EXPECTED', () => { - cy.api({ - url: url + '/transfer-project', - failOnStatusCode: false, - method: 'POST', - headers: - { - 'x-api-key': 'INCORRECTAPIKEY FOR 401 UNAUTH RESPONSE', - }, - body: - AuthorisedUserCanCreateNewMATTransferPayload, - }).then((response) => { - cy.log(JSON.stringify(response)) - expect(response).to.have.property('status', 401) - }) - }) - - // TRY TO CREATE A NEW MAT TRANSFER AS AN AUTH USER AND HOPE WE GET A 201 CREATED RESPONSE AND EXPECTED FIELDS - it('POST - Verify An Authorised User Can Create A New MAT Transfer - 201 CREATED EXPECTED', () => { - cy.api({ - url: url + '/transfer-project', - method: 'POST', - headers: - { - 'x-api-key': apiKey, - }, - body: - AuthorisedUserCanCreateNewMATTransferPayload, - }).then((response) => { - cy.log(JSON.stringify(response)) - expect(response).to.have.property('status', 201) - - expect(response.body).to.have.property('projectUrn') - - URN = response.body.projectUrn - expect(response.body).to.have.property('projectReference', 'MAT-' + URN) - - expect(response.body.transferringAcademies[0]).to.have.property('outgoingAcademyUkprn') - expect(response.body.transferringAcademies[0]).to.have.property('incomingTrustUkprn') - expect(response.body.transferringAcademies[1]).to.have.property('outgoingAcademyUkprn') - expect(response.body.transferringAcademies[1]).to.have.property('incomingTrustUkprn') - - cy.log(URN) - }) - }) - - // TRY TO GET THE NEW MAT TRANSFER WE CREATED AS AN AUTH USER AND HOPE WE GET A 200 OK RESPONSE AND EXPECTED FIELDS - it('GET - Verify An Authorised User Can GET THE New MAT Transfer We Created - 200 OK EXPECTED', () => { - cy.api({ - url: url + '/transfer-project/' + URN, - method: 'GET', - headers: - { - 'x-api-key': apiKey, - }, - }).then((response) => { - cy.log(JSON.stringify(response)) - expect(response).to.have.property('status', 200) - - expect(response.body).to.have.property('projectUrn') - - expect(response.body).to.have.property('projectReference', 'MAT-' + URN) - - expect(response.body.transferringAcademies[0]).to.have.property('outgoingAcademyUkprn') - expect(response.body.transferringAcademies[0]).to.have.property('incomingTrustUkprn') - expect(response.body.transferringAcademies[1]).to.have.property('outgoingAcademyUkprn') - expect(response.body.transferringAcademies[1]).to.have.property('incomingTrustUkprn') - - cy.log(URN) - }) - }) - - // VERIFY AN UNAUTHORISED USER IS UNABLE TO GET ACCESS TO THE NEW TRANSFER PROJECT - it('GET - Verify An UNAuthorised User CANNOT GET THE New MAT Transfer We Created - 401 UNAUTHORISED EXPECTED', () => { - cy.api({ - url: url + '/transfer-project/' + URN, - failOnStatusCode: false, - method: 'GET', - headers: - { - 'x-api-key': 'INVALID API KEY FOR 401 RESPONSE', - }, - }).then((response) => { - cy.log(JSON.stringify(response)) - expect(response).to.have.property('status', 401) - }) - }) - // VERIFY AN UNAUTHORISED USER GETS A 401 UNAUTH RESPONSE WHEN TRYING TO SET RATIONALE - it('PUT - Verify An UN-authorised User CANNOT SET-RATIONALE On New MAT Transfer We Created - 401 UNAUTHORISED EXPECTED', () => { - cy.api({ - url: url + '/transfer-project/' + URN + '/set-rationale/', - failOnStatusCode: false, - method: 'PUT', - headers: - { - 'x-api-key': 'INCORRECT API KEY - 401 UNAUTHORISED EXPECTED', - }, - body: AuthorisedUserCanSetRationalePayload, - }).then((response) => { - cy.log(JSON.stringify(response)) - expect(response).to.have.property('status', 401) - cy.log(URN) - }) - }) - // TRY TO SET RATIONALE ON THE NEW MAT PROJECT AND HOPE WE GET A 200 OK RESPONSE - it('PUT - Verify An Authorised User Can SET-RATIONALE On New MAT Transfer We Created - 200 OK EXPECTED', () => { - cy.api({ - url: url + '/transfer-project/' + URN + '/set-rationale/', - method: 'PUT', - headers: - { - 'x-api-key': apiKey, - }, - body: AuthorisedUserCanSetRationalePayload, - }).then((response) => { - cy.log(JSON.stringify(response)) - expect(response).to.have.property('status', 200) - cy.log(URN) - }) - }) - - // VERIFY SET-RATIONALE STUFF COMES BACK CORRECTLY IN GET RESPONSE - it('GET - Verify An Authorised User Can GET THE New MAT Transfer We Created WITH THE UPDATED RATIONALE - 200 OK EXPECTED', () => { - cy.api({ - url: url + '/transfer-project/' + URN, - method: 'GET', - headers: - { - 'x-api-key': apiKey, - }, - }).then((response) => { - cy.log(JSON.stringify(response)) - expect(response).to.have.property('status', 200) - - expect(response.body).to.have.property('projectUrn') - - expect(response.body).to.have.property('projectReference', 'MAT-' + URN) - - expect(response.body.transferringAcademies[0]).to.have.property('outgoingAcademyUkprn') - expect(response.body.transferringAcademies[0]).to.have.property('incomingTrustUkprn') - expect(response.body.transferringAcademies[1]).to.have.property('outgoingAcademyUkprn') - expect(response.body.transferringAcademies[1]).to.have.property('incomingTrustUkprn') - - // OK LET'S CHECK OUR RATIONALE STUFF HERE - expect(response.body.rationale).to.have.property('projectRationale', 'projectRationale') - expect(response.body.rationale).to.have.property('trustSponsorRationale', 'trustSponsorRationale') - expect(response.body.rationale).to.have.property('isCompleted', true) - cy.log(URN) - }) - }) - - // TRY FOR AN UNAUTH USER TO SET TRANSFER DATES IN PUT REQUEST - it('PUT - Verify An UNAuthorised User CANNOT SET-TRANSFER DATES On New MAT Transfer We Created - 401 UNAUTHORISED EXPECTED', () => { - cy.api({ - url: url + '/transfer-project/' + URN + '/set-transfer-dates', - failOnStatusCode: false, - method: 'PUT', - headers: - { - 'x-api-key': 'INCORRECT APIKEY 401 EXPECTED', - }, - body: AuthorisedUserCanSetTransferDatesPayload, - }).then((response) => { - cy.log(JSON.stringify(response)) - expect(response).to.have.property('status', 401) - cy.log(URN) - }) - }) - - // TRY TO SET TRANSFER DATES IN PUT REQUEST - it('PUT - Verify An Authorised User Can SET-TRANSFER DATES On New MAT Transfer We Created - 200 OK EXPECTED', () => { - cy.api({ - url: url + '/transfer-project/' + URN + '/set-transfer-dates', - method: 'PUT', - headers: - { - 'x-api-key': apiKey, - }, - body: AuthorisedUserCanSetTransferDatesPayload, - }).then((response) => { - cy.log(JSON.stringify(response)) - expect(response).to.have.property('status', 200) - cy.log(URN) - }) - }) - - it('GET - Verify An Authorised User Can GET THE New MAT Transfer We Created WITH THE UPDATED TRANSFER DATES - 200 OK EXPECTED', () => { - cy.api({ - url: url + '/transfer-project/' + URN, - method: 'GET', - headers: - { - 'x-api-key': apiKey, - }, - }).then((response) => { - cy.log(JSON.stringify(response)) - expect(response).to.have.property('status', 200) - - expect(response.body).to.have.property('projectUrn') - - expect(response.body).to.have.property('projectReference', 'MAT-' + URN) - - expect(response.body.transferringAcademies[0]).to.have.property('outgoingAcademyUkprn') - expect(response.body.transferringAcademies[0]).to.have.property('incomingTrustUkprn') - expect(response.body.transferringAcademies[1]).to.have.property('outgoingAcademyUkprn') - expect(response.body.transferringAcademies[1]).to.have.property('incomingTrustUkprn') - - expect(response.body.rationale).to.have.property('projectRationale', 'projectRationale') - expect(response.body.rationale).to.have.property('trustSponsorRationale', 'trustSponsorRationale') - expect(response.body.rationale).to.have.property('isCompleted', true) - - // CHECK OUR SET TRANSFER DATES COME BACK CORRECTLY HERE - expect(response.body.dates).to.have.property('targetDateForTransfer').to.match(getTransferDateTimeFormatRegex) - expect(response.body.dates).to.have.property('htbDate').to.match(getTransferDateTimeFormatRegex) - cy.log(URN) - }) - }) - - // TRY FOR AN UNAUTH USER TO SET LEGAL REQUIREMENTS IN PUT REQUEST - it('PUT - Verify An UNAuthorised User CANNOT SET-LEGAL REQUIREMENTS On New MAT Transfer We Created - 401 UNAUTHORISED EXPECTED', () => { - cy.api({ - url: url + '/transfer-project/' + URN + '/set-legal-requirements', - failOnStatusCode: false, - method: 'PUT', - headers: - { - 'x-api-key': 'INCORRECT API KEY 401 UNAUTH EXPECTED', - }, - body: AuthorisedUserCanSetLegalRequirementsPayload, - }).then((response) => { - cy.log(JSON.stringify(response)) - expect(response).to.have.property('status', 401) - cy.log(URN) - }) - }) - - // TRY TO SET LEGAL REQUIREMENTS IN PUT REQUEST - it('PUT - Verify An Authorised User Can SET-LEGAL REQUIREMENTS On New MAT Transfer We Created - 200 OK EXPECTED', () => { - cy.api({ - url: url + '/transfer-project/' + URN + '/set-legal-requirements', - method: 'PUT', - headers: - { - 'x-api-key': apiKey, - }, - body: AuthorisedUserCanSetLegalRequirementsPayload, - }).then((response) => { - cy.log(JSON.stringify(response)) - expect(response).to.have.property('status', 200) - cy.log(URN) - }) - }) - - // CHECK UPDATED LEGAL REQUIREMENTS COME BACK CORRECTLY IN GET RESPONSE - it('GET - Verify An Authorised User Can GET THE New MAT Transfer We Created WITH THE UPDATED LEGAL REQUIREMENTS - 200 OK EXPECTED', () => { - cy.api({ - url: url + '/transfer-project/' + URN, - method: 'GET', - headers: - { - 'x-api-key': apiKey, - }, - }).then((response) => { - cy.log(JSON.stringify(response)) - expect(response).to.have.property('status', 200) - - expect(response.body).to.have.property('projectUrn') - - expect(response.body).to.have.property('projectReference', 'MAT-' + URN) - - expect(response.body.transferringAcademies[0]).to.have.property('outgoingAcademyUkprn') - expect(response.body.transferringAcademies[0]).to.have.property('incomingTrustUkprn') - expect(response.body.transferringAcademies[1]).to.have.property('outgoingAcademyUkprn') - expect(response.body.transferringAcademies[1]).to.have.property('incomingTrustUkprn') - - expect(response.body.rationale).to.have.property('projectRationale', 'projectRationale') - expect(response.body.rationale).to.have.property('trustSponsorRationale', 'trustSponsorRationale') - expect(response.body.rationale).to.have.property('isCompleted', true) - - expect(response.body.dates).to.have.property('targetDateForTransfer').to.match(getTransferDateTimeFormatRegex) - expect(response.body.dates).to.have.property('htbDate').to.match(getTransferDateTimeFormatRegex) - - // CHECK LEGAL REQUIREMENTS IN GET RESPONSE - expect(response.body.legalRequirements).to.have.property('incomingTrustAgreement', 'incoming Trust Consent Value') - expect(response.body.legalRequirements).to.have.property('diocesanConsent', 'diocesanConsent Value') - expect(response.body.legalRequirements).to.have.property('outgoingTrustConsent', 'outgoing Trust Consent Value') - expect(response.body.legalRequirements).to.have.property('isCompleted', true) - - cy.log(URN) - }) - }) - - // TRY TO SET FEATURES IN PUT REQUEST AS AN UNAUTH USER - it('PUT - Verify An UNAuthorised User CANNOT SET-FEATURES On New MAT Transfer We Created - 401 UNAUTHORISED EXPECTED', () => { - cy.api({ - url: url + '/transfer-project/' + URN + '/set-features', - failOnStatusCode: false, - method: 'PUT', - headers: - { - 'x-api-key': 'INCORRECT API-KEY FOR 401 UNAUTH', - }, - body: AuthorisedUserCanSetFeaturesPayload, - }).then((response) => { - cy.log(JSON.stringify(response)) - expect(response).to.have.property('status', 401) - cy.log(URN) - }) - }) - - // TRY TO SET FEATURES IN PUT REQUEST - it('PUT - Verify An Authorised User Can SET-FEATURES On New MAT Transfer We Created - 200 OK EXPECTED', () => { - cy.api({ - url: url + '/transfer-project/' + URN + '/set-features', - method: 'PUT', - headers: - { - 'x-api-key': apiKey, - }, - body: AuthorisedUserCanSetFeaturesPayload, - }).then((response) => { - cy.log(JSON.stringify(response)) - expect(response).to.have.property('status', 200) - cy.log(URN) - }) - }) - - // CHECK UPDATED FEATURES COME BACK CORRECTLY IN GET RESPONSE - it('GET - Verify An Authorised User Can GET THE New MAT Transfer We Created WITH THE UPDATED FEATURES - 200 OK EXPECTED', () => { - cy.api({ - url: url + '/transfer-project/' + URN, - method: 'GET', - headers: - { - 'x-api-key': apiKey, - }, - }).then((response) => { - cy.log(JSON.stringify(response)) - expect(response).to.have.property('status', 200) - - expect(response.body).to.have.property('projectUrn') - - expect(response.body).to.have.property('projectReference', 'MAT-' + URN) - - expect(response.body.transferringAcademies[0]).to.have.property('outgoingAcademyUkprn') - expect(response.body.transferringAcademies[0]).to.have.property('incomingTrustUkprn') - expect(response.body.transferringAcademies[1]).to.have.property('outgoingAcademyUkprn') - expect(response.body.transferringAcademies[1]).to.have.property('incomingTrustUkprn') - - expect(response.body.rationale).to.have.property('projectRationale', 'projectRationale') - expect(response.body.rationale).to.have.property('trustSponsorRationale', 'trustSponsorRationale') - expect(response.body.rationale).to.have.property('isCompleted', true) - - expect(response.body.dates).to.have.property('targetDateForTransfer').to.match(getTransferDateTimeFormatRegex) - expect(response.body.dates).to.have.property('htbDate').to.match(getTransferDateTimeFormatRegex) - - expect(response.body.legalRequirements).to.have.property('incomingTrustAgreement', 'incoming Trust Consent Value') - expect(response.body.legalRequirements).to.have.property('diocesanConsent', 'diocesanConsent Value') - expect(response.body.legalRequirements).to.have.property('outgoingTrustConsent', 'outgoing Trust Consent Value') - expect(response.body.legalRequirements).to.have.property('isCompleted', true) - - // NOW TO CHECK FEATURES COME BACK CORRECTLY IN THE GET RESPONSE - expect(response.body.features).to.have.property('whoInitiatedTheTransfer', 'whoInitiatedTheTransfer Value') - expect(response.body.features).to.have.property('typeOfTransfer', 'typeOfTransfer Value') - expect(response.body.features).to.have.property('isCompleted', true) - - cy.log(URN) - }) - }) - - // AN UNAUTH USER CANNOT SET BENEFITS IN PUT REQUEST - it('PUT - Verify An UNAuthorised User CANNOT SET-BENEFITS On New MAT Transfer We Created - 401 UNAUTHORISED EXPECTED', () => { - cy.api({ - url: url + '/transfer-project/' + URN + '/set-benefits', - failOnStatusCode: false, - method: 'PUT', - headers: - { - 'x-api-key': 'INCORRECT APIKEY FOR UNAUTH', - }, - body: AuthorisedUserCanSetBenefitsPayload, - }).then((response) => { - cy.log(JSON.stringify(response)) - expect(response).to.have.property('status', 401) - cy.log(URN) - }) - }) - - // TRY TO SET BENEFITS IN PUT REQUEST - it('PUT - Verify An Authorised User Can SET-BENEFITS On New MAT Transfer We Created - 200 OK EXPECTED', () => { - cy.api({ - url: url + '/transfer-project/' + URN + '/set-benefits', - method: 'PUT', - headers: - { - 'x-api-key': apiKey, - }, - body: AuthorisedUserCanSetBenefitsPayload, - }).then((response) => { - cy.log(JSON.stringify(response)) - expect(response).to.have.property('status', 200) - cy.log(URN) - }) - }) - - // CHECK SET BENEFITS IN GET RESPONSE... - it('GET - Verify An Authorised User Can GET THE New MAT Transfer We Created WITH THE UPDATED BENEFITS - 200 OK EXPECTED', () => { - cy.api({ - url: url + '/transfer-project/' + URN, - method: 'GET', - headers: - { - 'x-api-key': apiKey, - }, - }).then((response) => { - cy.log(JSON.stringify(response)) - expect(response).to.have.property('status', 200) - - expect(response.body).to.have.property('projectUrn') - - expect(response.body).to.have.property('projectReference', 'MAT-' + URN) - - expect(response.body.transferringAcademies[0]).to.have.property('outgoingAcademyUkprn') - expect(response.body.transferringAcademies[0]).to.have.property('incomingTrustUkprn') - expect(response.body.transferringAcademies[1]).to.have.property('outgoingAcademyUkprn') - expect(response.body.transferringAcademies[1]).to.have.property('incomingTrustUkprn') - - expect(response.body.rationale).to.have.property('projectRationale', 'projectRationale') - expect(response.body.rationale).to.have.property('trustSponsorRationale', 'trustSponsorRationale') - expect(response.body.rationale).to.have.property('isCompleted', true) - - expect(response.body.dates).to.have.property('targetDateForTransfer').to.match(getTransferDateTimeFormatRegex) - expect(response.body.dates).to.have.property('htbDate').to.match(getTransferDateTimeFormatRegex) - - expect(response.body.legalRequirements).to.have.property('incomingTrustAgreement', 'incoming Trust Consent Value') - expect(response.body.legalRequirements).to.have.property('diocesanConsent', 'diocesanConsent Value') - expect(response.body.legalRequirements).to.have.property('outgoingTrustConsent', 'outgoing Trust Consent Value') - expect(response.body.legalRequirements).to.have.property('isCompleted', true) - - expect(response.body.features).to.have.property('whoInitiatedTheTransfer', 'whoInitiatedTheTransfer Value') - expect(response.body.features).to.have.property('typeOfTransfer', 'typeOfTransfer Value') - expect(response.body.features).to.have.property('isCompleted', true) - - // CHECK OUR SETBENEFITS STUFF IS COMING BACK OK IN RESPONSE BELOW - expect(response.body.benefits.intendedTransferBenefits.selectedBenefits[0]).to.equal('selectedBenefits value') - expect(response.body.benefits.intendedTransferBenefits.otherBenefitValue).to.equal('otherBenefitValue value') - expect(response.body.benefits.otherFactorsToConsider.highProfile.shouldBeConsidered).to.be.true - expect(response.body.benefits.otherFactorsToConsider.highProfile.furtherSpecification).to.equal('highProfile furtherSpecification value') - expect(response.body.benefits.otherFactorsToConsider.complexLandAndBuilding.shouldBeConsidered).to.be.true - expect(response.body.benefits.otherFactorsToConsider.complexLandAndBuilding.furtherSpecification).to.equal('complexLandAndBuildingFurtherSpecification Value') - expect(response.body.benefits.otherFactorsToConsider.financeAndDebt.shouldBeConsidered).to.be.true - expect(response.body.benefits.otherFactorsToConsider.financeAndDebt.furtherSpecification).to.equal('financeAndDebtFurtherSpecification value') - expect(response.body.benefits.otherFactorsToConsider.otherRisks.shouldBeConsidered).to.be.true - expect(response.body.benefits.otherFactorsToConsider.otherRisks.furtherSpecification).to.equal('otherRisksfurtherSpecification value') - expect(response.body.benefits.equalitiesImpactAssessmentConsidered).to.be.true - expect(response.body.benefits.isCompleted).to.be.true - expect(response.body.benefits.anyRisks).to.be.true - - cy.log(URN) - }) - }) - - // AN UNAUTHORISED USER TRIES TO SET ADDITIONAL SCHOOL DATA IN PUT REQUEST - it('PUT - Verify An UNAuthorised User CANNOT SET-SCHOOL-ADDITIONAL-DATA On New MAT Transfer We Created - 401 UNAUTHORISED EXPECTED', () => { - cy.api({ - url: url + '/transfer-project/' + URN + '/set-school-additional-data', - failOnStatusCode: false, - method: 'PUT', - headers: - { - 'x-api-key': 'INCORRECT APIKEY - 401 UNAUTH EXPECTED', - }, - body: AuthorisedUserCanSetAdditionalSchoolDataPayload, - }).then((response) => { - cy.log(JSON.stringify(response)) - expect(response).to.have.property('status', 401) - cy.log(URN) - }) - }) - - // TRY TO SET ADDITIONAL SCHOOL DATA IN PUT REQUEST - it('PUT - Verify An Authorised User Can SET-SCHOOL-ADDITIONAL-DATA On New MAT Transfer We Created - 200 OK EXPECTED', () => { - cy.api({ - url: url + '/transfer-project/' + URN + '/set-school-additional-data', - method: 'PUT', - headers: - { - 'x-api-key': apiKey, - }, - body: AuthorisedUserCanSetAdditionalSchoolDataPayload, - }).then((response) => { - cy.log(JSON.stringify(response)) - expect(response).to.have.property('status', 200) - cy.log(URN) - }) - }) - - // CHECK SET SCHOOL ADDITIONAL DATA IN GET RESPONSE... - it('GET - Verify An Authorised User Can GET THE New MAT Transfer We Created WITH THE UPDATED SCHOOL ADDITIONAL DATA - 200 OK EXPECTED', () => { - cy.api({ - url: url + '/transfer-project/' + URN, - method: 'GET', - headers: - { - 'x-api-key': apiKey, - }, - }).then((response) => { - cy.log(JSON.stringify(response)) - expect(response).to.have.property('status', 200) - - expect(response.body).to.have.property('projectUrn') - - expect(response.body).to.have.property('projectReference', 'MAT-' + URN) - - expect(response.body.transferringAcademies[0]).to.have.property('outgoingAcademyUkprn') - expect(response.body.transferringAcademies[0]).to.have.property('incomingTrustUkprn') - expect(response.body.transferringAcademies[1]).to.have.property('outgoingAcademyUkprn') - expect(response.body.transferringAcademies[1]).to.have.property('incomingTrustUkprn') - - expect(response.body.rationale).to.have.property('projectRationale', 'projectRationale') - expect(response.body.rationale).to.have.property('trustSponsorRationale', 'trustSponsorRationale') - expect(response.body.rationale).to.have.property('isCompleted', true) - - expect(response.body.dates).to.have.property('targetDateForTransfer').to.match(getTransferDateTimeFormatRegex) - expect(response.body.dates).to.have.property('htbDate').to.match(getTransferDateTimeFormatRegex) - - expect(response.body.legalRequirements).to.have.property('incomingTrustAgreement', 'incoming Trust Consent Value') - expect(response.body.legalRequirements).to.have.property('diocesanConsent', 'diocesanConsent Value') - expect(response.body.legalRequirements).to.have.property('outgoingTrustConsent', 'outgoing Trust Consent Value') - expect(response.body.legalRequirements).to.have.property('isCompleted', true) - - expect(response.body.features).to.have.property('whoInitiatedTheTransfer', 'whoInitiatedTheTransfer Value') - expect(response.body.features).to.have.property('typeOfTransfer', 'typeOfTransfer Value') - expect(response.body.features).to.have.property('isCompleted', true) - - expect(response.body.benefits.intendedTransferBenefits.selectedBenefits[0]).to.equal('selectedBenefits value') - expect(response.body.benefits.intendedTransferBenefits.otherBenefitValue).to.equal('otherBenefitValue value') - expect(response.body.benefits.otherFactorsToConsider.highProfile.shouldBeConsidered).to.be.true - expect(response.body.benefits.otherFactorsToConsider.highProfile.furtherSpecification).to.equal('highProfile furtherSpecification value') - expect(response.body.benefits.otherFactorsToConsider.complexLandAndBuilding.shouldBeConsidered).to.be.true - expect(response.body.benefits.otherFactorsToConsider.complexLandAndBuilding.furtherSpecification).to.equal('complexLandAndBuildingFurtherSpecification Value') - expect(response.body.benefits.otherFactorsToConsider.financeAndDebt.shouldBeConsidered).to.be.true - expect(response.body.benefits.otherFactorsToConsider.financeAndDebt.furtherSpecification).to.equal('financeAndDebtFurtherSpecification value') - expect(response.body.benefits.otherFactorsToConsider.otherRisks.shouldBeConsidered).to.be.true - expect(response.body.benefits.otherFactorsToConsider.otherRisks.furtherSpecification).to.equal('otherRisksfurtherSpecification value') - expect(response.body.benefits.equalitiesImpactAssessmentConsidered).to.be.true - expect(response.body.benefits.isCompleted).to.be.true - expect(response.body.benefits.anyRisks).to.be.true - - // CHECK SCHOOL ADDITIONAL DETAILS RETURNING CORRECTLY IN RESPONSE - expect(response.body.transferringAcademies[1].pupilNumbersAdditionalInformation).to.equal('pupilNumbersAdditionalInformation value') - expect(response.body.transferringAcademies[1].latestOfstedReportAdditionalInformation).to.equal('latestOfstedReportAdditionalInformation value') - expect(response.body.transferringAcademies[1].keyStage2PerformanceAdditionalInformation).to.equal('keyStage2PerformanceAdditionalInformation value') - expect(response.body.transferringAcademies[1].keyStage4PerformanceAdditionalInformation).to.equal('KeyStage4PerformanceAdditionalInformation value') - expect(response.body.transferringAcademies[1].keyStage5PerformanceAdditionalInformation).to.equal('keyStage5PerformanceAdditionalInformation value') - cy.log(URN) - }) - }) - - // AN UNAUTH USER TRIES TO SET TRUST INFO GENERAL INFO - // TRY TO SET TRUST GENERAL INFO - it('PUT - Verify An Authorised User Can SET-SCHOOL-TRUST-GENERAL-INFORMATION On New MAT Transfer We Created - 401 UNAUTHORISED EXPECTED', () => { - cy.api({ - url: url + '/transfer-project/' + URN + '/set-general-information', - failOnStatusCode: false, - method: 'PUT', - headers: - { - 'x-api-key': 'INCORRECT APIKEY FOR 401 RESPONSE', - }, - body: AuthorisedUserCanSetTrustInfoAndProjectDatesPayload, - }).then((response) => { - cy.log(JSON.stringify(response)) - expect(response).to.have.property('status', 401) - cy.log(URN) - }) - }) - // TRY TO SET TRUST GENERAL INFO - it('PUT - Verify An Authorised User Can SET-SCHOOL-GENERAL-INFORMATION On New MAT Transfer We Created - 200 OK EXPECTED', () => { - cy.api({ - url: url + '/transfer-project/' + URN + '/set-general-information', - method: 'PUT', - headers: - { - 'x-api-key': apiKey, - }, - body: AuthorisedUserCanSetTrustInfoAndProjectDatesPayload, - }).then((response) => { - cy.log(JSON.stringify(response)) - expect(response).to.have.property('status', 200) - cy.log(URN) - }) - }) - - // CHECK SET TRUST INFO IN GET RESPONSE... - it('GET - Verify An Authorised User Can GET THE New MAT Transfer We Created WITH THE UPDATED SCHOOL ADDITIONAL DATA - 200 OK EXPECTED', () => { - cy.api({ - url: url + '/transfer-project/' + URN, - method: 'GET', - headers: - { - 'x-api-key': apiKey, - }, - }).then((response) => { - cy.log(JSON.stringify(response)) - expect(response).to.have.property('status', 200) - - expect(response.body).to.have.property('projectUrn') - - expect(response.body).to.have.property('projectReference', 'MAT-' + URN) - - expect(response.body.transferringAcademies[0]).to.have.property('outgoingAcademyUkprn') - expect(response.body.transferringAcademies[0]).to.have.property('incomingTrustUkprn') - expect(response.body.transferringAcademies[1]).to.have.property('outgoingAcademyUkprn') - expect(response.body.transferringAcademies[1]).to.have.property('incomingTrustUkprn') - - expect(response.body.rationale).to.have.property('projectRationale', 'projectRationale') - expect(response.body.rationale).to.have.property('trustSponsorRationale', 'trustSponsorRationale') - expect(response.body.rationale).to.have.property('isCompleted', true) - - expect(response.body.dates).to.have.property('targetDateForTransfer').to.match(getTransferDateTimeFormatRegex) - expect(response.body.dates).to.have.property('htbDate').to.match(getTransferDateTimeFormatRegex) - - expect(response.body.legalRequirements).to.have.property('incomingTrustAgreement', 'incoming Trust Consent Value') - expect(response.body.legalRequirements).to.have.property('diocesanConsent', 'diocesanConsent Value') - expect(response.body.legalRequirements).to.have.property('outgoingTrustConsent', 'outgoing Trust Consent Value') - expect(response.body.legalRequirements).to.have.property('isCompleted', true) - - expect(response.body.features).to.have.property('whoInitiatedTheTransfer', 'whoInitiatedTheTransfer Value') - expect(response.body.features).to.have.property('typeOfTransfer', 'typeOfTransfer Value') - expect(response.body.features).to.have.property('isCompleted', true) - - expect(response.body.benefits.intendedTransferBenefits.selectedBenefits[0]).to.equal('selectedBenefits value') - expect(response.body.benefits.intendedTransferBenefits.otherBenefitValue).to.equal('otherBenefitValue value') - expect(response.body.benefits.otherFactorsToConsider.highProfile.shouldBeConsidered).to.be.true - expect(response.body.benefits.otherFactorsToConsider.highProfile.furtherSpecification).to.equal('highProfile furtherSpecification value') - expect(response.body.benefits.otherFactorsToConsider.complexLandAndBuilding.shouldBeConsidered).to.be.true - expect(response.body.benefits.otherFactorsToConsider.complexLandAndBuilding.furtherSpecification).to.equal('complexLandAndBuildingFurtherSpecification Value') - expect(response.body.benefits.otherFactorsToConsider.financeAndDebt.shouldBeConsidered).to.be.true - expect(response.body.benefits.otherFactorsToConsider.financeAndDebt.furtherSpecification).to.equal('financeAndDebtFurtherSpecification value') - expect(response.body.benefits.otherFactorsToConsider.otherRisks.shouldBeConsidered).to.be.true - expect(response.body.benefits.otherFactorsToConsider.otherRisks.furtherSpecification).to.equal('otherRisksfurtherSpecification value') - expect(response.body.benefits.equalitiesImpactAssessmentConsidered).to.be.true - expect(response.body.benefits.isCompleted).to.be.true - expect(response.body.benefits.anyRisks).to.be.true - - expect(response.body.transferringAcademies[1].pupilNumbersAdditionalInformation).to.equal('pupilNumbersAdditionalInformation value') - expect(response.body.transferringAcademies[1].latestOfstedReportAdditionalInformation).to.equal('latestOfstedReportAdditionalInformation value') - expect(response.body.transferringAcademies[1].keyStage2PerformanceAdditionalInformation).to.equal('keyStage2PerformanceAdditionalInformation value') - expect(response.body.transferringAcademies[1].keyStage4PerformanceAdditionalInformation).to.equal('KeyStage4PerformanceAdditionalInformation value') - expect(response.body.transferringAcademies[1].keyStage5PerformanceAdditionalInformation).to.equal('keyStage5PerformanceAdditionalInformation value') - - // CHECKING THE NEW SET TRUST RETURNS HERE - expect(response.body.generalInformation).to.have.property('recommendation', 'recommendationString value') - expect(response.body.generalInformation).to.have.property('author', 'authorString value') - cy.log(URN) - }) - }) - - // UNAUTH USER TRIES TO ASSIGN A USER TO A PROJECT - it('PUT - Verify An UNAuthorised User CANNOT ASSIGN-USER to project On New MAT Transfer We Created - 401 UNAUTHORISED EXPECTED', () => { - cy.api({ - url: url + '/transfer-project/' + URN + '/assign-user', - failOnStatusCode: false, - method: 'PUT', - headers: - { - 'x-api-key': 'INCORRECT APIKEY - LOOKING FOR 401', - }, - body: AuthorisedUserCanAssignUserDataPayload, - }).then((response) => { - cy.log(JSON.stringify(response)) - expect(response).to.have.property('status', 401) - cy.log(URN) - }) - }) - - // TRY TO ASSIGN A USER TO A PROJECT - it('PUT - Verify An Authorised User Can ASSIGN-USER to project On New MAT Transfer We Created - 200 OK EXPECTED', () => { - cy.api({ - url: url + '/transfer-project/' + URN + '/assign-user', - method: 'PUT', - headers: - { - 'x-api-key': apiKey, - }, - body: AuthorisedUserCanAssignUserDataPayload, - }).then((response) => { - cy.log(JSON.stringify(response)) - expect(response).to.have.property('status', 200) - cy.log(URN) - }) - }) - - // CHECK SET ASSIGN USER DETAILS COME BACK IN GET RESPONSE... - it('GET - Verify An Authorised User Can GET THE New MAT Transfer We Created WITH THE USER ASSIGNED TO THE PROJECT - 200 OK EXPECTED', () => { - cy.api({ - url: url + '/transfer-project/' + URN, - method: 'GET', - headers: - { - 'x-api-key': apiKey, - }, - }).then((response) => { - cy.log(JSON.stringify(response)) - expect(response).to.have.property('status', 200) - - expect(response.body).to.have.property('projectUrn') - - expect(response.body).to.have.property('projectReference', 'MAT-' + URN) - - expect(response.body.transferringAcademies[0]).to.have.property('outgoingAcademyUkprn') - expect(response.body.transferringAcademies[0]).to.have.property('incomingTrustUkprn') - expect(response.body.transferringAcademies[1]).to.have.property('outgoingAcademyUkprn') - expect(response.body.transferringAcademies[1]).to.have.property('incomingTrustUkprn') - - expect(response.body.rationale).to.have.property('projectRationale', 'projectRationale') - expect(response.body.rationale).to.have.property('trustSponsorRationale', 'trustSponsorRationale') - expect(response.body.rationale).to.have.property('isCompleted', true) - - expect(response.body.dates).to.have.property('targetDateForTransfer').to.match(getTransferDateTimeFormatRegex) - expect(response.body.dates).to.have.property('htbDate').to.match(getTransferDateTimeFormatRegex) - - expect(response.body.legalRequirements).to.have.property('incomingTrustAgreement', 'incoming Trust Consent Value') - expect(response.body.legalRequirements).to.have.property('diocesanConsent', 'diocesanConsent Value') - expect(response.body.legalRequirements).to.have.property('outgoingTrustConsent', 'outgoing Trust Consent Value') - expect(response.body.legalRequirements).to.have.property('isCompleted', true) - - expect(response.body.features).to.have.property('whoInitiatedTheTransfer', 'whoInitiatedTheTransfer Value') - expect(response.body.features).to.have.property('typeOfTransfer', 'typeOfTransfer Value') - expect(response.body.features).to.have.property('isCompleted', true) - - expect(response.body.benefits.intendedTransferBenefits.selectedBenefits[0]).to.equal('selectedBenefits value') - expect(response.body.benefits.intendedTransferBenefits.otherBenefitValue).to.equal('otherBenefitValue value') - expect(response.body.benefits.otherFactorsToConsider.highProfile.shouldBeConsidered).to.be.true - expect(response.body.benefits.otherFactorsToConsider.highProfile.furtherSpecification).to.equal('highProfile furtherSpecification value') - expect(response.body.benefits.otherFactorsToConsider.complexLandAndBuilding.shouldBeConsidered).to.be.true - expect(response.body.benefits.otherFactorsToConsider.complexLandAndBuilding.furtherSpecification).to.equal('complexLandAndBuildingFurtherSpecification Value') - expect(response.body.benefits.otherFactorsToConsider.financeAndDebt.shouldBeConsidered).to.be.true - expect(response.body.benefits.otherFactorsToConsider.financeAndDebt.furtherSpecification).to.equal('financeAndDebtFurtherSpecification value') - expect(response.body.benefits.otherFactorsToConsider.otherRisks.shouldBeConsidered).to.be.true - expect(response.body.benefits.otherFactorsToConsider.otherRisks.furtherSpecification).to.equal('otherRisksfurtherSpecification value') - expect(response.body.benefits.equalitiesImpactAssessmentConsidered).to.be.true - expect(response.body.benefits.isCompleted).to.be.true - expect(response.body.benefits.anyRisks).to.be.true - - expect(response.body.transferringAcademies[1].pupilNumbersAdditionalInformation).to.equal('pupilNumbersAdditionalInformation value') - expect(response.body.transferringAcademies[1].latestOfstedReportAdditionalInformation).to.equal('latestOfstedReportAdditionalInformation value') - expect(response.body.transferringAcademies[1].keyStage2PerformanceAdditionalInformation).to.equal('keyStage2PerformanceAdditionalInformation value') - expect(response.body.transferringAcademies[1].keyStage4PerformanceAdditionalInformation).to.equal('KeyStage4PerformanceAdditionalInformation value') - expect(response.body.transferringAcademies[1].keyStage5PerformanceAdditionalInformation).to.equal('keyStage5PerformanceAdditionalInformation value') - - expect(response.body.generalInformation).to.have.property('recommendation', 'recommendationString value') - expect(response.body.generalInformation).to.have.property('author', 'authorString value') - - // CHECK ASSIGNED USER WE SET COMES BACK IN GET RESPONSE - expect(response.body.assignedUser).to.have.property('fullName', 'userFullName value') - expect(response.body.assignedUser).to.have.property('emailAddress', 'userEmail@useremailval.com') - expect(response.body.assignedUser).to.have.property('id', '3fa85f64-5717-4562-b3fc-2c963f66afa6') - - cy.log(URN) - }) - }) -}) diff --git a/CypressTests/cypress/fixtures/payloads/Transfers/AuthorisedUserCanCreateNewMATTransfer.js b/CypressTests/cypress/fixtures/payloads/Transfers/AuthorisedUserCanCreateNewMATTransfer.js deleted file mode 100644 index 7056e31aa..000000000 --- a/CypressTests/cypress/fixtures/payloads/Transfers/AuthorisedUserCanCreateNewMATTransfer.js +++ /dev/null @@ -1,51 +0,0 @@ -const transferringAcademyUkprnAAndOutgoingTrustUkprn = 10066875 -const transferringAcademyUkprnB = 10066884 -const incomingTrustUkprn = 10066876 -const AuthorisedUserCanCreateNewMATTransferPayload -= { - transferringAcademies: [{ - outgoingAcademyUkprn: transferringAcademyUkprnB, - incomingTrustUkprn: 'string', - incomingTrustName: 'string', - region: 'string', - localAuthority: 'string', - pupilNumbersAdditionalInformation: 'string', - latestOfstedReportAdditionalInformation: 'string', - keyStage2PerformanceAdditionalInformation: 'string', - keyStage4PerformanceAdditionalInformation: 'string', - keyStage5PerformanceAdditionalInformation: 'string', - pfiScheme: 'string', - pfiSchemeDetails: 'string', - viabilityIssues: 'string', - financialDeficit: 'string', - mpNameAndParty: 'string', - distanceFromAcademyToTrustHq: 'string', - distanceFromAcademyToTrustHqDetails: 'string', - publishedAdmissionNumber: 'string', - }, - { - outgoingAcademyUkprn: incomingTrustUkprn, - incomingTrustUkprn: 'string', - incomingTrustName: 'string', - region: 'string', - localAuthority: 'string', - pupilNumbersAdditionalInformation: 'string', - latestOfstedReportAdditionalInformation: 'string', - keyStage2PerformanceAdditionalInformation: 'string', - keyStage4PerformanceAdditionalInformation: 'string', - keyStage5PerformanceAdditionalInformation: 'string', - pfiScheme: 'string', - pfiSchemeDetails: 'string', - viabilityIssues: 'string', - financialDeficit: 'string', - mpNameAndParty: 'string', - distanceFromAcademyToTrustHq: 'string', - distanceFromAcademyToTrustHqDetails: 'string', - publishedAdmissionNumber: 'string', - }, - ], - outgoingTrustUkprn: transferringAcademyUkprnAAndOutgoingTrustUkprn, - outgoingTrustName: 'Test', - isFormAMat: true, -} -module.exports = { AuthorisedUserCanCreateNewMATTransferPayload }