Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add e2e tests for accepting rejecting cancelling cases #826

Merged
merged 3 commits into from
Sep 18, 2023

Amended to run tests for both change of name and change of date of bi…

3001626
Select commit
Loading
Failed to load commit list.
Sign in for the full log view
Merged

Add e2e tests for accepting rejecting cancelling cases #826

Amended to run tests for both change of name and change of date of bi…
3001626
Select commit
Loading
Failed to load commit list.
This check has been archived and is scheduled for deletion. Learn more about checks retention
GitHub Actions / Support UI test results succeeded Sep 18, 2023 in 0s

Support UI test results ✅

Tests passed successfully

✅ TeachingRecordSystem/tests/TeachingRecordSystem.SupportUi.Tests/TestResults/_fv-az1244-383_2023-09-18_14_19_05.trx

64 tests were completed in 14s with 64 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
TeachingRecordSystem.SupportUi.Tests.PageTests.Cases.EditCase.AcceptTests 6✅ 8s
TeachingRecordSystem.SupportUi.Tests.PageTests.Cases.EditCase.IndexTests 6✅ 8s
TeachingRecordSystem.SupportUi.Tests.PageTests.Cases.EditCase.RejectTests 8✅ 9s
TeachingRecordSystem.SupportUi.Tests.PageTests.Cases.IndexTests 3✅ 674ms
TeachingRecordSystem.SupportUi.Tests.PageTests.Persons.IndexTests 6✅ 8s
TeachingRecordSystem.SupportUi.Tests.PageTests.Persons.PersonDetail.IndexTests 3✅ 4s
TeachingRecordSystem.SupportUi.Tests.PageTests.Users.AddUser.ConfirmTests 8✅ 4s
TeachingRecordSystem.SupportUi.Tests.PageTests.Users.AddUser.IndexTests 7✅ 2s
TeachingRecordSystem.SupportUi.Tests.PageTests.Users.EditUserTests 14✅ 8s
TeachingRecordSystem.SupportUi.Tests.PageTests.Users.UsersTests 3✅ 3s

✅ 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.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