-
Notifications
You must be signed in to change notification settings - Fork 0
Add e2e tests to stripe payments module #5
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
Closed
Closed
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
f39cf0a
Add E2E test suite for Stripe payments module
rafal-k 32ff655
Update test-e2e workflow with configuration for payments-stripe module
rafal-k 25e63fa
Remove debug output and icons from E2E tests
rafal-k ae2940c
Remove debug-stripe.liquid page (not used by automated tests)
rafal-k f78a666
Merge branch 'master' into add-e2e-tests-to-stripe-payments-module
rafal-k fdf4c27
Remove unneeded files and modify seed.sh accordingly
rafal-k 9f45221
Fix Liquid syntax errors in payments_stripe module
rafal-k 90a6716
Remove unneeded test file
rafal-k a765015
Skip all E2E tests in pos-module-payments-stripe due to missing test app
rafal-k 7d58589
Fixed e2e test workflow
rafal-k 3cc0b21
Add API smoke tests for payments_stripe module
rafal-k fa94967
Remove unused workflow file and rename another from test-e2e to tests
rafal-k 2d73fc0
Differentiate between api tests and e2e tests, add api tests to the w…
rafal-k a0b6a0f
Add MPKIT_TOKEN to env in run-tests step
rafal-k 38ea426
Rename workflow and ensure manual triggers always run
rafal-k d6f7f19
Add PARTNER_PORTAL_HOST variable to the deploy step
rafal-k 5cd700d
Revert "Add PARTNER_PORTAL_HOST variable to the deploy step"
rafal-k 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 was deleted.
Oops, something went wrong.
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
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
6 changes: 5 additions & 1 deletion
6
...ents-stripe/modules/payments_stripe/public/lib/commands/stripe_charge/create/build.liquid
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 |
|---|---|---|
| @@ -1,6 +1,10 @@ | ||
| {% liquid | ||
| assign idempotency_key = object | hash_delete_key: 'idempotency_key' | ||
| assign data = {"payload": object, "request_type": 'POST', "to": 'https://api.stripe.com/v1/charges', "idempotency_key": idempotency_key} | ||
| assign data = '{}' | parse_json | ||
| hash_assign data['payload'] = object | ||
| hash_assign data['request_type'] = 'POST' | ||
| hash_assign data['to'] = 'https://api.stripe.com/v1/charges' | ||
| hash_assign data['idempotency_key'] = idempotency_key | ||
|
|
||
| return data | ||
| %} | ||
2 changes: 1 addition & 1 deletion
2
...-stripe/modules/payments_stripe/public/lib/commands/stripe_checkout/complete/build.liquid
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 |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| {% liquid | ||
| assign result = object | default: {} | ||
| assign result = object | default: '{}' | parse_json | ||
| return result | ||
| %} |
5 changes: 4 additions & 1 deletion
5
...ts-stripe/modules/payments_stripe/public/lib/commands/stripe_checkout/create/build.liquid
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 |
|---|---|---|
| @@ -1,5 +1,8 @@ | ||
| {% liquid | ||
| assign data = {"payload": object, "request_type": 'POST', "to": 'https://api.stripe.com/v1/checkout/sessions'} | ||
| assign data = '{}' | parse_json | ||
| hash_assign data['payload'] = object | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hm, we do not want to revert to hash_merge |
||
| hash_assign data['request_type'] = 'POST' | ||
| hash_assign data['to'] = 'https://api.stripe.com/v1/checkout/sessions' | ||
|
|
||
| return data | ||
| %} | ||
4 changes: 2 additions & 2 deletions
4
...ts-stripe/modules/payments_stripe/public/lib/commands/stripe_checkout/expire/build.liquid
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 |
|---|---|---|
| @@ -1,8 +1,8 @@ | ||
| {% liquid | ||
| assign url = 'https://api.stripe.com/v1/checkout/sessions' | ||
| assign url = "https://api.stripe.com/v1/checkout/sessions" | ||
| assign url = url | append: '/' | append: transaction.gateway_transaction_id | append: '/expire' | ||
|
|
||
| assign data = {"request_type": 'POST', "to": url} | ||
| assign data = {"request_type": "POST", "to": url} | ||
|
|
||
| return data | ||
| %} |
4 changes: 2 additions & 2 deletions
4
...-stripe/modules/payments_stripe/public/lib/commands/stripe_checkout/retrieve/build.liquid
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 |
|---|---|---|
| @@ -1,13 +1,13 @@ | ||
| {% liquid | ||
| assign url = 'https://api.stripe.com/v1/checkout/sessions' | ||
| assign url = "https://api.stripe.com/v1/checkout/sessions" | ||
| assign url = url | append: '/' | append: transaction.gateway_transaction_id | ||
|
|
||
| assign payload = {} | ||
| if with_payment_intent | ||
| assign expand = ["payment_intent"] | ||
| assign payload.expand = expand | ||
| endif | ||
| assign data = {"payload": payload, "request_type": 'GET', "to": url} | ||
| assign data = {"payload": payload, "request_type": "GET", "to": url} | ||
|
|
||
| return data | ||
| %} |
5 changes: 4 additions & 1 deletion
5
...ipe/modules/payments_stripe/public/lib/commands/stripe_checkout/setup_intent/build.liquid
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 |
|---|---|---|
| @@ -1,5 +1,8 @@ | ||
| {% liquid | ||
| assign data = {"payload": object, "request_type": 'POST', "to": 'https://api.stripe.com/v1/checkout/sessions'} | ||
| assign data = '{}' | parse_json | ||
| hash_assign data['payload'] = object | ||
| hash_assign data['request_type'] = 'POST' | ||
| hash_assign data['to'] = 'https://api.stripe.com/v1/checkout/sessions' | ||
|
|
||
| return data | ||
| %} |
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
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
10 changes: 8 additions & 2 deletions
10
...ents_stripe/public/lib/commands/stripe_connected_accounts/get_dashboard_link/build.liquid
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 |
|---|---|---|
| @@ -1,7 +1,13 @@ | ||
| {% capture url %} | ||
| https://api.stripe.com//v1/accounts/{{ account_id }}/login_links | ||
| {% endcapture %} | ||
| {% assign payload = {"stripe_account_name": stripe_account_name} %} | ||
| {% liquid | ||
| return {"payload": payload, "request_type": 'POST', "to": url} | ||
| assign payload = '{}' | parse_json | ||
| hash_assign payload['stripe_account_name'] = stripe_account_name | ||
|
|
||
| assign result = '{}' | parse_json | ||
| hash_assign result['payload'] = payload | ||
| hash_assign result['request_type'] = 'POST' | ||
| hash_assign result['to'] = url | ||
| return result | ||
| %} |
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
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
Oops, something went wrong.
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.
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.
hm, we do not want to revert to hash_merge