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

Change first donation form section summary behaviour #497

Merged
merged 1 commit into from
Sep 26, 2024

Conversation

Sperling-0
Copy link
Contributor

@Sperling-0 Sperling-0 commented Sep 13, 2024

  • When there is no payment type passed to the donation form, the summary only shows the data that is already there
  • When selecting a payment type, the summary reflects that
  • Add tests

Ticket: https://phabricator.wikimedia.org/T368527

gbirke

This comment was marked as resolved.

Copy link
Member

@gbirke gbirke left a comment

Choose a reason for hiding this comment

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

This component is untested. Previously that was not a big issue because is was just rendering stuff and we usually don't test these kinds of components. Now it contains logic/branching and that should be tested. Could you add a unit test that checks both cases? The test should check rendering with and without payment time, checking for the existence of amount, interval and (option) payment type in the rendered output. You can go the easy route and use snapshots, see the first tests in SubmitValues.spec.ts. If you manually control the output of the snapshot file and check it in, that'll be sufficient.

- When there is no payment type passed to the donation form, the summary only shows the data that is already there
- When selecting a payment type, the summary reflects that
- Add tests

Ticket: https://phabricator.wikimedia.org/T368527
@gbirke
Copy link
Member

gbirke commented Sep 24, 2024

After merging this, the branch for #471 should be rebased, so you can use the new summary in #497

@moiikana moiikana merged commit f1808b9 into main Sep 26, 2024
3 checks passed
@moiikana moiikana deleted the donation-summary branch September 26, 2024 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants