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

PP-13377 show test payment notification on card payment screens #3945

Merged
merged 1 commit into from
Jan 24, 2025

Conversation

nlsteers
Copy link
Collaborator

@nlsteers nlsteers commented Jan 23, 2025

WHAT

  • update charge retrieval middleware to make isTestPayment available to all views
  • show phase banner with test status when charge is for a test account
  • show notification banner on card input and confirmation screens when charge is for a test account

HOW

  • run cypress:test-headed and start the test-payment-notification test to see the difference between live and test

SCREENS

LIVE (no change)

Screenshot 2025-01-23 at 18 18 36 Screenshot 2025-01-23 at 18 18 52

TEST (new banners)

Screenshot 2025-01-23 at 18 15 57 Screenshot 2025-01-23 at 18 17 43

- update charge retrieval middleware to make `isTestPayment` available to all views
- show phase banner with test status when charge is for a test account
- show notification banner on card input and confirmation screens when charge is for a test account
Copy link
Contributor

@james-peacock-gds james-peacock-gds left a comment

Choose a reason for hiding this comment

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

looks good, some very minor comments

@@ -85,7 +85,8 @@
<div class="govuk-width-container govuk-main-wrapper">
<div class="govuk-grid-row govuk-!-margin-bottom-9">
<main class="charge-new govuk-grid-column-two-thirds" id="main-content" role="main">
<div class="charge-new__content">
{% include "includes/test-payment-notification-banner.njk" %}
<div class="charge-new__content">
Copy link
Contributor

Choose a reason for hiding this comment

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

you've added a div here but you haven't added a closing tag - is that deliberate?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this div is just moved, not removed?

Copy link
Contributor

Choose a reason for hiding this comment

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

ha, yes clearly it is.

cy.location('pathname').should('eq', `/card_details/${chargeId}`)
shouldCheckPhaseBanner()
shouldCheckNotificationBanner()
cy.task('clearStubs')
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it would be easier to follow if there was a line break each time the stubs are cleared, but that may be a personal thing so I wouldn't hold it back for that reason

@nlsteers nlsteers merged commit 3187c1f into master Jan 24, 2025
11 checks passed
@nlsteers nlsteers deleted the pp-13377/test-payments-notification-banner branch January 24, 2025 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants