diff --git a/Dfe.ManageFreeSchoolProjects/Dfe.ManageFreeSchoolProjects.API/UseCases/Project/Tasks/OfstedInspection/OfstedInspectionTaskBuilder.cs b/Dfe.ManageFreeSchoolProjects/Dfe.ManageFreeSchoolProjects.API/UseCases/Project/Tasks/OfstedInspection/OfstedInspectionTaskBuilder.cs index 225d7929b..2ac5a0ea7 100644 --- a/Dfe.ManageFreeSchoolProjects/Dfe.ManageFreeSchoolProjects.API/UseCases/Project/Tasks/OfstedInspection/OfstedInspectionTaskBuilder.cs +++ b/Dfe.ManageFreeSchoolProjects/Dfe.ManageFreeSchoolProjects.API/UseCases/Project/Tasks/OfstedInspection/OfstedInspectionTaskBuilder.cs @@ -28,13 +28,14 @@ public static OfstedInspectionTask Build(Milestones milestones) } - private static YesNoNotApplicable InspectionConditionsMet(string condition) + private static YesNoNotApplicable? InspectionConditionsMet(string condition) { return condition switch { "Yes" => YesNoNotApplicable.Yes, "No" => YesNoNotApplicable.No, - "Not applicable" => YesNoNotApplicable.NotApplicable + "Not applicable" => YesNoNotApplicable.NotApplicable, + _ => null }; } } diff --git a/Dfe.ManageFreeSchoolProjects/Dfe.ManageFreeSchoolProjects.CypressTests/cypress/e2e/tasks/Getting-ready-to-open/ofsted-pre-registration.cy.ts b/Dfe.ManageFreeSchoolProjects/Dfe.ManageFreeSchoolProjects.CypressTests/cypress/e2e/tasks/Getting-ready-to-open/ofsted-pre-registration.cy.ts index 0de83794e..871ffec80 100644 --- a/Dfe.ManageFreeSchoolProjects/Dfe.ManageFreeSchoolProjects.CypressTests/cypress/e2e/tasks/Getting-ready-to-open/ofsted-pre-registration.cy.ts +++ b/Dfe.ManageFreeSchoolProjects/Dfe.ManageFreeSchoolProjects.CypressTests/cypress/e2e/tasks/Getting-ready-to-open/ofsted-pre-registration.cy.ts @@ -126,7 +126,6 @@ describe("Testing the ofsted pre registration", () => { .selectAnyActionsToMeetConditionCompletedOption("Yes") .enterDateThatInspectionAndAnyActionsCompleted("30", "01", "2050") .checkProposedToOpenOnGias() - .checkInspectionConditionsMet() .checkSavedToWorkplaces() .clickContinue() @@ -167,8 +166,9 @@ describe("Testing the ofsted pre registration", () => { afterInspectionEditPage .uncheckSharedOutcomeWithTrust() + .selectAnyActionsToMeetConditionCompletedOption("Not applicable") + .enterDateThatInspectionAndAnyActionsCompleted(" ", " ", " ") .uncheckProposedToOpenOnGias() - .uncheckInspectionConditionsMet() .uncheckSavedToWorkplaces() .clickContinue() @@ -181,7 +181,7 @@ describe("Testing the ofsted pre registration", () => { .summaryShows("Confirmed contact details for Ofsted and the trust to liaise with each other").IsEmpty().HasChangeLink() .summaryShows("Added the block and contact details to openers spreadsheet").IsEmpty().HasChangeLink() .summaryShows("Shared the outcome with the trust").IsEmpty().HasChangeLink() - .summaryShows("Any actions to meet conditions have been completed").IsEmpty().HasChangeLink() + .summaryShows("Any actions to meet conditions have been completed").HasValue("Not applicable").HasChangeLink() .summaryShows("Date that inspection and any actions completed").IsEmpty().HasChangeLink() .summaryShows("Requested that the school is changed to 'proposed to open' on GIAS").IsEmpty().HasChangeLink() .summaryShows("Saved inspection documents and G6 agreement in Workplaces folder").IsEmpty().HasChangeLink() diff --git a/Dfe.ManageFreeSchoolProjects/Dfe.ManageFreeSchoolProjects.CypressTests/cypress/pages/tasks/Getting-ready-to-open/edit-ofsted-after-inspection-cy.ts b/Dfe.ManageFreeSchoolProjects/Dfe.ManageFreeSchoolProjects.CypressTests/cypress/pages/tasks/Getting-ready-to-open/edit-ofsted-after-inspection-cy.ts index cc1f4d298..6f2642fbf 100644 --- a/Dfe.ManageFreeSchoolProjects/Dfe.ManageFreeSchoolProjects.CypressTests/cypress/pages/tasks/Getting-ready-to-open/edit-ofsted-after-inspection-cy.ts +++ b/Dfe.ManageFreeSchoolProjects/Dfe.ManageFreeSchoolProjects.CypressTests/cypress/pages/tasks/Getting-ready-to-open/edit-ofsted-after-inspection-cy.ts @@ -4,10 +4,6 @@ class AfterInspectionEditPage { cy.getById("shared-outcome-with-trust").check() return this } - checkInspectionConditionsMet(): this { - cy.getById("inspection-conditions-met").check() - return this - } checkProposedToOpenOnGias(): this { cy.getById("proposed-to-open-on-gias").check() @@ -22,10 +18,6 @@ class AfterInspectionEditPage { cy.getById("shared-outcome-with-trust").uncheck() return this } - uncheckInspectionConditionsMet(): this { - cy.getById("inspection-conditions-met").uncheck() - return this - } uncheckProposedToOpenOnGias(): this { cy.getById("proposed-to-open-on-gias").uncheck() @@ -36,6 +28,11 @@ class AfterInspectionEditPage { return this } + clearDateThatInspectionAndAnyActionsCompleted(): this { + cy.getById("date-inspection-and-any-actions-completed").clear() + return this + } + enterDateThatInspectionAndAnyActionsCompleted(day : string, month: string, year: string): this { cy.enterDate("date-inspection-and-any-actions-completed", day, month, year) return this