-
Notifications
You must be signed in to change notification settings - Fork 129
feat(payments): add filters to the payments list #4275
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
Draft
sarkissianraffi
wants to merge
5
commits into
main
Choose a base branch
from
feat/payments-list-filters
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
752425e
feat(payments): add payments list filters
9102a4e
docs(payments): record client QA comparison
3dbcefb
feat(payments): drop the payment method type filter
7f78c1c
feat(payments): show 10,000+ when the payments count is capped
a0f2a3d
docs(payments): mark the payment method filter QA checks as historical
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| # Payments filters QA | ||
|
|
||
| Run on 2026-09-07 against the local API and front, with the reproducible | ||
| `lago-api/script/seed_payments_filters.rb` fixtures (30 payments, 29 visible). | ||
| Only `/payments` was exercised in the UI after signing in to the disposable organization. | ||
|
|
||
| 47 automated browser checks passed. Each checks the GraphQL response status, | ||
| variables, count and payment IDs against the seed manifest, the rendered table IDs, | ||
| and an identical REST request. Each UI change sends one `getPaymentsList` request. | ||
| Every filter was applied from the panel and persisted after reload. Pagination resets | ||
| to page 1 when filters change. No export action is present. | ||
|
|
||
| | Scenario | Matching payments | | ||
| | --------------------------------------- | ----------------: | | ||
| | baseline | 29 | | ||
| | Payment status | 14 | | ||
| | Payment provider | 10 | | ||
| | Payment method | 5 (filter since removed) | | ||
| | Currency | 15 | | ||
| | Receipt number | 1 | | ||
| | Invoice number | 1 | | ||
| | Payment type | 10 | | ||
| | Payable type | 7 | | ||
| | Customer | 10 | | ||
| | Date | 17 | | ||
| | Amount Is at least 50000000 | 8 | | ||
| | Amount Is up to 50 | 15 | | ||
| | Amount Is between 50 | 6 | | ||
| | Amount Is equal to 90071992547409.93 | 2 | | ||
| | Amount Is equal to 92233720368547758.07 | 2 | | ||
| | page 2 | 29 | | ||
| | three filters reset page 1 | 5 | | ||
| | three filters plus search | 5 | | ||
| | clear search | 5 | | ||
|
|
||
| The recording demonstrates selecting payment status and currency, applying, | ||
| reloading and clearing them. The `succeeded` + `EUR` predicate returns 7 payments; | ||
| `cli-comparison-ui.json` records the exact IDs for the CLI cross-check. | ||
| `ui-qa.json` contains the complete request/count/ID evidence without credentials. | ||
|
|
||
|  | ||
|  | ||
|  | ||
|
|
||
| [Screen recording](payments-filters.webm) | ||
|
|
||
| Validation: 710 filter/page regression tests, then 241 targeted tests after the | ||
| selected-option label refinement; TypeScript, ESLint and translation inspection / | ||
| consistency checks pass. Changed executable line coverage is 124/127 (97.64%). | ||
| The generated GraphQL document is tested to declare both amount variables as BigInt. | ||
|
|
||
| Compatibility notes: | ||
|
|
||
| - The payment method type filter recorded above was removed afterwards for performance | ||
| reasons (API: getlago/lago-api#6325, "Not shipped for performance reasons"); its checks | ||
| are historical and cannot be replayed. | ||
| - Exact decimal handling is enabled only for the payments amount input and adapter; | ||
| invoice and credit-note filters keep their existing behavior. | ||
| - The existing table formats very large displayed amounts through JavaScript Number, | ||
| and can round their display; filter inputs, URLs and request bounds retain every digit. | ||
| - The existing visible-invoice statuses include draft. This feature preserves that | ||
| visibility rule; the seed's open-invoice payment stays hidden. | ||
| - Bullet reports existing lazy payment associations on unfiltered and filtered list | ||
| requests. The payment fragment and list component are unchanged by this feature. | ||
|
|
||
|
|
||
| The final `cross-client-qa.json` compares the same succeeded/EUR predicate across REST, GraphQL, the UI, all six SDKs and the regenerated CLI: seven identical payment IDs. The CLI also passes array, max-int64 and customer-scoped checks. Local HTTP CLI checks explicitly use `--insecure` against the isolated development server. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| { | ||
| "variables": { | ||
| "paymentStatus": ["succeeded"], | ||
| "currency": "EUR", | ||
| "limit": 20, | ||
| "page": 1 | ||
| }, | ||
| "total_count": 7, | ||
| "ids": [ | ||
| "e695aabb-9a8c-4f80-98a8-43d2e06e673a", | ||
| "8d699c6f-6df9-4f22-84db-9c6f87b56406", | ||
| "e20e5548-f3a5-43cc-b507-d5e9e57022fc", | ||
| "39fa6b17-12a1-474d-a38e-16c0f83ee9ac", | ||
| "fc261c0b-d48f-4505-9f5f-6aef77afbbc1", | ||
| "1f4c1581-5478-4a79-b460-04c1fe21a15a", | ||
| "c50d097e-c049-433f-895b-9bfe5b1c67e2" | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,105 @@ | ||
| { | ||
| "predicate": { | ||
| "payment_status": [ | ||
| "succeeded" | ||
| ], | ||
| "currency": "EUR" | ||
| }, | ||
| "count": 7, | ||
| "ids": [ | ||
| "1f4c1581-5478-4a79-b460-04c1fe21a15a", | ||
| "39fa6b17-12a1-474d-a38e-16c0f83ee9ac", | ||
| "8d699c6f-6df9-4f22-84db-9c6f87b56406", | ||
| "c50d097e-c049-433f-895b-9bfe5b1c67e2", | ||
| "e20e5548-f3a5-43cc-b507-d5e9e57022fc", | ||
| "e695aabb-9a8c-4f80-98a8-43d2e06e673a", | ||
| "fc261c0b-d48f-4505-9f5f-6aef77afbbc1" | ||
| ], | ||
| "surfaces": [ | ||
| "REST", | ||
| "GraphQL", | ||
| "UI", | ||
| "Go", | ||
| "Python", | ||
| "Ruby", | ||
| "Rust", | ||
| "JavaScript", | ||
| "PHP", | ||
| "CLI" | ||
| ], | ||
| "all_ids_match": true, | ||
| "sdk_customer_count": 2, | ||
| "sdk_int64_max_count": 2, | ||
| "cli_checks": [ | ||
| { | ||
| "command": "lago payments list --payment-status succeeded --currency EUR", | ||
| "exit_code": 0, | ||
| "count": 7, | ||
| "ids": [ | ||
| "1f4c1581-5478-4a79-b460-04c1fe21a15a", | ||
| "39fa6b17-12a1-474d-a38e-16c0f83ee9ac", | ||
| "8d699c6f-6df9-4f22-84db-9c6f87b56406", | ||
| "c50d097e-c049-433f-895b-9bfe5b1c67e2", | ||
| "e20e5548-f3a5-43cc-b507-d5e9e57022fc", | ||
| "e695aabb-9a8c-4f80-98a8-43d2e06e673a", | ||
| "fc261c0b-d48f-4505-9f5f-6aef77afbbc1" | ||
| ], | ||
| "ids_match": true | ||
| }, | ||
| { | ||
| "command": "lago payments list --payment-status succeeded,failed", | ||
| "exit_code": 0, | ||
| "count": 14, | ||
| "ids": [ | ||
| "12aa4435-c9a2-444b-a8ab-a0a89dcca50b", | ||
| "1f4c1581-5478-4a79-b460-04c1fe21a15a", | ||
| "35f92acd-9d6d-4900-a8fd-269abdd33bd1", | ||
| "39fa6b17-12a1-474d-a38e-16c0f83ee9ac", | ||
| "4ab08f91-6c21-4cbe-8e5f-e330e9cdc9d4", | ||
| "6aa4cc9c-d48b-47a1-931b-5b0d82b25541", | ||
| "73f36220-3f9b-4f8e-a3c7-d5f5bfc236b1", | ||
| "8d699c6f-6df9-4f22-84db-9c6f87b56406", | ||
| "c50d097e-c049-433f-895b-9bfe5b1c67e2", | ||
| "d5b52e4f-4b02-4ce9-ad36-60e7aa7e417d", | ||
| "e20e5548-f3a5-43cc-b507-d5e9e57022fc", | ||
| "e695aabb-9a8c-4f80-98a8-43d2e06e673a", | ||
| "f95089a0-c003-4128-893f-8009fcbc8a33", | ||
| "fc261c0b-d48f-4505-9f5f-6aef77afbbc1" | ||
| ], | ||
| "ids_match": true | ||
| }, | ||
| { | ||
| "command": "lago payments list --amount-from 9223372036854775807", | ||
| "exit_code": 0, | ||
| "count": 2, | ||
| "ids": [ | ||
| "5b5c572a-7682-43c7-a2e3-c6a1edbd1c87", | ||
| "73f36220-3f9b-4f8e-a3c7-d5f5bfc236b1" | ||
| ], | ||
| "ids_match": true | ||
| }, | ||
| { | ||
| "command": "lago payments list --payment-method-type card,sepa_debit", | ||
| "exit_code": 0, | ||
| "count": 5, | ||
| "ids": [ | ||
| "43d63e21-133b-4092-acf4-8c1a909a2974", | ||
| "64ff022c-0f53-48a5-bae5-a32294392a4d", | ||
| "77eac2dd-4475-4239-b562-b9f4b9408aea", | ||
| "9a6b5689-adbb-4958-a838-d31d5bf0e57d", | ||
| "9bc38b96-6c5a-4876-930b-8c566df1b344" | ||
| ], | ||
| "ids_match": true | ||
| }, | ||
| { | ||
| "command": "lago customers payments cust_1 --payment-status succeeded --currency EUR", | ||
| "exit_code": 0, | ||
| "count": 2, | ||
| "ids": [ | ||
| "e20e5548-f3a5-43cc-b507-d5e9e57022fc", | ||
| "e695aabb-9a8c-4f80-98a8-43d2e06e673a" | ||
| ], | ||
| "ids_match": true | ||
| } | ||
| ] | ||
| } |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Blocking — This directory adds ~1.37 MB to git history permanently:
payments-filters.webm(794 KB), three PNGs (~527 KB), a 1285-lineui-qa.json, pluscli-comparison-ui.jsonandcross-client-qa.json. The evidence is useful — please move it to the PR description or an attachment and strip the directory from the branch (.gitignorehas no rule forqa/or.webmtoday, so it's worth adding one). Or just delete such folder unless you have some specific action in mind.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would recommend to melt those test in our existing test structure, following our implementation examples, and completely delete this new
qa/*folder.If you can prove that those assertions cannot be replicated using our jest or cypress test suite for some reasons, we could consider evolving our test structure