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

Issue 429: Add component to input single file #705

Merged
merged 20 commits into from
Mar 30, 2021

Conversation

jorgegonzalez
Copy link

@jorgegonzalez jorgegonzalez commented Feb 24, 2021

Summary of Changes

  • Added UploadReport component to Upload page
    • Added 4 required UploadFile sections
  • Added redux actions and reducers and modeled File Upload states
  • Added error handling for uploads of invalid file types
  • Added placeholder 'Submit Files' button for uploads

Addresses issue #429
Acceptance criteria as stated in the issue

How to Test

  1. Log in as any user.
  2. Click the Reports tab.
  3. Select a year in the Fiscal Year dropdown.
  4. Click Search.
  5. Ensure a new UploadReport section appears below the Begin Report Search button with the four required sections on the page.
  6. Drag a text file (.txt file extension) to any of the four sections.
  7. Check that there were no errors, and the input area changes to display a file icon with the name of the uploaded file.
  8. Try the same with a non-.txt file, and check that an error message is shown
  9. Clicking Submit Files should just refresh the page.
  10. Clicking Cancel or changing the selected year should remove the UploadReport form.

Deliverable 1: Accepted Features

Performance Standard(s): At the beginning of each sprint, the Product Owner and development team will collaborate to define a set of user stories to be completed during the sprint. Acceptance criteria for each story will also be defined. The development team will deliver code and functionality to satisfy these user stories.

Acceptable Quality Level: Delivered code meets the acceptance criteria for each user story. Incomplete stories will be assessed and considered for inclusion in the next sprint.

As facilitator/product manager, @kniz-raft will decide if ACs are met from Raft's perspective.

Deliverable 2: Tested Code

Performance Standard(s): Code delivered under the order must have substantial test code coverage. Version-controlled HHS GitHub repository of code that comprises products that will remain in the government domain.

Acceptable Quality Level: Minimum of 90% test coverage of all code. All areas of code are meaningfully tested.

  • Are all areas of code introduced in this PR meaningfully tested?
    • If this PR introduces frontend code changes, are they meaningfully tested?
  • Are code coverage minimums met?

Deliverable 3: Properly Styled Code

Performance Standard(s): GSA 18F Front- End Guide

Acceptable Quality Level: 0 linting errors and 0 warnings

  • Are backend code style checks passing on CircleCI?
  • Are frontend code style checks passing on CircleCI?

Deliverable 4: Accessible

Performance Standard(s): Web Content Accessibility Guidelines 2.1 AA standards

Acceptable Quality Level: 0 errors reported using an automated scanner and 0 errors reported in manual testing

Accessibility issues have been addressed

Deliverable 5: Deployed

Performance Standard(s): Code must successfully build and deploy into the staging environment.

Acceptable Quality Level: Successful build with a single command

NOTE: until we have a proper staging environment this may not be satisfiable prior to merging

  • Was the code successfully deployed via automated CircleCI process to development on Cloud.gov?

Deliverable 6: Documented

Performance Standard(s): Summary of user stories completed every two weeks. All dependencies are listed and the licenses are documented. Major functionality in the software/source code is documented, including system diagram. Individual methods are documented inline in a format that permits the use of tools such as JSDoc. All non-inherited 800-53 system security controls are documented in the Open Control or OSCAL format and HHS Section 508 Product Assessment Template (PAT) are updated as appropriate.

Acceptable Quality Level: Combination of manual review and automated testing, if available

  • If this PR introduces frontend code, is that code documented both inline and overall?

Deliverable 7: Secure

Performance Standard(s): Open Web Application Security Project (OWASP) Application Security Verification Standard 3.0

Acceptable Quality Level: Code submitted must be free of medium- and high-level static and dynamic security vulnerabilities

  • Does the OWASP Scan pass on CircleCI?
  • Do manual code review and manual testing detect any security issues?

No security issues detected

@jorgegonzalez jorgegonzalez changed the base branch from epics/398/backend/431-4-7 to raft-tdp-main February 25, 2021 15:02
tdrs-frontend/package.json Outdated Show resolved Hide resolved
tdrs-frontend/package.json Outdated Show resolved Hide resolved
@jorgegonzalez jorgegonzalez force-pushed the feat/429-upload branch 2 times, most recently from 3c8af03 to 336169a Compare February 26, 2021 22:43
@jorgegonzalez jorgegonzalez marked this pull request as ready for review March 1, 2021 15:43
@jorgegonzalez jorgegonzalez changed the title WIP: frontend/429 Add components and actions for file upload frontend/429 Add components and actions for file upload Mar 1, 2021
@jorgegonzalez jorgegonzalez marked this pull request as draft March 8, 2021 17:43
@jorgegonzalez
Copy link
Author

Updated this PR based on the latest TDP mockups; I will move this PR out of draft mode when I fix the tests.

@carltonsmith carltonsmith reopened this Mar 9, 2021
@jorgegonzalez jorgegonzalez marked this pull request as ready for review March 9, 2021 22:52
@jorgegonzalez jorgegonzalez added raft review This issue is ready for raft review and removed WIP labels Mar 10, 2021
@jorgegonzalez jorgegonzalez force-pushed the feat/429-upload branch 2 times, most recently from 508e494 to 6c170f5 Compare March 10, 2021 15:48
@carltonsmith
Copy link

@jorgegonzalez Bringing this up locally I see that Data Files still shows up as Reports. As we want this to match the prototype I think we should make that change here.

@jorgegonzalez jorgegonzalez force-pushed the feat/429-upload branch 4 times, most recently from fb5370d to 421f1ed Compare March 10, 2021 20:51
@jorgegonzalez
Copy link
Author

@jorgegonzalez Bringing this up locally I see that Data Files still shows up as Reports. As we want this to match the prototype I think we should make that change here.

This should be addressed.

@carltonsmith carltonsmith requested a review from jtwillis92 March 10, 2021 20:58
@jorgegonzalez
Copy link
Author

The AC's for this issue explicitly state that we want to accept only .txt files, so I think it would make sense to create a new issue for it or add it to the ACs for the issue mentioned above or to 430, since that's where the actual upload happens.

#430 has been updated with this requirement.

@alexsoble
Copy link

Thanks very much for making that update @jorgegonzalez!

Copy link

@iamjolly iamjolly left a comment

Choose a reason for hiding this comment

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

This is really helpful info. Thanks @jorgegonzalez

@iamjolly
Copy link

This looks great from an accessibility perspective. It's good to go!

Copy link
Collaborator

@lfrohlich lfrohlich left a comment

Choose a reason for hiding this comment

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

This looks really good! One thing I noticed, that I assume will be addressed in #430 is that I could add a JPG to the component through the dialog box.

@jorgegonzalez
Copy link
Author

This looks really good! One thing I noticed, that I assume will be addressed in #430 is that I could add a JPG to the component through the dialog box.

@lfrohlich that's correct. We added an AC to #430 to address the file type validation.

@alexsoble
Copy link

Deliverable 1: Accepted Features

Performance Standard(s): At the beginning of each sprint, the Product Owner and development team will collaborate to define a set of user stories to be completed during the sprint. Acceptance criteria for each story will also be defined. The development team will deliver code and functionality to satisfy these user stories.

Acceptable Quality Level: Delivered code meets the acceptance criteria for each user story. Incomplete stories will be assessed and considered for inclusion in the next sprint.

Deliverable 2: Tested Code

Performance Standard(s): Code delivered under the order must have substantial test code coverage. Version-controlled HHS GitHub repository of code that comprises products that will remain in the government domain.

Acceptable Quality Level: Minimum of 90% test coverage of all code. All areas of code are meaningfully tested.

  • Are all areas of code introduced in this PR meaningfully tested?
    • If this PR introduces frontend code changes, are they meaningfully tested? — Yes, see *.test.js files
  • Are code coverage minimums met?
    • Frontend coverage

Deliverable 3: Properly Styled Code

Performance Standard(s): GSA 18F Front- End Guide

Acceptable Quality Level: 0 linting errors and 0 warnings

  • Are frontend code style checks passing on CircleCI?

Deliverable 4: Accessible

Performance Standard(s): Web Content Accessibility Guidelines 2.1 AA standards

Acceptable Quality Level: 0 errors reported using an automated scanner and 0 errors reported in manual testing

Deliverable 5: Deployed

Performance Standard(s): Code must successfully build and deploy into the staging environment.

Acceptable Quality Level: Successful build with a single command

  • Was the code successfully deployed via automated CircleCI process to development on Cloud.gov?

Deliverable 6: Documented

Performance Standard(s): Summary of user stories completed every two weeks. All dependencies are listed and the licenses are documented. Major functionality in the software/source code is documented, including system diagram. Individual methods are documented inline in a format that permits the use of tools such as JSDoc. All non-inherited 800-53 system security controls are documented in the Open Control or OSCAL format and HHS Section 508 Product Assessment Template (PAT) are updated as appropriate.

Acceptable Quality Level: Combination of manual review and automated testing, if available

  • If this PR introduces frontend code, is that code documented both inline and overall? — Yes, see inline code comments

Deliverable 7: Secure

Performance Standard(s): Open Web Application Security Project (OWASP) Application Security Verification Standard 3.0

Acceptable Quality Level: Code submitted must be free of medium- and high-level static and dynamic security vulnerabilities

  • OWASP Scan passes on CircleCI
  • Manual code review and manual testing pass

Copy link

@alexsoble alexsoble left a comment

Choose a reason for hiding this comment

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

Approved! See QASP review, above. Thanks for your work on this @jorgegonzalez!

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.

9 participants