Skip to content

Fix to stop induction records from being created when not required #1232

Fix to stop induction records from being created when not required

Fix to stop induction records from being created when not required #1232

GitHub Actions / Support UI test results succeeded Nov 3, 2023 in 1s

Support UI test results ✅

Tests passed successfully

✅ TeachingRecordSystem/tests/TeachingRecordSystem.SupportUi.Tests/TestResults/_fv-az189-232_2023-11-03_13_07_48.trx

135 tests were completed in 53s with 135 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
TeachingRecordSystem.SupportUi.Tests.PageTests.Alerts.AddAlert.ConfirmTests 6✅ 35s
TeachingRecordSystem.SupportUi.Tests.PageTests.Alerts.AddAlert.IndexTests 6✅ 34s
TeachingRecordSystem.SupportUi.Tests.PageTests.Alerts.Alert.IndexTests 5✅ 22s
TeachingRecordSystem.SupportUi.Tests.PageTests.Alerts.CloseAlert.ConfirmTests 4✅ 32s
TeachingRecordSystem.SupportUi.Tests.PageTests.Alerts.CloseAlert.IndexTests 7✅ 37s
TeachingRecordSystem.SupportUi.Tests.PageTests.Cases.EditCase.AcceptTests 6✅ 30s
TeachingRecordSystem.SupportUi.Tests.PageTests.Cases.EditCase.IndexTests 6✅ 27s
TeachingRecordSystem.SupportUi.Tests.PageTests.Cases.EditCase.RejectTests 8✅ 35s
TeachingRecordSystem.SupportUi.Tests.PageTests.Cases.IndexTests 3✅ 1s
TeachingRecordSystem.SupportUi.Tests.PageTests.Persons.IndexTests 6✅ 25s
TeachingRecordSystem.SupportUi.Tests.PageTests.Persons.PersonDetail.AlertsTests 5✅ 30s
TeachingRecordSystem.SupportUi.Tests.PageTests.Persons.PersonDetail.ChangeLogTests 3✅ 22s
TeachingRecordSystem.SupportUi.Tests.PageTests.Persons.PersonDetail.EditDateOfBirth.ConfirmTests 5✅ 29s
TeachingRecordSystem.SupportUi.Tests.PageTests.Persons.PersonDetail.EditDateOfBirth.IndexTests 13✅ 43s
TeachingRecordSystem.SupportUi.Tests.PageTests.Persons.PersonDetail.EditName.ConfirmTests 8✅ 40s
TeachingRecordSystem.SupportUi.Tests.PageTests.Persons.PersonDetail.EditName.IndexTests 9✅ 38s
TeachingRecordSystem.SupportUi.Tests.PageTests.Persons.PersonDetail.IndexTests 3✅ 17s
TeachingRecordSystem.SupportUi.Tests.PageTests.Users.AddUser.ConfirmTests 8✅ 21s
TeachingRecordSystem.SupportUi.Tests.PageTests.Users.AddUser.IndexTests 7✅ 16s
TeachingRecordSystem.SupportUi.Tests.PageTests.Users.EditUserTests 14✅ 34s
TeachingRecordSystem.SupportUi.Tests.PageTests.Users.UsersTests 3✅ 20s

✅ TeachingRecordSystem.SupportUi.Tests.PageTests.Alerts.AddAlert.ConfirmTests

✅ Get_StateHasMissingRequiredData_RedirectsToIndex(sanctionCode: "G1", details: null, startDateString: null)
✅ Get_StateHasMissingRequiredData_RedirectsToIndex(sanctionCode: null, details: "These are some test details", startDateString: null)
✅ Get_StateHasMissingRequiredData_RedirectsToIndex(sanctionCode: null, details: null, startDateString: "2021-01-01")
✅ Get_ValidRequest_RendersExpectedContent
✅ Get_WithPersonIdForNonExistentPerson_ReturnsNotFound
✅ Post_ValidRequest_AddsAlertAndCompletesJourney

✅ TeachingRecordSystem.SupportUi.Tests.PageTests.Alerts.AddAlert.IndexTests

✅ Get_ValidRequestWithPopulatedDataInJourneyState_PopulatesModelFromJourneyState
✅ Get_WithPersonIdForNonExistentPerson_ReturnsNotFound
✅ Get_WithPersonIdForValidPerson_ReturnsOk
✅ Post_EmptyRequiredFields_ReturnsError
✅ Post_InvalidLinkUrl_ReturnsError
✅ Post_ValidData_RedirectsToConfirmPage

✅ TeachingRecordSystem.SupportUi.Tests.PageTests.Alerts.Alert.IndexTests

✅ Get_ValidRequest_RendersExpectedContent(startDateString: "2021-01-01", endDateString: "2022-03-05", detailsLink: "http://www.gov.uk", isSpent: True, isActive: True, expectedAlertStatus: Closed)
✅ Get_ValidRequest_RendersExpectedContent(startDateString: "2021-01-01", endDateString: "2022-03-05", detailsLink: null, isSpent: True, isActive: False, expectedAlertStatus: Inactive)
✅ Get_ValidRequest_RendersExpectedContent(startDateString: "2021-01-01", endDateString: null, detailsLink: "http://www.gov.uk", isSpent: False, isActive: False, expectedAlertStatus: Inactive)
✅ Get_ValidRequest_RendersExpectedContent(startDateString: "2021-01-01", endDateString: null, detailsLink: null, isSpent: False, isActive: True, expectedAlertStatus: Active)
✅ Get_WithAlertIdForNonExistentAlert_ReturnsNotFound

✅ TeachingRecordSystem.SupportUi.Tests.PageTests.Alerts.CloseAlert.ConfirmTests

✅ Get_StateHasNoEndDate_RedirectsToIndex
✅ Get_ValidRequest_RendersExpectedContent
✅ Get_WithAlertIdForNonExistentAlert_ReturnsNotFound
✅ Post_ValidRequest_ClosesAlertAndCompletesJourney

✅ TeachingRecordSystem.SupportUi.Tests.PageTests.Alerts.CloseAlert.IndexTests

✅ Get_ValidRequestWithEndDateInJourneyState_PopulatesEndDateFromJourneyState
✅ Get_WithAlertIdForActiveAlert_ReturnsOk
✅ Get_WithAlertIdForEndedAlert_ReturnsNotFound
✅ Get_WithAlertIdForNonExistentAlert_ReturnsNotFound
✅ Post_EmptyEndDate_ReturnsError
✅ Post_EndDateBeforeStartDate_ReturnsError
✅ Post_ValidEndDate_RedirectsToConfirmPage

✅ TeachingRecordSystem.SupportUi.Tests.PageTests.Cases.EditCase.AcceptTests

✅ Get_WhenUserDoesNotHaveHelpdeskOrAdministratorRole_ReturnsForbidden
✅ Get_WhenUserHasNoRoles_ReturnsForbidden
✅ Get_WithTicketNumberForInactiveIncident_ReturnsBadRequest
✅ Get_WithTicketNumberForNonExistentIncident_ReturnsNotFound
✅ Post_ValidRequest_RedirectsWithFlashMessage
✅ Post_WhenUserDoesNotHaveHelpdeskOrAdministratorRole_ReturnsForbidden

✅ TeachingRecordSystem.SupportUi.Tests.PageTests.Cases.EditCase.IndexTests

✅ Get_UserWithNoRoles_ReturnsForbidden
✅ Get_UserWithoutHelpdeskOrAdministratorRole_ReturnsForbidden
✅ Get_WithTicketNumberForActiveDateOfBirthChangeIncident_RendersExpectedContent
✅ Get_WithTicketNumberForActiveNameChangeIncident_RendersExpectedContent
✅ Get_WithTicketNumberForInactiveIncident_ReturnsBadRequest
✅ Get_WithTicketNumberForNonExistentIncident_ReturnsNotFound

✅ TeachingRecordSystem.SupportUi.Tests.PageTests.Cases.EditCase.RejectTests

✅ Get_WhenUserDoesNotHaveHelpdeskOrAdministratorRole_ReturnsForbidden
✅ Get_WhenUserHasNoRoles_ReturnsForbidden
✅ Get_WithTicketNumberForInactiveIncident_ReturnsBadRequest
✅ Get_WithTicketNumberForNonExistentIncident_ReturnsNotFound
✅ Post_WhenRejectionReasonChoiceHasNoSelection_ReturnsError
✅ Post_WhenRejectionReasonChoiceIsChangeNoLongerRequired_RedirectsWithFlashMessage
✅ Post_WhenRejectionReasonChoiceIsNotChangeNoLongerRequired_RedirectsWithFlashMessage
✅ Post_WhenUserDoesNotHaveHelpdeskOrAdministratorRole_ReturnsForbidden

✅ TeachingRecordSystem.SupportUi.Tests.PageTests.Cases.IndexTests

✅ Get_UserWithNoRoles_ReturnsForbidden
✅ Get_ValidRequest_RendersExpectedContent
✅ Get_ValidRequestNoActiveCases_RendersExpectedContent

✅ TeachingRecordSystem.SupportUi.Tests.PageTests.Persons.IndexTests

✅ Get_WithEmptySearchParameter_DisplaysSearchFormOnly
✅ Get_WithNoQueryParameters_DisplaysSearchFormOnly
✅ Get_WithSearchQueryParameterWithNoMatches_DisplaysNoMatches
✅ Get_WithSearchThatLooksLikeADate_DisplaysMatchesOnDateOfBirth
✅ Get_WithSearchThatLooksLikeAName_DisplaysMatchesOnName
✅ Get_WithSearchThatLooksLikeATrn_DisplaysMatchOnTrn

✅ TeachingRecordSystem.SupportUi.Tests.PageTests.Persons.PersonDetail.AlertsTests

✅ Get_WithPersonIdForNonExistentPerson_ReturnsNotFound
✅ Get_WithPersonIdForPersonWithCurrentAndPreviousAlerts_DisplaysExpectedContent
✅ Get_WithPersonIdForPersonWithNoAlerts_DisplaysNoCurrentAlerts
✅ Get_WithPersonIdForPersonWithOnlyCurrentAlerts_DisplaysExpectedContent
✅ Get_WithPersonIdForPersonWithOnlyPreviousAlerts_DisplaysExpectedContent

✅ TeachingRecordSystem.SupportUi.Tests.PageTests.Persons.PersonDetail.ChangeLogTests

✅ Get_WithPersonIdForNonExistentPerson_ReturnsNotFound
✅ Get_WithPersonIdForPersonWithNoNotes_DisplaysNoChanges
✅ Get_WithPersonIdForPersonWithNotes_DisplaysChangesInDescendingOrder

✅ TeachingRecordSystem.SupportUi.Tests.PageTests.Persons.PersonDetail.EditDateOfBirth.ConfirmTests

✅ Get_StateHasNoDateOfBirth_RedirectsToIndex
✅ Get_ValidRequest_RendersExpectedContent
✅ Get_WithPersonIdForNonExistentPerson_ReturnsNotFound
✅ Post_ValidRequest_UpdatesDateOfBirthAndCompletesJourney
✅ Post_WithPersonIdForNonExistentPerson_ReturnsNotFound

✅ TeachingRecordSystem.SupportUi.Tests.PageTests.Persons.PersonDetail.EditDateOfBirth.IndexTests

✅ Get_ValidRequestForNewJourney_PopulatesModelFromDqt
✅ Get_ValidRequestWithPopulatedDataInJourneyState_PopulatesModelFromJourneyState
✅ Get_WithPersonIdForNonExistentPerson_ReturnsNotFound
✅ Post_WithInvalidData_ReturnsError(day: "", month: "", year: "", expectedErrorElementId: "DateOfBirth", expectedErrorMessage: "Enter a date of birth")
✅ Post_WithInvalidData_ReturnsError(day: "", month: "", year: "1969", expectedErrorElementId: "DateOfBirth", expectedErrorMessage: "Date of birth must include a day and month")
✅ Post_WithInvalidData_ReturnsError(day: "", month: "10", year: "", expectedErrorElementId: "DateOfBirth", expectedErrorMessage: "Date of birth must include a day and year")
✅ Post_WithInvalidData_ReturnsError(day: "", month: "10", year: "1969", expectedErrorElementId: "DateOfBirth", expectedErrorMessage: "Date of birth must include a day")
✅ Post_WithInvalidData_ReturnsError(day: "10", month: "", year: "", expectedErrorElementId: "DateOfBirth", expectedErrorMessage: "Date of birth must include a month and year")
✅ Post_WithInvalidData_ReturnsError(day: "10", month: "", year: "1969", expectedErrorElementId: "DateOfBirth", expectedErrorMessage: "Date of birth must include a month")
✅ Post_WithInvalidData_ReturnsError(day: "10", month: "10", year: "", expectedErrorElementId: "DateOfBirth", expectedErrorMessage: "Date of birth must include a year")
✅ Post_WithInvalidData_ReturnsError(day: "32", month: "10", year: "1969", expectedErrorElementId: "DateOfBirth", expectedErrorMessage: "Date of birth must be a real date")
✅ Post_WithInvalidData_ReturnsError(day: "Blah", month: "Blah", year: "Blah", expectedErrorElementId: "DateOfBirth", expectedErrorMessage: "Date of birth must be a real date")
✅ Post_WithValidData_RedirectsToConfirmPage

✅ TeachingRecordSystem.SupportUi.Tests.PageTests.Persons.PersonDetail.EditName.ConfirmTests

✅ Get_StateHasMissingRequiredData_RedirectsToIndex(firstName: "NewFirstName", middleName: null, lastName: null)
✅ Get_StateHasMissingRequiredData_RedirectsToIndex(firstName: null, middleName: "NewMiddleName", lastName: null)
✅ Get_StateHasMissingRequiredData_RedirectsToIndex(firstName: null, middleName: null, lastName: "NewLastName")
✅ Get_StateHasMissingRequiredData_RedirectsToIndex(firstName: null, middleName: null, lastName: null)
✅ Get_ValidRequest_RendersExpectedContent
✅ Get_WithPersonIdForNonExistentPerson_ReturnsNotFound
✅ Post_ValidRequest_UpdatesNameAndCompletesJourney
✅ Post_WithPersonIdForNonExistentPerson_ReturnsNotFound

✅ TeachingRecordSystem.SupportUi.Tests.PageTests.Persons.PersonDetail.EditName.IndexTests

✅ Get_ValidRequestForNewJourney_PopulatesModelFromDqt
✅ Get_ValidRequestWithPopulatedDataInJourneyState_PopulatesModelFromJourneyState
✅ Get_WithPersonIdForNonExistentPerson_ReturnsNotFound
✅ Post_WithInvalidData_ReturnsExpectedErrors(firstName: "", middleName: "", lastName: "Bloggs", expectedErrorElementId: "FirstName", expectedErrorMessage: "Enter a first name")
✅ Post_WithInvalidData_ReturnsExpectedErrors(firstName: "Joe", middleName: "", lastName: "", expectedErrorElementId: "LastName", expectedErrorMessage: "Enter a last name")
✅ Post_WithInvalidData_ReturnsExpectedErrors(firstName: "Joe", middleName: "", lastName: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"···, expectedErrorElementId: "LastName", expectedErrorMessage: "Last name must be 100 characters or less")
✅ Post_WithInvalidData_ReturnsExpectedErrors(firstName: "Joe", middleName: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"···, lastName: "Bloggs", expectedErrorElementId: "MiddleName", expectedErrorMessage: "Middle name must be 100 characters or less")
✅ Post_WithInvalidData_ReturnsExpectedErrors(firstName: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"···, middleName: "", lastName: "Bloggs", expectedErrorElementId: "FirstName", expectedErrorMessage: "First name must be 100 characters or less")
✅ Post_WithValidData_RedirectsToConfirmPage

✅ TeachingRecordSystem.SupportUi.Tests.PageTests.Persons.PersonDetail.IndexTests

✅ Get_WithPersonIdForExistingPersonWithAllPropertiesSet_ReturnsExpectedContent
✅ Get_WithPersonIdForExistingPersonWithMissingProperties_ReturnsExpectedContent
✅ Get_WithPersonIdForNonExistentPerson_ReturnsNotFound

✅ TeachingRecordSystem.SupportUi.Tests.PageTests.Users.AddUser.ConfirmTests

✅ Get_UserIdDoesNotExist_ReturnsNotFound
✅ Get_UserWithoutAdministratorRole_ReturnsForbidden
✅ Get_ValidRequest_RendersExpectedContent
✅ Post_NoName_RendersError
✅ Post_NoRolesSelected_RendersError
✅ Post_UserIdDoesNotExist_ReturnsNotFound
✅ Post_UserWithoutAdministratorRole_ReturnsForbidden
✅ Post_ValidRequest_CreatesUserEmitsEventAndRedirectsWithFlashMessage

✅ TeachingRecordSystem.SupportUi.Tests.PageTests.Users.AddUser.IndexTests

✅ Get_UserWithoutAdministratorRole_ReturnsForbidden
✅ Get_WithAdministratorUser_ReturnsOk
✅ Post_EmailDoesNotHaveSuffix_AppendsEducationSuffixBeforeSearching
✅ Post_NoEmailEntered_RendersErrorMessage
✅ Post_UserFound_RedirectsToConfirmPage
✅ Post_UserNotFound_RendersErrorMessage
✅ Post_UserWithoutAdministratorRole_ReturnsForbidden

✅ TeachingRecordSystem.SupportUi.Tests.PageTests.Users.EditUserTests

✅ Get_UserIdDoesNotExist_ReturnsNotFound
✅ Get_UserWithOutAdministratorRole_ReturnsForbidden
✅ Get_ValidRequest_RendersExpectedContent
✅ Post_NoName_RendersError
✅ Post_NoRolesSelected_RendersError
✅ Post_UserExistsButIsAlreadyActive_ReturnsBadRequest
✅ Post_UserExistsButIsAlreadyDeactivated_ReturnsBadRequest
✅ Post_UserIdDoesNotExist_ReturnsNotFound
✅ Post_UserWithoutAdministratorRole_ReturnsForbidden
✅ Post_ValidRequest_ActivatesUsersEmitsEventAndRedirectsWithFlashMessage
✅ Post_ValidRequest_CreatesUserEmitsEventAndRedirectsWithFlashMessage(changeName: False, changeRoles: True, expectedEvent: True, expectedChanges: Roles)
✅ Post_ValidRequest_CreatesUserEmitsEventAndRedirectsWithFlashMessage(changeName: True, changeRoles: False, expectedEvent: True, expectedChanges: Name)
✅ Post_ValidRequest_CreatesUserEmitsEventAndRedirectsWithFlashMessage(changeName: True, changeRoles: True, expectedEvent: True, expectedChanges: Name | Roles)
✅ Post_ValidRequest_DeactivatesUsersEmitsEventAndRedirectsWithFlashMessage

✅ TeachingRecordSystem.SupportUi.Tests.PageTests.Users.UsersTests

✅ Get_UserWithAdministratorRole_ReturnsOk
✅ Get_UserWithOutAdministratorRole_ReturnsForbidden
✅ Get_ValidRequestAndUsersFound_RendersUsers