1.4 KiB
1.4 KiB
BRIDGE-922 E2E Tests of Swagger Def
Summary
This adds E2E tests for testing the new swagger new endpoint `/dev/v0/payables/rules'
- tests refreshed using the new test framework
- createRule stub added to
dev_api/controllers/rules_controller.js
Test Plan
- Run All tests
- Run E2E: Create a rule
Test Results
E2E: Create a rule
tests the body
tests with missing required parameters
Missing paymentInstrument contents
✓ with no payer instrument encryptionKey parameter (63ms)
Missing Trigger
✓ with no Trigger parameter
Missing Payment rules
✓ with no Payment rules parameter
Bad data tests
✓ with a badly formatted rule payer instrument CV2 parameter
✓ with a badly formatted rule payer key parameter
✓ with a badly formatted rule payeeID parameter
✓ with a short rule payeeID parameter
✓ with a long rule payeeID parameter
✓ with a badly formatted rule percentageShare parameter
✓ with a out of range rule percentageShare parameter
✓ with a badly formatted Trigger Stage parameter
✓ with a badly formatted Trigger Type parameter
✓ with a badly formatted Payment Rule parameter
Good parameter data tests
✓ with a full set of correct parameters
14 passing (820ms)