-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…mpatibility Issue/#32 test formio compatibility
- Loading branch information
Showing
59 changed files
with
1,754 additions
and
1,724 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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
3 changes: 2 additions & 1 deletion
3
src/components/columns/columns.component.tsx → ...ents/formio/columns/columns.component.tsx
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,45 @@ | ||
import {Columns} from '@components'; | ||
import {RenderComponent} from '@lib/renderer'; | ||
import {expect} from '@storybook/jest'; | ||
import type {ComponentStory, Meta} from '@storybook/react'; | ||
import {within} from '@storybook/testing-library'; | ||
|
||
import {FormikDecorator} from '../../../tests/utils/decorators'; | ||
|
||
const meta: Meta<typeof Columns> = { | ||
title: 'Components / Formio / Columns', | ||
component: Columns, | ||
decorators: [], | ||
parameters: {}, | ||
}; | ||
export default meta; | ||
|
||
export const columns: ComponentStory<typeof RenderComponent> = args => ( | ||
<RenderComponent {...args} /> | ||
); | ||
columns.args = { | ||
component: { | ||
key: 'foo', | ||
type: 'columns', | ||
columns: [ | ||
{ | ||
key: 'foo.foo', | ||
type: 'column', | ||
size: 9, | ||
components: [{key: 'foo.foo.foo', type: 'content', html: 'Left column.'}], | ||
}, | ||
{ | ||
key: 'foo.bar', | ||
type: 'column', | ||
size: 3, | ||
components: [{key: 'foo.bar.bar', type: 'content', html: 'Right column.'}], | ||
}, | ||
], | ||
}, | ||
}; | ||
columns.play = async ({canvasElement}) => { | ||
const canvas = within(canvasElement); | ||
expect(await canvas.findByText('Left column.')).toBeVisible(); | ||
expect(await canvas.findByText('Right column.')).toBeVisible(); | ||
}; | ||
columns.decorators = [FormikDecorator]; |
File renamed without changes.
File renamed without changes.
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,31 @@ | ||
import {Content} from '@components'; | ||
import {RenderComponent} from '@lib/renderer'; | ||
import {expect} from '@storybook/jest'; | ||
import type {ComponentStory, Meta} from '@storybook/react'; | ||
import {within} from '@storybook/testing-library'; | ||
|
||
import {FormikDecorator} from '../../../tests/utils/decorators'; | ||
|
||
const meta: Meta<typeof Content> = { | ||
title: 'Components / Formio / Content', | ||
component: Content, | ||
decorators: [], | ||
parameters: {}, | ||
}; | ||
export default meta; | ||
|
||
export const content: ComponentStory<typeof RenderComponent> = args => ( | ||
<RenderComponent {...args} /> | ||
); | ||
content.args = { | ||
component: { | ||
key: 'foo', | ||
type: 'content', | ||
html: 'The <b>quick</b> brown fox jumps over the lazy dog.', | ||
}, | ||
}; | ||
content.play = async ({canvasElement}) => { | ||
const canvas = within(canvasElement); | ||
expect(await canvas.findByText('quick')).toBeVisible(); | ||
}; | ||
content.decorators = [FormikDecorator]; |
File renamed without changes.
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,3 @@ | ||
export * from './columns'; | ||
export * from './content'; | ||
export * from './textfield'; |
File renamed without changes.
Oops, something went wrong.