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

#1851 - Enable File Upload for Public Institution User #1893

Merged
merged 13 commits into from
Apr 25, 2023

Conversation

sh16011993
Copy link
Collaborator

The following tasks were completed as a part of this task:

  • Remove upload file button for Public Institution User.
  • Disable links to download/view the file for Public Institution User.
  • Wrote E2E test - This included writing test for inserting fake file upload data into the database and retrieving it using the API endpoint and validating the retrieved data with the inserted data.

Screenshot showing the removed upload file button and disabled links to download/view the file:

image

- Remove upload file button.
- Disable links to download/view the file.
- Wrote E2E tests.
@sh16011993 sh16011993 added User Experience task that relates to UI UX Content Tasks related to UIUX content SIMS-Api SIMS-Api E2E/Unit tests labels Apr 19, 2023
@sh16011993 sh16011993 self-assigned this Apr 19, 2023
@sh16011993 sh16011993 removed the Content Tasks related to UIUX content label Apr 19, 2023
@@ -0,0 +1,206 @@
<template>
<tab-container>
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍 thanks for moving it to components.

* Get all student documents for Institution user.
* @return list of student documents.
*/
async getInstitutionStudentFiles(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

@dheepak-aot
Copy link
Collaborator

Thanks for making the changes. Added more comments.

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.

Please take a look at a few minor comments. I believe that the below one is the one that requires more attention #1893 (comment)

};

const uploadFile = () => {
context.emit("uploadFile", fileUploadModal, () =>
Copy link
Collaborator

@dheepak-aot dheepak-aot Apr 24, 2023

Choose a reason for hiding this comment

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

I didn't follow why are we emitting back to parent here?

I technically what happen between here and parent and feel here that coupling is tight, but are we going to follow this approach moving forward?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I have updated this part of the code as suggested by @andrewsignori-aot

Instead of passing the entire fileUploadModal as argument, only associatedFiles array is being passed to the emitted event handler. We are emitting uploadFile to the AEST specific file upload component to allow for the API call saveAESTUploadedFilesToStudent to be made by the consumer since it is a consumer specific operation.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@dheepak-aot considering also the last explanation given by @sh16011993 is there anything here to be considered as a new approach?
If the point was about the modal as a parameter, that was exactly what I asked to be changed but besides that, is there anything else?

Copy link
Collaborator

Choose a reason for hiding this comment

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

No I am good.

@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: 17.89% ( 1969 / 11009 )
Methods: 8.06% ( 115 / 1427 )
Lines: 20.61% ( 1725 / 8368 )
Branches: 10.63% ( 129 / 1214 )

@github-actions
Copy link

E2E Workflow Workers Coverage Report

Totals Coverage
Statements: 32.41% ( 176 / 543 )
Methods: 21.25% ( 17 / 80 )
Lines: 39.25% ( 157 / 400 )
Branches: 3.17% ( 2 / 63 )

@github-actions
Copy link

E2E Queue Consumers Coverage Report

Totals Coverage
Statements: 65.01% ( 353 / 543 )
Methods: 53.62% ( 37 / 69 )
Lines: 67.24% ( 312 / 464 )
Branches: 40% ( 4 / 10 )

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 @sh16011993 👍 Thanks for doing the changes

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.

Pls take a look at the failing test cases

@github-actions
Copy link

E2E SIMS API Coverage Report

Totals Coverage
Statements: 39.07% ( 2647 / 6775 )
Methods: 31.33% ( 276 / 881 )
Lines: 44.49% ( 2246 / 5048 )
Branches: 14.78% ( 125 / 846 )

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 👍

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.

LGTM

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 @sh16011993

Copy link
Collaborator

@andrepestana-aot andrepestana-aot left a comment

Choose a reason for hiding this comment

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

Great job!

@sh16011993 sh16011993 merged commit d5734da into main Apr 25, 2023
@sh16011993 sh16011993 deleted the 1851_enable_file_upload_tab_public_institution_user branch April 25, 2023 16:19
@sh16011993 sh16011993 temporarily deployed to DEV April 25, 2023 16:19 — with GitHub Actions Inactive
@sh16011993 sh16011993 temporarily deployed to DEV April 25, 2023 16:19 — with GitHub Actions Inactive
@sh16011993 sh16011993 temporarily deployed to DEV April 25, 2023 16:30 — with GitHub Actions Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E2E/Unit tests SIMS-Api SIMS-Api User Experience task that relates to UI UX
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants