Skip to content

Commit

Permalink
Merge pull request #321 from DFE-Digital/AutomateTransfers
Browse files Browse the repository at this point in the history
Automate transfers
  • Loading branch information
dangood84 authored Sep 12, 2023
2 parents b33d689 + 97748c5 commit abd43c3
Show file tree
Hide file tree
Showing 15 changed files with 1,755 additions and 0 deletions.
8 changes: 8 additions & 0 deletions CypressTests/cypress.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
const { defineConfig } = require('cypress')
const dotenv = require('dotenv')
const { generateZapReport } = require('./cypress/plugins/generateZapReport')

dotenv.config();

module.exports = defineConfig({
env: {
url: process.env.url,
apiKey: process.env.apiKey,
URN: process.env.URN
},
video: false,
e2e: {
setupNodeEvents(on, config) {
Expand Down
825 changes: 825 additions & 0 deletions CypressTests/cypress/e2e/Transfers-MAT.cy.js

Large diffs are not rendered by default.

786 changes: 786 additions & 0 deletions CypressTests/cypress/e2e/Transfers-SAT.cy.js

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

const AuthorisedUserCanAssignUserDataPayload =
{
"urn": Cypress.env('URN'),
"userId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"userEmail": "[email protected]",
"userFullName": "userFullName value"
}
module.exports = { AuthorisedUserCanAssignUserDataPayload }
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

const transferringAcademyUkprnAAndOutgoingTrustUkprn = 10066875
const transferringAcademyUkprnB = 10066884
const incomingTrustUkprn = 10066876
const AuthorisedUserCanCreateNewMATTransferPayload =
{
"transferringAcademyUkprns": [
transferringAcademyUkprnAAndOutgoingTrustUkprn,
transferringAcademyUkprnB
],
"outgoingTrustUkprn": transferringAcademyUkprnAAndOutgoingTrustUkprn,
"incomingTrustUkprn": incomingTrustUkprn
}
module.exports = {AuthorisedUserCanCreateNewMATTransferPayload}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

const transferringAcademyUkprnAAndOutgoingTrustUkprn = 10066875
const incomingTrustUkprn = 10066876
const AuthorisedUserCanCreateNewSATTransferPayload =
{
"transferringAcademyUkprns": [
transferringAcademyUkprnAAndOutgoingTrustUkprn,
],
"outgoingTrustUkprn": transferringAcademyUkprnAAndOutgoingTrustUkprn,
"incomingTrustUkprn": incomingTrustUkprn
}
module.exports = {AuthorisedUserCanCreateNewSATTransferPayload}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

const AuthorisedUserCanSetAdditionalSchoolDataPayload =
{
"urn": Cypress.env('URN'),
"transferringAcademyUkprn": 10066875,
"latestOfstedReportAdditionalInformation": "latestOfstedReportAdditionalInformation value",
"pupilNumbersAdditionalInformation": "pupilNumbersAdditionalInformation value",
"keyStage2PerformanceAdditionalInformation": "keyStage2PerformanceAdditionalInformation value",
"keyStage4PerformanceAdditionalInformation": "KeyStage4PerformanceAdditionalInformation value",
"keyStage5PerformanceAdditionalInformation": "keyStage5PerformanceAdditionalInformation value"
}
module.exports = { AuthorisedUserCanSetAdditionalSchoolDataPayload }
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
const AuthorisedUserCanSetBenefitsPayload =
{
"urn": Cypress.env('URN'),
"intendedTransferBenefits": {
"selectedBenefits": [
"selectedBenefits value"
],
"otherBenefitValue": "otherBenefitValue value"
},
"otherFactorsToConsider": {
"highProfile": {
"shouldBeConsidered": true,
"furtherSpecification": "highProfile furtherSpecification value"
},
"complexLandAndBuilding": {
"shouldBeConsidered": true,
"furtherSpecification": "complexLandAndBuildingFurtherSpecification Value"
},
"financeAndDebt": {
"shouldBeConsidered": true,
"furtherSpecification": "financeAndDebtFurtherSpecification value"
},
"otherRisks": {
"shouldBeConsidered": true,
"furtherSpecification": "otherRisksfurtherSpecification value"
}
},
"equalitiesImpactAssessmentConsidered": true,
"anyRisks": true,
"isCompleted": true
}
module.exports = { AuthorisedUserCanSetBenefitsPayload }
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

const AuthorisedUserCanSetFeaturesPayload =
{
"urn": Cypress.env('URN'),
"id": 1,
"typeOfTransfer": "typeOfTransfer Value",
"whoInitiatedTheTransfer": "whoInitiatedTheTransfer Value",
"isCompleted": true
}
module.exports = { AuthorisedUserCanSetFeaturesPayload }
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const AuthorisedUserCanSetLegalRequirementsPayload =
{
"urn": Cypress.env('URN'),
"outgoingTrustConsent": "outgoing Trust Consent Value",
"incomingTrustAgreement": "incoming Trust Consent Value",
"diocesanConsent": "diocesanConsent Value",
"isCompleted": true
}
module.exports = { AuthorisedUserCanSetLegalRequirementsPayload }
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

const AuthorisedUserCanSetRationalePayload =
{
"urn": Cypress.env('URN'),
"projectRationale": "projectRationale",
"trustSponsorRationale": "trustSponsorRationale",
"isCompleted": true

}
module.exports = {AuthorisedUserCanSetRationalePayload}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const AuthorisedUserCanSetTransferDatesPayload =
{
"urn": Cypress.env('urn'),
"htbDate": "2023-08-23T09:50:45.404Z",
"targetDateForTransfer": "2023-08-23T09:50:45.404Z"
}
module.exports = { AuthorisedUserCanSetTransferDatesPayload }
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const AuthorisedUserCanSetTrustInfoAndProjectDatesPayload =
{
"urn": Cypress.env('urn'),
"recommendation": "recommendationString value",
"author": "authorString value"
}
module.exports = { AuthorisedUserCanSetTrustInfoAndProjectDatesPayload }
13 changes: 13 additions & 0 deletions CypressTests/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions CypressTests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"zaproxy": "^2.0.0-rc.2"
},
"devDependencies": {
"dotenv": "^16.3.1",
"eslint": "^8.38.0",
"eslint-plugin-cypress": "^2.13.2"
}
Expand Down

0 comments on commit abd43c3

Please sign in to comment.