Merged in fix/3697-prettier-configs (pull request #3396)
fix(SW-3691): Setup one prettier config for whole repo * Setup prettierrc in root and remove other configs Approved-by: Joakim Jäderberg Approved-by: Linus Flood
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
import type { Meta, StoryObj } from '@storybook/nextjs-vite'
|
||||
import { expect, fn } from 'storybook/test'
|
||||
import type { Meta, StoryObj } from "@storybook/nextjs-vite"
|
||||
import { expect, fn } from "storybook/test"
|
||||
|
||||
import { PaymentOptionsGroup } from './PaymentOptionsGroup'
|
||||
import { PaymentOption } from './PaymentOption'
|
||||
import { PaymentMethodEnum } from '@scandic-hotels/common/constants/paymentMethod'
|
||||
import { FormDecorator } from '../../../../.storybook/decorators/FormDecorator'
|
||||
import { PaymentOptionsGroup } from "./PaymentOptionsGroup"
|
||||
import { PaymentOption } from "./PaymentOption"
|
||||
import { PaymentMethodEnum } from "@scandic-hotels/common/constants/paymentMethod"
|
||||
import { FormDecorator } from "../../../../.storybook/decorators/FormDecorator"
|
||||
|
||||
const meta: Meta<typeof PaymentOptionsGroup> = {
|
||||
title: 'Patterns/Form/Payment/PaymentOptionsGroup',
|
||||
title: "Patterns/Form/Payment/PaymentOptionsGroup",
|
||||
component: PaymentOptionsGroup,
|
||||
decorators: [FormDecorator],
|
||||
}
|
||||
@@ -17,8 +17,8 @@ type Story = StoryObj<typeof PaymentOptionsGroup>
|
||||
|
||||
export const Default: Story = {
|
||||
args: {
|
||||
label: 'Select Payment Method',
|
||||
name: 'paymentMethod',
|
||||
label: "Select Payment Method",
|
||||
name: "paymentMethod",
|
||||
onChange: fn(),
|
||||
children: (
|
||||
<>
|
||||
@@ -42,11 +42,11 @@ export const Default: Story = {
|
||||
),
|
||||
},
|
||||
play: async ({ canvas, userEvent, args }) => {
|
||||
const visaOption = await canvas.findByRole('radio', { name: 'Visa' })
|
||||
const visaOption = await canvas.findByRole("radio", { name: "Visa" })
|
||||
expect(visaOption).toBeInTheDocument()
|
||||
|
||||
expect(args.onChange).not.toHaveBeenCalled()
|
||||
await userEvent.click(visaOption)
|
||||
expect(args.onChange).toHaveBeenCalledWith('visa')
|
||||
expect(args.onChange).toHaveBeenCalledWith("visa")
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user