Skip to content

Conversation

m1aw
Copy link
Contributor

@m1aw m1aw commented Sep 30, 2025

Summary

This adds support for new bankTransfer variants and also support for 2 new fields bankCode and branchCode.

Tested scenarios

Fixed issue:

Copy link

changeset-bot bot commented Sep 30, 2025

⚠️ No Changeset found

Latest commit: 08b9a4f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

netlify bot commented Sep 30, 2025

Deploy Preview for adyen-web ready!

Name Link
🔨 Latest commit 08b9a4f
🔍 Latest deploy log https://app.netlify.com/projects/adyen-web/deploys/68dfd79d113df100081a2217
😎 Deploy Preview https://deploy-preview-3543.checkout-web-dev.adyen.com
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Contributor

github-actions bot commented Sep 30, 2025

size-limit report 📦

Path Size
UMD 113.85 KB (+0.11% 🔺)
Auto 120.29 KB (+0.11% 🔺)
ESM - Core 23.96 KB (+0.49% 🔺)
ESM - Core + Card 64.1 KB (+0.08% 🔺)
ESM - Core + Dropin with Card 68.86 KB (+0.09% 🔺)

Comment on lines +108 to +109
expect(await screen.findByText('Branch code')).toBeInTheDocument();
expect(await screen.findByText(mockResult.branchCode)).toBeInTheDocument();
Copy link
Contributor

Choose a reason for hiding this comment

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

To test for accessibility better here we should find the value based on the label i.e

expect(screen.getByLabelText('Branch code').innerText).toBe(mockResult.branchCode)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You mean to make sure it's a semantic label? I'm going to test, but I think is a limitation of testing-library and it not considering that definition lists are labels, but my memory could be wrong. Honestly just copy and pasted from the code above.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, it's not a label so what we do for example in PayTo.test.ts:L303 is:

const mandateAmount = screen.getByText('Amount').nextSibling;
expect(mandateAmount).toHaveTextContent('Up to A$40.01 per transaction');

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think this also might be related: testing-library/dom-testing-library#140

Copy link
Contributor

Choose a reason for hiding this comment

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

Two options I would like to propose. So I see that indeed, the bank instructions table component does not tie the label to the fields. This is actually not great accessibility wise.

Could we take this opportunity to either

  • Refactor the markup to use a grid with each label actually using a label element with an id to link it to its value. One drawback here is that we might break backwards compatibility with the styles perhaps we can keep the classnames and still do this
  • Simply just use aria-labeledby and id props with the current markup. Then we can use the getByLabelText tests

What do you think?

@m1aw m1aw changed the title [WIP] feat(bankTransfer): support new countries and new fields feat(bankTransfer): support new countries and new fields Oct 3, 2025
@m1aw m1aw marked this pull request as ready for review October 3, 2025 14:03
@m1aw m1aw requested a review from a team as a code owner October 3, 2025 14:03
@m1aw m1aw requested a review from johnayeni October 3, 2025 14:03
Copy link

sonarqubecloud bot commented Oct 3, 2025

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