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 #1311

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
fa2a725
payment-process-stripe - add flow context
dimitur2204 Jan 5, 2023
2931b2d
payment-process-stripe - add choose amount component
dimitur2204 Jan 5, 2023
4fd4bd4
payment-process-stripe - connect the accordion group to work with for…
dimitur2204 Jan 5, 2023
95a0553
payment-process-stripe - connect the accordion card group to work wit…
dimitur2204 Jan 5, 2023
f9f134a
payment-process-stripe - add formik to the flow form
dimitur2204 Jan 5, 2023
0db5c83
payment-process-stripe - add the choose amount from the old donation …
dimitur2204 Jan 5, 2023
51d70c1
payment-process-stripe - add disabled prop to the options on the cards
dimitur2204 Jan 5, 2023
4fc4ed9
payment-process-stripe - add the stripe payment intent to the context
dimitur2204 Jan 5, 2023
869aae0
payment-process-stripe - add the stripe key to the runtime config
dimitur2204 Jan 5, 2023
a1ba8d8
payment-process-stripe - add locale to the stripe payment process
dimitur2204 Jan 5, 2023
26c148d
dependencies - bump up minor next version to 13.1
dimitur2204 Jan 12, 2023
ba84f09
payment-process-stripe - add step splitter component
dimitur2204 Jan 12, 2023
7f4791b
payment-process-stripe - add mobile view for the payment method
dimitur2204 Jan 13, 2023
196e81a
payment-process-stripe - add disabled and fix styling for the RadioAc…
dimitur2204 Jan 13, 2023
94e15ef
1284 - add flow context
dimitur2204 Jan 5, 2023
6005130
1284 - add choose amount component
dimitur2204 Jan 5, 2023
ca0f0ac
1284 - connect the accordion group to work with formik now
dimitur2204 Jan 5, 2023
4ac83a3
1284 - connect the accordion card group to work with formik
dimitur2204 Jan 5, 2023
75afc47
1284 - add formik to the flow form
dimitur2204 Jan 5, 2023
079d6c4
1284 - add the choose amount from the old donation flow
dimitur2204 Jan 5, 2023
5cf9ea6
1284 - add disabled prop to the options on the cards
dimitur2204 Jan 5, 2023
bab0aea
1284 - add the stripe payment intent to the context
dimitur2204 Jan 5, 2023
f3970ee
1284 - add the stripe key to the runtime config
dimitur2204 Jan 5, 2023
82fab81
1284 - add locale to the stripe payment process
dimitur2204 Jan 5, 2023
38438bd
dependencies - bump up minor next version to 13.1
dimitur2204 Jan 12, 2023
cab85de
1284 - add step splitter component
dimitur2204 Jan 12, 2023
606385c
1284 - add mobile view for the payment method
dimitur2204 Jan 13, 2023
1ac484a
1284 - add disabled and fix styling for the RadioAccordionGroup
dimitur2204 Jan 13, 2023
d861aa4
Merge branch 'payment-process-stripe' of https://github.com/dimitur22…
dimitur2204 Jan 13, 2023
b0febae
1284 - rewrite DonationFlowPage styles to use the new `styled` api
dimitur2204 Jan 13, 2023
e21ec83
1284 - remove unecessary `StyledLayout`
dimitur2204 Jan 13, 2023
3696102
1284 - move tax calculations and checkbox to the PaymentMethod step
dimitur2204 Jan 13, 2023
8466b52
1284 - fix stripe promise and styling issues
dimitur2204 Jan 13, 2023
061f53a
1284 - fix mobile and tablet styling
dimitur2204 Jan 13, 2023
1c3d241
1284 - remove stripe public key from the .env example file
dimitur2204 Jan 13, 2023
64b0454
1284 - add `<LinkAuthenticationElement />` for email on the stripe pa…
dimitur2204 Jan 16, 2023
f7d8b3f
1284 - fix rerendering issue on RadioCardItems
dimitur2204 Jan 16, 2023
0bdb68f
a11y - add accessibility :focus styling to all buttons
dimitur2204 Jan 16, 2023
9fd9456
a11y - fix keyboard navigation for `LinkButton` component
dimitur2204 Jan 16, 2023
98619c3
dependencies - update material dependencies
dimitur2204 Jan 18, 2023
84dc6e9
1292 - add authentication form RadioAccordionGroup and initial skeleton
dimitur2204 Jan 18, 2023
a632714
1292 - add the inline login form to the login step
dimitur2204 Jan 18, 2023
f8ea8df
1292 - add translation to the `Authentication`
dimitur2204 Jan 18, 2023
ebe465d
1292 - fix Radio checks on the authentication form accordions
dimitur2204 Jan 20, 2023
bc8fb64
1292 - add ƒorm validation and initial values
dimitur2204 Jan 20, 2023
1123c6c
1292 - add inline register form
dimitur2204 Jan 21, 2023
cb0f24f
1292 - add authentication folder
dimitur2204 Jan 21, 2023
8204fa8
1292 - style form donate button
dimitur2204 Jan 21, 2023
fe2d11b
1292 - return yup.then to non-functions
dimitur2204 Jan 21, 2023
a5d9637
1292 - fix payment method grid problem
dimitur2204 Jan 21, 2023
3d955a9
1292 - remove stripe public key from example env
dimitur2204 Jan 21, 2023
b01263a
1292 - add heading to the form
dimitur2204 Jan 21, 2023
289a996
1292 - move payment method components to a folder
dimitur2204 Jan 21, 2023
33a91df
1292 - change structure of the donation-flow directory
dimitur2204 Jan 21, 2023
1a088ec
1292 - add docs to the RadioGroup components
dimitur2204 Jan 21, 2023
b1a1f1e
Merge remote-tracking branch 'dimitur2204/1272-epic-new-version-of-th…
dimitur2204 Jan 22, 2023
ac9c3d8
Merge remote-tracking branch 'origin/1272-epic-new-version-of-the-don…
dimitur2204 Jan 22, 2023
ccdafd2
1292 - fix context import
dimitur2204 Jan 22, 2023
8313b90
1292 - remove `stripe-fee-calculators.ts` from the payment-method folder
dimitur2204 Jan 22, 2023
9b4d13d
1292 - add `anonymous` as a seperate checkbox and field
dimitur2204 Jan 22, 2023
ea8c13d
feat-7134 - add a `NOREGISTER` state to the authentication and a cond…
dimitur2204 Jan 23, 2023
e50c9d7
feat-7134 - return the authentication on null if checkbox is unchecekd
dimitur2204 Jan 23, 2023
5c833b9
avatar-letters-hotfix - add a fallback to `given_name` and `family_na…
dimitur2204 Jan 24, 2023
d10bb45
put campaigns with status different than active at the bottom of the …
dimitur2204 Jan 25, 2023
bff7c67
Fix Campaigns section max width and alignment on Homepage and Campaig…
ani-kalpachka Jan 26, 2023
ce4d538
Remove unused import (#1306)
ani-kalpachka Jan 26, 2023
33cc556
1292 - add a noregister radio button and put the anonymous checkbox t…
dimitur2204 Jan 29, 2023
ee74e38
1292 - add an email field for no-register users
dimitur2204 Jan 29, 2023
1b46fc2
1292 - arrange imports on the Authentication
dimitur2204 Jan 29, 2023
3374ff3
Adding withdrawnAmount in Admin Campaign Grid (#1305)
quantum-grit Jan 29, 2023
fdad6f7
1299 - move out stripe `Elements` in a separate provider outside the …
dimitur2204 Jan 23, 2023
47e28ee
1299 - add `formik-persist-values` dependency and session storage per…
dimitur2204 Jan 23, 2023
1ff343a
1299 - add create stripe donation endpoint
dimitur2204 Jan 24, 2023
0851a27
1299 - add update endpoint call to update the current payment intent
dimitur2204 Jan 29, 2023
bafda03
1299 - add a call to the createStripePayment endpoint before submitting
dimitur2204 Jan 29, 2023
7e8f04c
1299 - reorder imports
dimitur2204 Jan 29, 2023
fa50003
Merge remote-tracking branch 'origin/1272-epic-new-version-of-the-don…
dimitur2204 Jan 30, 2023
58e5f5a
1299 - update form validation
dimitur2204 Jan 30, 2023
9e4f3e5
#1188, #1194 - Add POM for the E2E tests and update all tests (#1265)
dimitur2204 Jan 31, 2023
8dac48f
Merge remote-tracking branch 'origin/master' into 1299-new-donatino-f…
dimitur2204 Jan 31, 2023
c1a2fee
feat-7134 - add `yarn install --immutable` to the Github Workflow
dimitur2204 Jan 31, 2023
66cc50d
feat-7134 - update `yarn.lock`
dimitur2204 Jan 31, 2023
349dad4
1299 - fix `e2e` region pick test
dimitur2204 Jan 31, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build-nextjs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
${{ runner.os }}-build-yarn-

- name: Install dependencies
run: yarn
run: yarn install --immutable

- name: Build frontend
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- uses: actions/checkout@v3

- name: Install dependencies
run: yarn
run: yarn install --immutable

- name: Lint frontend
run: yarn lint
Expand Down
21 changes: 16 additions & 5 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,11 @@ jobs:

- name: Install Frontend Dependencies
working-directory: ./frontend
run: yarn
run: yarn install --immutable

- name: Install e2e Dependencies
working-directory: ./frontend/e2e
run: yarn install --immutable

- name: Setup env
working-directory: ./frontend
Expand All @@ -92,8 +96,8 @@ jobs:
run: yarn start &> frontend.log &

- name: Install Playwright Browsers
working-directory: ./frontend
run: npx playwright install --with-deps
working-directory: ./frontend/e2e
run: yarn run playwright:install

- name: Wait on frontend
uses: iFaxity/wait-on-action@v1
Expand All @@ -103,13 +107,20 @@ jobs:

- name: Run Frontend Tests
working-directory: ./frontend
run: yarn playwright test e2e/local
run: yarn run test:e2e

- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: ./frontend/playwright-report/
path: ./frontend/e2e/test-results/
retention-days: 14

- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: ./frontend/e2e/e2e-reports/
retention-days: 14

- uses: actions/upload-artifact@v3
Expand Down
10 changes: 7 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ lerna-debug.log*
coverage
.nyc_output

# E2E
test-results/
playwright-report/
playwright/.cache/
e2e-reports/
e2e/.yarn/*

# IDEs and editors
.idea
.project
Expand Down Expand Up @@ -51,9 +58,6 @@ build/
bld/
[Bb]in/
[Oo]bj/
/test-results/
/playwright-report/
/playwright/.cache/

# https://yarnpkg.com/getting-started/qa/#which-files-should-be-gitignored
.pnp.*
Expand Down
31 changes: 0 additions & 31 deletions e2e/AuthPage.ts

This file was deleted.

10 changes: 2 additions & 8 deletions e2e/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,8 @@ Options:
yarn test:e2e
```

### Run only local test suites
### Run test suites in headed mode with enabled debug

```shell
yarn test:e2e local
```

### Run local test suites in headed mode with enabled debug

```shell
yarn test:e2e local --headed --debug -x -g support
yarn test:e2e --headed --debug -x -g support
```
5 changes: 5 additions & 0 deletions e2e/data/enums/donation-regions.enum.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export enum DonationRegions {
EUROPE = 'EU',
GREAT_BRITAIN = 'UK',
OTHER = 'Other',
}
6 changes: 6 additions & 0 deletions e2e/data/enums/languages.enum.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// This enum should be used as a parameter for methods in E2E tests

export enum LanguagesEnum {
BG = 'BG',
EN = 'EN',
}
37 changes: 37 additions & 0 deletions e2e/data/localization.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import bgLocalizationCommonJson from '../../public/locales/bg/common.json'
import enLocalizationCommonJson from '../../public/locales/en/common.json'

import bgLocalizationIndexJson from '../../public/locales/bg/index.json'
import enLocalizationIndexJson from '../../public/locales/en/index.json'

import bgLocalizationSupportJson from '../../public/locales/bg/support.json'
import enLocalizationSupportJson from '../../public/locales/en/support.json'

import bgLocalizationValidationJson from '../../public/locales/bg/validation.json'
import enLocalizationValidationJson from '../../public/locales/en/validation.json'

import bgLocalizationCampaignsJson from '../../public/locales/bg/campaigns.json'
import enLocalizationCampaignsJson from '../../public/locales/en/campaigns.json'

import bgLocalizationOneTimeDonationJson from '../../public/locales/bg/one-time-donation.json'
import enLocalizationOneTimeDonationJson from '../../public/locales/en/one-time-donation.json'

// All these constants are used in the E2E test pages to manipulate web elements in a respective language
// Common localization terms
export const bgLocalizationCommon = bgLocalizationCommonJson
export const enLocalizationCommon = enLocalizationCommonJson
// Home
export const bgLocalizationIndex = bgLocalizationIndexJson
export const enLocalizationIndex = enLocalizationIndexJson
// Support page
export const bgLocalizationSupport = bgLocalizationSupportJson
export const enLocalizationSupport = enLocalizationSupportJson
// Campaigns page
export const bgLocalizationCampaigns = bgLocalizationCampaignsJson
export const enLocalizationCampaigns = enLocalizationCampaignsJson
// Donations
export const bgLocalizationOneTimeDonation = bgLocalizationOneTimeDonationJson
export const enLocalizationOneTimeDonation = enLocalizationOneTimeDonationJson
// Validations
export const bgLocalizationValidation = bgLocalizationValidationJson
export const enLocalizationValidation = enLocalizationValidationJson
15 changes: 15 additions & 0 deletions e2e/data/support-page-tests.data.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
export const supportPageVolutneerTestData = {
firstName: 'Test valid first name',
lastName: 'Test valid last name',
email: '[email protected]',
phone: '+359888000000',
comment: 'E2E Test comment',
}

export const anonDonationTestData = {
cardNumber: '4242 4242 4242 4242',
cardExpDate: '04 / 42',
cardCvc: '424',
billingName: 'E2E Test Anonymous Donation',
country: 'BG',
}
29 changes: 0 additions & 29 deletions e2e/local/campaigns.spec.ts

This file was deleted.

107 changes: 0 additions & 107 deletions e2e/local/donation.spec.ts

This file was deleted.

Loading