Skip to content

Sprint 18 #596

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

Merged
merged 17 commits into from
Feb 27, 2025
Merged

Sprint 18 #596

merged 17 commits into from
Feb 27, 2025

Conversation

jlkravitz
Copy link
Collaborator

@jlkravitz jlkravitz commented Feb 25, 2025

  • stand up the site locally
    • test all functionality in all major browsers, emphasizing the functionality that this pull request addresses
      • for public-facing functionality, test in browsers consistent with public browser use data
      • test in Mobile Safari and Mobile Chrome
    • use an automated audit tool for code quality and practices (recommended: Chrome DevTools, aka Lighthouse)
      • look at efficiency of page loads, asset sizes, HTTP connection management, etc.
    • review for accessibility
      • use an automated audit tool, such as Chrome Audit or aXe
      • navigate site only with the keyboard
      • use VoiceOver or Narrator to navigate the site with audio only, with the display turned off
      • manually test anything that pa11y cannot test automatically (e.g., contrast of text over images)
  • review static code analysis results, if available
  • run a security audit of dependencies (e.g. npm audit and pip audit) to ensure that there are no vulnerabilities that will be deployed to production (as opposed to vulnerabilities that only have an impact on the development environment)
  • examine OWASP ZAP output to ensure that any errors are known to be false positives or have been previously declared to be acceptable
  • for each feature-level bug (i.e., it’s working as designed, but designed wrong), open a new issue and put it in the backlog

landonshumway-ia and others added 17 commits February 13, 2025 10:56
Several compacts have determined to charge credit card transaction fees
to licensees, in order to absorb the costs of the fees charged by their
Merchant Service Providers. This adds the needed compact configuration
fields which compacts will need to specify when they onboard into the
compact connect system.

### Requirements List
- This change is backwards compatible, as these are optional fields that
a compact may or may not choose to specify.

### Description List
- Added a `transactionFeeConfiguration` field to the compact
configuration schema, which includes config for licensee transaction
fees.
- Returning these values in the API when the frontend gets the list of
compact configuration.
- Updated the privilege purchase flow to include these transaction fee
charges in a separate line item.

### Testing List
- For API configuration changes: CDK tests added/updated in
`backend/compact-connect/tests/unit/test_api.py`
- uint tests to verify licensee transaction fees are added
- Code review

Closes #502
### Requirements List
- _None_

### Description List
- Added Reinvite option to staff user row 3-dot menu
- Added Deactivate option to staff user row 3-dot menu
- Added store & network layer calls for reinvite & delete
- Fixed initial focus on existing edit-user modal

### Testing List
- `yarn test:unit:all` should run without errors or warnings
- `yarn serve` should run without errors or warnings
- `yarn build` should run without errors or warnings
- Code review
- Reinvite
- Be aware this will reset the selected user to receive a new password
that they must reset. Don't test this on anyone's primary user. Create a
new user for testing if you don't already have a spare test user.
- Deactivate
- Be aware that this will delete the user from the compact. Don't test
this on anyone's primary user. Create a new user for testing if you
don't already have a spare test user.

Closes #487
Closes #488
### Requirements List
- Ideally test against an API that requires the attestations be passed
up to confirm that we are meeting criteria there. My sandbox is set up
to do this or we can get
#425 merged into
whatever environment we need

### Description List
- Refactored purchase flow to be in one page with subcomponents to
support privilege purchase nav highlighting and most easily support
total control of purchase flow and dynamic progress calculation
- Renamed purchase flow pages to be more easily found:
`PrivilegePurchase*`
- Abstracted out purchase flow into `PurchaseFlowState`,
`PurchaseFlowStep` and step level logic to better support step handling
(find next step, clean state appropriately, redirect appropriately etc)
- Added `AcceptedAttestationToSend` model
- Made military affiliation attestation only show and send if user is
military affiliated
- Added sending of attestations accepted to purchase API call and
relevant serializer
- Improved test coverage
- Added `ProgressBar` Component
- Fixed safari display bug on SelectPrivileges screen

### Testing List
- `yarn test:unit:all` should run without errors or warnings
- `yarn serve` should run without errors or warnings
- `yarn build` should run without errors or warnings
- Code review
- Try going through the privilege purchase flow process and confirm that
the happy path works
- Now try navigating around the site, and with the back and cancel
buttons and confirm that the form flow works as expected:

1. Back should always return to the previous flow step
2. Cancel should clear the flow entirely and bring the user to
`LicenseeDashboard` screen
3. Navigating out of the flow while still in the app will retain the
users progress (including privilege purchase successful), coming back to
the flow should bring them back to the screen they left off at
4. Refreshing the page at any point or navigating with the url bar will
clear the flow
5. Clicking finish on the Successful screen will clear the privilege
flow and re-fetch the users updated privileges


Closes #302 

Note: The behavior above is what I decided to implement to avoid
complexity surrounding auto filling potentially changed form fields due
to the server attestations being updated on the server, complexity
surrounding form race conditions and caching user responses vs updated
attestations.

I also opted not to use localStorage to have this data persist across
sessions. What I did do was set up the form flow so that any of these
alterations can be made more easily if it turns out they are desired.

---------

Co-authored-by: Dana Stiefel <[email protected]>
### Description List
- Added a GET .../providers/:providerId/ssn endpoint to retrieve a
provider's SSN
- Added a new readSSN permissions action for compact/jurisdiction-level
access to SSNs
- Added basic metrics/Alarms for monitoring activity on this sensitive
endpoint

Closes #392
### Requirements List
- _None_

### Description List
- Updated staff user model to match status with recent backend updates
    - Backend now just responds with:
        - `active` -> means user has accepted invite & setup their login
- `inactive` -> means user has not accepted invite yet (shown as
"Pending" in the UI)

### Testing List
- `yarn test:unit:all` should run without errors or warnings
- `yarn serve` should run without errors or warnings
- `yarn build` should run without errors or warnings
- Code review

Closes #489
For each sprint PR, I redeploy my sandbox environment from scratch using
`cdk deploy 'Sandbox/*'`. I found myself going into the AWS console to
find the necessary fields required for configuring my frontend local
environment. This script helps make that process easier and faster.

I used ChatGPT to write this code, so if anything is non-standard, let
me know, and I'd be happy to update.
### Requirements List
-

### Description List
- Added the provider bucket url to our CSP header rule Lambda and
updated tests

### Testing List
- cdk synth should work as normal
- For API configuration changes: CDK tests added/updated in
`backend/compact-connect/tests/unit/test_api.py`
- Code review

Closes #537

---------

Co-authored-by: Dana Stiefel <[email protected]>
### Description List
- Edited `Compact` model and `PurchaseOption` network behavior to
include CC transaction fees
- Altered total charge logic
- Slightly enhanced Finalize purchase styles
- Changed "Commission fee" and "Compact Commission fee" to be
"Administrative fee"
- Created `CompactFeeConfig` model and serializers
- Updated tests and mockApi to reflect changes

### Testing List
- `yarn test:unit:all` should run without errors or warnings
- `yarn serve` should run without errors or warnings
- `yarn build` should run without errors or warnings
- Code review
- Go through the purchase flow on mockAPI and real API and confirm
credit card fees are functioning as expected

Closes #503

---------

Co-authored-by: Dana Stiefel <[email protected]>
### Description List
- Removed full SSN from provider/license API objects
- Removed full sun from provider/license db records
- Removed access to SSN table to resources that no-longer need it
- Removed deprecated 'read' permission from API
- Created migration for existing provider/license data
- Created migration for existing staff users

Closes #391
We are adding a new field for the full name of the Compact to the
configuration files, so we are refactoring the current field to denote
it is used for the compact abbreviation.

### Requirements List
- This change should be a non-breaking change, since we are updating all
code references to the field and updating
the database records.

### Description List
- renamed all original usage of `compactName` field to `compactAbbr`
- added full compact names to config files and schemas that reference
files.

### Testing List
- For API configuration changes: CDK tests added/updated in
`backend/compact-connect/tests/unit/test_api.py`
- Code review
- verified privilege purchasing flow using sandbox environment

Closes #350
### Requirements List
- A licensee user in the same compact as a staff user

### Description List
- Adjusted `LicenseCard` and `PrivilegeCard` components to have license
number and privilegeId, added icon when desired and added occupation
abbreviation
- Created `LicenseIcon` component and use that rather than svg asset
- Added occupation abbreviations to translations
- Modified `License` model

### Testing List
- `yarn test:unit:all` should run without errors or warnings
- `yarn serve` should run without errors or warnings
- `yarn build` should run without errors or warnings
- Code review
- Look at `LicenseeDashboard` and `LicenseeDetail` page and confirm that
LicenseCard and PrivilegeCard match designs

Closes #437

---------

Co-authored-by: Dana Stiefel <[email protected]>
Updating the CSV reports based on feedback from compact EDs, the biggest
change being we are now including the associated privilege ids for each
transaction, so that admins can make the correlation between charges in
authorize.net and the compact connect system.

### Requirements List
- As part of this change, we are now updating the line item 'itemId' for
every privilege purchase with the prefix `priv:` to more readily
distinguish what is a privilege jurisdiction cost and what is compact
related fees. This means that older transactions which do not include
the `priv:` prefix will not show up in transaction reporting. Given that
the system is not live and this change is only related to reporting,
this will not impact any other functionality of the system.

### Description List
- Updated compact financial summary reports to include the following:
    - privilege purchase count by jurisdiction
    - total processed amount
    - change `Compact Fee` to `Administrative Fees`
- Updated transaction detail reports to include the following:
- Collected transaction fee if compact charged licensee transaction fees
   - Specify settlement date is UTC
- Associated privilege id for the transaction according to compact
connect
   - Transaction Status according to authorize.net

- Added compactTransactionId global secondary index for mapping
authorize.net transaction ids to compact connect privilege ids.

### Testing List
- For API configuration changes: CDK tests added/updated in
`backend/compact-connect/tests/unit/test_api.py`
- load testing script added for processing large numbers of transactions
- local testing in sandbox environment
- added unit/functional tests for reporting lambdas
- Code review

Closes #492
### Description List
- Add license data fields table to README
- Clean up some schema inconsistencies

Closes #573
### Requirements List
- A privilege user with active privileges _-or-_ a privilege user for
which you can buy active privileges
- A staff user with compact-admin or state-admin for the privilege state
(in the same compact as the privilege user)

### Description List
- Add 3-dot menu to active Privilege cards for compact admins and
same-state admins in the Staff UI
    - Should only show for admins in the staff UI
- Updated mock data with `homeJurisdictionSelection` objects
- Fixed an issue with the global modal overflow scrolling (#560)

### Testing List
- `yarn test:unit:all` should run without errors or warnings
- `yarn serve` should run without errors or warnings
- `yarn build` should run without errors or warnings
- Code review
- Staff UI
- Active privileges should be able to be deactivated by compact admins,
or state admins of the privilege state
- Provider UI
    - Provider cards should not include a 3-dot menu
- After dismissing a modal, pages with scroll should have scroll
re-enabled

Closes #521 
Closes #560
### Description List
- Add a script at a root `bin` folder to look for NodeJS and Python
dependencies, then report on their licenses

### Testing List
- Run it!

Closes #564

---------

Co-authored-by: Joshua Kravitz <[email protected]>
### Requirements List
- _None_

### Description List
- Added frontend deployment pipeline config for Prod

### Testing List
- Review pipeline file for any obvious misconfigs

### Notes
 After merging to CSG `development`:

- [ ] If not already present, create branch in CSG repo:
`frontend/prod-deploy-pipeline` (@jlkravitz)
- [ ] Make insignificant frontend code change on CSG branch
`frontend/prod-deploy-pipeline` (@jlkravitz)
    - Should trigger the workflow in CSG repo
- [ ] Evaluate workflow run for any errors (@jlkravitz)
    - Coordinate any error resolution w/ @jsandoval81
- [ ] Once successfully deployed, manually smoke test the deployed Prod
UI (@jsandoval81)
- [ ] After confirming Prod UI, open small PR to remove trigger branch
`frontend/prod-deploy-pipeline` from workflow (@jsandoval81)
Copy link
Collaborator Author

@jlkravitz jlkravitz left a comment

Choose a reason for hiding this comment

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

@jusdino @jsandoval81 @landonshumway-ia @ChiefStief Just a couple of items on this one. Good stuff!

Testing focused on–

  • Privilege deactivation
  • License type display
  • Purchase Flow (with authorize.net integration)
  • User reinvites

@jsandoval81
Copy link
Collaborator

@jlkravitz I think we've addressed all of your feedback. Let me know if you have any follow-ups.

@jlkravitz
Copy link
Collaborator Author

@isabeleliassen This one is good to be merged via Merge Commit.

@isabeleliassen isabeleliassen merged commit bd25230 into main Feb 27, 2025
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants