-
Notifications
You must be signed in to change notification settings - Fork 4
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
copy update for update amount SP form (with old min amount) #1352
Conversation
…numum, the update amount form should reflect that in the copy re the new minimum amount you can change it to
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.
Looks good 👍 I left a few questions, just to help my understanding really!
@@ -304,6 +312,7 @@ export const SupporterPlusUpdateAmountForm = ( | |||
> | |||
<TextInput | |||
label={otherAmountLabel} | |||
data-cy="supporter-plus-other-amount-input" |
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.
We can't target this using the label? (Feels a bit closer to how a human would interact with this).
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.
yeah good shout, I aggree ... the new selector in the test for the input is a bit more involved but I guess the benefit is that we're not polluting the dom and we're closer to how a user would navigate the site
{monthlyOrAnnual.toLowerCase()} amount below{' '} | ||
{minPriceDisplay} please call us via the{' '} | ||
If you would like to{' '} | ||
{currentAmountIsBelowNewMin |
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.
Would change
work in both cases here? Only ask because it would simplify the code a bit!
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.
@@ -98,6 +101,10 @@ describe('Update contribution amount', () => { | |||
|
|||
cy.findByText('Change amount').click(); | |||
|
|||
cy.contains( | |||
/£\d{2,3} per month is the minimum payment to receive this subscription./, |
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.
Are we fuzzy matching the amount here to account for future config changes? (I.e. so this test doesn't have to be updated each time the config changes?)
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.
yeah I fuzzy matched here to reduce the number of places that you would have to update if/when we do another price rise ... there are still places where you have to do it manually though, so this doesn't solve that 'problem' everywhere, only here.
…a selector in the cypress test
What does this change?
If you have a supporter plus at an old price that is below the new minumum, the update amount form should reflect that in the copy re the new minimum amount you can change it to
Images