Merged in fix/select-payment-method-set-form-name (pull request #3012)

Fix/select payment method set form name

* fix(selectPaymentMethod): Set form name for tests

* fix(selectPaymentMethod): Set form name for tests
This commit is contained in:
Joakim Jäderberg
2025-10-27 09:12:25 +00:00
parent 108bb2b319
commit 3c72d043e2

View File

@@ -1,3 +1,4 @@
import type { ComponentProps } from 'react'
import type { Meta, StoryObj } from '@storybook/nextjs-vite'
import { fn, expect } from 'storybook/test'
import { SelectPaymentMethod } from './index'
@@ -17,6 +18,7 @@ type Story = StoryObj<typeof SelectPaymentMethod>
export const PrimaryDefault: Story = {
args: {
formName: 'paymentMethod',
onChange: fn(),
paymentMethods: [
{
@@ -32,7 +34,7 @@ export const PrimaryDefault: Story = {
truncatedNumber: '1234',
},
],
},
} satisfies ComponentProps<typeof SelectPaymentMethod>,
play: async ({ canvas, userEvent, args }) => {
const options = await canvas.findAllByRole('radio')