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

New Donation Flow - Form Data Flow and Stripe Card submission #1310

Conversation

dimitur2204
Copy link
Contributor

@dimitur2204 dimitur2204 commented Jan 30, 2023

Closes #1299
It is tied with podkrepi-bg/api#425

Motivation and context

This includes the logic associated with the new way to make stripe donations. Check out #1299 for more information.

  • Added a StripeElementsProvider.tsx, because the <Elements> need to be wrapping the component that submits the payment DonationFlowForm.tsx in our case.
  • Initializing the PaymentIntent as a hardcoded value, because otherwise the <Elements> throw an error, that initialized payment intent is then used for all future amount updates with the update request
  • Data collected for the form is submitted to the create-stripe-payment form which initializes the donation and then the stripe.confirmPayment call is made to confirm the PaymentIntent and run any 3D Authentications that can be specific to each bank
  • Success and Fail logic will be done in New Donation Flow - Succes and Fail pages #1297

Screenshots:

donation-flow-v2-form-submission

Testing

Steps to test

You need to be on the podkrepi-bg/api#425 branch on the backend

  1. Go to campaigns/donation-v2/{slug}
  2. Go through the form

Affected urls

campaigns/donation-v2/{slug}

Environment

New environment variables:

  • STRIPE_PUBLIC_KEY: Shareable public key required for the @stripe to work

@github-actions
Copy link

github-actions bot commented Jan 30, 2023

✅ Tests will run for this PR. Once they succeed it can be merged.

@dimitur2204 dimitur2204 changed the title 1299 new donatino flow data flow and form submission New Donation Flow - Form Data Flow and Stripe Card submission Jan 30, 2023
@dimitur2204 dimitur2204 self-assigned this Jan 30, 2023
@dimitur2204 dimitur2204 added area: donations Regarding something that includes the donation flow run tests Allows running the tests workflows for forked repos status: awaits API labels Jan 30, 2023
@github-actions github-actions bot removed the run tests Allows running the tests workflows for forked repos label Jan 30, 2023
@dimitur2204 dimitur2204 marked this pull request as ready for review January 30, 2023 18:52
Copy link
Member

@kachar kachar left a comment

Choose a reason for hiding this comment

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

Outstanding work @dimitur2204

Kudos for the persistence and energy ⚡

…date all tests (podkrepi-bg#1265)

* Created basic POM for the Playwright tests - initial commit

Added method and configurations

Additional refactoring - methods, specs and gitignore

Implemented Support page for E2E tests

Fixed tests for Support page

New changes on the tests

* Created basic POM for the Playwright tests - initial commit

Added method and configurations

Additional refactoring - methods, specs and gitignore

Implemented Support page for E2E tests

Fixed tests for Support page

New changes on the tests

Fixes on E2E tests

* Updated paths for the localization files for E2E

* Merge branch '1194-feature-create-playwright-page-object-model-for-the-e2e-tests' of https://github.com/podkrepi-bg/frontend into 1194-feature-create-playwright-page-object-model-for-the-e2e-tests

* Revert "Merge branch '1194-feature-create-playwright-page-object-model-for-the-e2e-tests' of https://github.com/podkrepi-bg/frontend into 1194-feature-create-playwright-page-object-model-for-the-e2e-tests"

This reverts commit 3bb8a19, reversing
changes made to b18b16b.

* Updated Readme file

* Fixed Sonar issues and updated Playwright version

Additional fix

* 1194 - init yarn project in the e2e folder and move out gitignore

* 1194 - fix ts errors

* 1194 - add e2e/.yarn to gitignore

* 1194 - remove e2e/.yarn

* 1194 - remove cached .yarn folder

* 1194 - change GH Action workflow to now run the `test:e2e`

* 1194 - change GH Action workflow to include artifacts of the reports and results

* 1194 - fix home.page.ts ts errors

* 1194 - remove hardcoded navigation to different environments

* 1194 - add installation of dependencies for the e2e folder  in the CI action

* 1194 - fix translation on the homepage

* 1194 - fix e2e script in the root folder

* 1194 - add a tsconfig.build.json to exclude e2e while next is building

* 1194 - add data based on the STAGING env variable

* 1194 - resolve environment related tests

* 1194 - remove uneccessasry `tsconfigPath` inside of the config

* 1194 - put video to `off` by default

* 1194 - add a clickCampaignByIndex method

* 1194 - remove campaign specific test and changed them to index based

* 1194 - add the index on the campaigns page list

* 1194 - change the expiry date tests data to `04 / 42`

* 1194 - add the index to the campaign card on the campaigns section on the home page

* 1194 - add `playwright` as a dependency for the project

* 1194 - add the changed `yarn.lock`

* 1194 - fix the support action button click test  to not click the card beforehand

---------

Co-authored-by: Daniel Takev <daniel.takev.scalefocus@gmail.com>
@kachar
Copy link
Member

kachar commented Jan 31, 2023

@dimitur2204 Let's sync this branch with the latest updates on e2e tests from master.

@dimitur2204 dimitur2204 added the run tests Allows running the tests workflows for forked repos label Jan 31, 2023
@github-actions github-actions bot removed the run tests Allows running the tests workflows for forked repos label Jan 31, 2023
@dimitur2204 dimitur2204 added the run tests Allows running the tests workflows for forked repos label Jan 31, 2023
@github-actions github-actions bot removed the run tests Allows running the tests workflows for forked repos label Jan 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: donations Regarding something that includes the donation flow status: awaits API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants