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

#1853 - Enable Notes Tab for Public Institution User #1933

Merged
merged 13 commits into from
May 12, 2023

Conversation

andrepestana-aot
Copy link
Collaborator

@andrepestana-aot andrepestana-aot commented May 9, 2023

  • Created a shared common StudentNotes.vue used by Institutions and Ministry;
  • Added prop to show/hide add notes button;
  • Created API for Intitutions;
  • Created view routes for notes tab;
  • Created E2E Tests for student notes for Institutions;

Ministry view:
image

Institutions view:
image

Added test cases:
√ Should get all note types for a student when they are available.
√ Should throw Forbidden when student does not exist.
√ Should throw Forbidden when student exists but does not have an application for the institution.
√ Should cause a bad request when a wrong note type is provided as a filter.
√ Should get an empty student notes result when student has no notes.
√ Should get specific student notes types when student has notes and a note type filter was provided.
√ Should not get notes for student restriction and resolution notes with notification type 'no effect' when any are available.

@andrepestana-aot andrepestana-aot self-assigned this May 9, 2023
* @param relations entity relations.
* @returns a persisted fake student restriction.
*/
export async function saveFakeStudentRestriction(
Copy link
Contributor

@ann-aot ann-aot May 10, 2023

Choose a reason for hiding this comment

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

@sh16011993 also created saveFakeStudentRestriction method, probably we can have one
https://github.com/bcgov/SIMS/pull/1924/files

Copy link
Contributor

@ann-aot ann-aot left a comment

Choose a reason for hiding this comment

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

Added some comments @andrepestana-aot

@dheepak-aot
Copy link
Collaborator

Good to see the student notes for institution. Please have a look at the comments.

.expect({
statusCode: 403,
message:
"The institution is not allowed access to the student data of the given student.",
Copy link
Collaborator

Choose a reason for hiding this comment

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

THis error is in a constant INSTITUTION_STUDENT_DATA_ACCESS_ERROR_MESSAGE

Copy link
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. Approving with one minor comment. Please take care of the same.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@github-actions
Copy link

Backend Unit Tests Coverage Report

Totals Coverage
Statements: 18.11% ( 2027 / 11195 )
Methods: 8.24% ( 119 / 1445 )
Lines: 20.92% ( 1779 / 8503 )
Branches: 10.34% ( 129 / 1247 )

@github-actions
Copy link

E2E Workflow Workers Coverage Report

Totals Coverage
Statements: 33.02% ( 177 / 536 )
Methods: 22.08% ( 17 / 77 )
Lines: 40.1% ( 158 / 394 )
Branches: 3.08% ( 2 / 65 )

@github-actions
Copy link

E2E Queue Consumers Coverage Report

Totals Coverage
Statements: 68.32% ( 371 / 543 )
Methods: 57.97% ( 40 / 69 )
Lines: 70.47% ( 327 / 464 )
Branches: 40% ( 4 / 10 )

@github-actions
Copy link

E2E SIMS API Coverage Report

Totals Coverage
Statements: 41.22% ( 2862 / 6943 )
Methods: 34.52% ( 311 / 901 )
Lines: 46.44% ( 2405 / 5179 )
Branches: 16.92% ( 146 / 863 )

Copy link
Collaborator

@guru-aot guru-aot left a comment

Choose a reason for hiding this comment

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

LGTM, nice work @andrepestana-aot

Copy link
Contributor

@ann-aot ann-aot left a comment

Choose a reason for hiding this comment

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

Good work @andrepestana-aot 👍 Thanks for doing the changes

Copy link
Collaborator

@andrewsignori-aot andrewsignori-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 doing the changes. Looks good 👍

@andrepestana-aot andrepestana-aot merged commit af2dd0a into main May 12, 2023
@andrepestana-aot andrepestana-aot temporarily deployed to DEV May 12, 2023 22:45 — with GitHub Actions Inactive
@andrepestana-aot andrepestana-aot temporarily deployed to DEV May 12, 2023 22:46 — with GitHub Actions Inactive
@andrepestana-aot andrepestana-aot deleted the 1853_notes_tab_public_institution branch May 12, 2023 22:47
@andrepestana-aot andrepestana-aot temporarily deployed to DEV May 12, 2023 23:01 — with GitHub Actions Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants