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