Skip to content

#5878 - Student Forms e2e Tests - completeFormSubmission#5970

Open
andrewsignori-aot wants to merge 7 commits intomainfrom
feature/#5878-forms-e2e-tests-part-6
Open

#5878 - Student Forms e2e Tests - completeFormSubmission#5970
andrewsignori-aot wants to merge 7 commits intomainfrom
feature/#5878-forms-e2e-tests-part-6

Conversation

@andrewsignori-aot
Copy link
Copy Markdown
Collaborator

@andrewsignori-aot andrewsignori-aot commented Mar 27, 2026

PR Goal

Add some level of API endpoints E2E tests to all new endpoints introduced during the new forms implementation. At least one scenario for each endpoint must be present, and more scenarios can be added if time allows it. Suggestions for scenarios not covered are appreciated, but will be taken care of based on criticality and time available 😉

Ministry - completeFormSubmission

  • Should complete a student appeal, create an appeal assessment, and generate a notification when all items have decisions and the user has approval authorization.
  • Should complete a student form submission, update the modified independent status to Approved, and generate a notification when the user completes the form submission and the user has approval authorization.
  • Should complete a student form submission, update the modified independent status to Declined and generate a notification when the user completes the form submission and the user has approval authorization.
  • Should throw an unprocessable entity error when attempting to complete a student appeal but some items were updated.
  • Should throw an unprocessable entity error when attempting to complete a student appeal but the application was edited.
  • Should throw an unprocessable entity error when attempting to complete a student form but an item decision is pending.
  • Should throw a forbidden error when attempting to complete the form of category Student appeal but the user lacks the necessary roles.
  • Should throw a forbidden error when attempting to complete the form of category Student form but the user lacks the necessary roles.
  • Should throw a forbidden error when attempting to complete the form but the user does not have access to the endpoint.

This comment was marked as outdated.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

@sonarqubecloud
Copy link
Copy Markdown

@github-actions
Copy link
Copy Markdown

Backend Unit Tests Coverage Report

Totals Coverage
Statements: 20.11% ( 4578 / 22768 )
Methods: 9.47% ( 262 / 2767 )
Lines: 24.48% ( 3930 / 16052 )
Branches: 9.77% ( 386 / 3949 )

@github-actions
Copy link
Copy Markdown

E2E Workflow Workers Coverage Report

Totals Coverage
Statements: 48.27% ( 2713 / 5620 )
Methods: 38.26% ( 285 / 745 )
Lines: 55.14% ( 2050 / 3718 )
Branches: 32.67% ( 378 / 1157 )

@github-actions
Copy link
Copy Markdown

E2E Queue Consumers Coverage Report

Totals Coverage
Statements: 79.33% ( 9156 / 11542 )
Methods: 78.47% ( 1181 / 1505 )
Lines: 82.66% ( 6882 / 8326 )
Branches: 63.88% ( 1093 / 1711 )

@andrewsignori-aot andrewsignori-aot marked this pull request as ready for review March 28, 2026 00:21
@github-actions
Copy link
Copy Markdown

E2E SIMS API Coverage Report

Totals Coverage
Statements: 67.64% ( 13424 / 19846 )
Methods: 64.98% ( 1592 / 2450 )
Lines: 70.93% ( 9680 / 13648 )
Branches: 57.42% ( 2152 / 3748 )

creator: ministryAuditUser,
messagePayload: {
email_address: student.user.email,
template_id: "fed6b26e-d1f2-4a8c-bfe5-5cb66c00458b",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we have a constant for this value: GC_NOTIFY_TEMPLATE_IDS

creator: ministryAuditUser,
messagePayload: {
email_address: student.user.email,
template_id: "fed6b26e-d1f2-4a8c-bfe5-5cb66c00458b",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

Copy link
Copy Markdown
Collaborator

@tiago-graf tiago-graf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just 2 minor comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants