-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: ADDON-64844 better spacing in modal (#935)
feat: ADDON-64844 better spacing in modal
- Loading branch information
1 parent
e3a9b40
commit b385759
Showing
6 changed files
with
551 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
import type { Meta, StoryObj } from '@storybook/react'; | ||
import React from 'react'; | ||
import BaseFormView from 'src/components/BaseFormView'; | ||
import { rest } from 'msw'; | ||
import { userEvent, within } from '@storybook/testing-library'; | ||
import { setUnifiedConfig } from '../../../util/util'; | ||
import globalConfig from './globalConfig.json'; | ||
import InputPage from '../InputPage'; | ||
import { mockServerResponse } from '../../../mocks/server-response'; | ||
|
||
const meta = { | ||
component: InputPage, | ||
title: 'InputPage/Base', | ||
render: (args) => { | ||
setUnifiedConfig(args.globalConfig); | ||
return <InputPage />; | ||
}, | ||
args: { | ||
globalConfig, | ||
}, | ||
parameters: { | ||
msw: { | ||
handlers: [ | ||
rest.get('/servicesNS/nobody/-/:name', (req, res, ctx) => | ||
res(ctx.json(mockServerResponse)) | ||
), | ||
], | ||
}, | ||
}, | ||
} satisfies Meta<typeof BaseFormView>; | ||
|
||
export default meta; | ||
type Story = StoryObj<typeof meta>; | ||
|
||
export const InputPageView: Story = { | ||
play: async ({ canvasElement }) => { | ||
const body = within(canvasElement.ownerDocument.body); | ||
const canvas = within(canvasElement); | ||
|
||
await userEvent.click(canvas.getByRole('button', { name: 'Create New Input' })); | ||
|
||
await userEvent.click(await body.findByText('demo_input')); | ||
}, | ||
}; | ||
export const InputTabView: Story = { | ||
play: async ({ canvasElement }) => { | ||
const body = within(canvasElement.ownerDocument.body); | ||
const canvas = within(canvasElement); | ||
|
||
await userEvent.click(canvas.getByRole('button', { name: 'Create New Input' })); | ||
|
||
await userEvent.click(await body.findByText('Demo input page')); | ||
}, | ||
}; |
Oops, something went wrong.