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

Adds Client-side Violations when creating money requests #81

Closed
wants to merge 13 commits into from

Conversation

cdanwards
Copy link
Member

@cdanwards cdanwards commented Dec 6, 2023

This PR is a mirror of a draft I have ready for Expensify here.

This PR adds the ability to automatically add violations client side when creating a new money request. I added the same testing instructions to see if they make sense but we should already be able to test in the New Test Policy - For Violations workspace.

Fixed Issues

$
PROPOSAL:

Tests

General Tests

  • Verify that no errors appear in the JS console

Test Violations added to Transaction

To Test:

  • Follow the instructions here, then create an report that violates one of those policies.

Test transactionViolations_ are added clientSide to ONYXDB

  • After correctly setting up the policy and violations requirements create a new money request within that policy
  • Navigate to the ONYXDB -> keyvaluepairs within your browser storage tab
  • Identify the transaction that was created with the dollar amount you specified, should look like transactions_someID
  • Verify a transaction violations object with the corresponding ID like transactionViolations_SameIDasTransaction was created

Offline tests

Same as Tests

QA Steps

Unable to currently test

The required back end changes are not yet finished to properly test this in the QA environment. However, once those are finished you should be able to use the same tests after completing the steps here: follow the instructions here, then create an report that violates one of those policies.

@cdanwards cdanwards marked this pull request as ready for review December 6, 2023 17:43
Copy link

@trevor-coleman trevor-coleman 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 to me.

A+ would review again!

src/libs/actions/IOU.js Show resolved Hide resolved
@cdanwards cdanwards closed this Dec 8, 2023
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.

2 participants