Skip to content

#5878 - Student Forms e2e Tests - completeFormSubmission#5970

Merged
andrewsignori-aot merged 9 commits intomainfrom
feature/#5878-forms-e2e-tests-part-6
Mar 30, 2026
Merged

#5878 - Student Forms e2e Tests - completeFormSubmission#5970
andrewsignori-aot merged 9 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.

@andrewsignori-aot andrewsignori-aot marked this pull request as ready for review March 28, 2026 00:21
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

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Changed.

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 Author

Choose a reason for hiding this comment

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

Changed.

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

email_address: student.user.email,
template_id: "fed6b26e-d1f2-4a8c-bfe5-5cb66c00458b",
personalisation: {
givenNames: student.user.firstName,
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.

Does the student template not have application number?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Not right now.

image

@sonarqubecloud
Copy link
Copy Markdown

@github-actions
Copy link
Copy Markdown

Backend Unit Tests Coverage Report

Totals Coverage
Statements: 20.1% ( 4579 / 22781 )
Methods: 9.45% ( 262 / 2773 )
Lines: 24.48% ( 3931 / 16059 )
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 )

@github-actions
Copy link
Copy Markdown

E2E SIMS API Coverage Report

Totals Coverage
Statements: 67.7% ( 13449 / 19867 )
Methods: 65.09% ( 1600 / 2458 )
Lines: 70.97% ( 9695 / 13661 )
Branches: 57.47% ( 2154 / 3748 )

Copy link
Copy Markdown
Collaborator

@dheepak-aot dheepak-aot left a comment

Choose a reason for hiding this comment

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

Thanks for making the changes. Looks good 👍

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.

4 participants