Skip to content

Commit

Permalink
cypress tests done
Browse files Browse the repository at this point in the history
  • Loading branch information
zhodges-nimble committed Oct 3, 2024
1 parent 57886a6 commit 95a4cc0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
};
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ describe("Testing the ofsted pre registration", () => {
.selectAnyActionsToMeetConditionCompletedOption("Yes")
.enterDateThatInspectionAndAnyActionsCompleted("30", "01", "2050")
.checkProposedToOpenOnGias()
.checkInspectionConditionsMet()
.checkSavedToWorkplaces()
.clickContinue()

Expand Down Expand Up @@ -167,8 +166,9 @@ describe("Testing the ofsted pre registration", () => {

afterInspectionEditPage
.uncheckSharedOutcomeWithTrust()
.selectAnyActionsToMeetConditionCompletedOption("Not applicable")
.enterDateThatInspectionAndAnyActionsCompleted(" ", " ", " ")
.uncheckProposedToOpenOnGias()
.uncheckInspectionConditionsMet()
.uncheckSavedToWorkplaces()
.clickContinue()

Expand All @@ -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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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()
Expand All @@ -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
Expand Down

0 comments on commit 95a4cc0

Please sign in to comment.