Skip to content

Commit 04f02b5

Browse files
authored
chore: del story for form (#1071)
1 parent 3ea0cdb commit 04f02b5

File tree

3 files changed

+1
-36
lines changed

3 files changed

+1
-36
lines changed

src/blocks/Form/__stories__/Form.stories.tsx

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,11 @@ import {v4 as uuidv4} from 'uuid';
55

66
import {yfmTransform} from '../../../../.storybook/utils';
77
import {PageConstructor} from '../../../containers/PageConstructor';
8-
import {
9-
ContentItemProps,
10-
FormBlockDirection,
11-
FormBlockModel,
12-
isHubspotDataForm,
13-
} from '../../../models';
8+
import {FormBlockDirection, FormBlockModel, isHubspotDataForm} from '../../../models';
149
import FormBlock from '../Form';
1510

1611
import data from './data.json';
1712

18-
const transformedContentList = data.list.map((item) => {
19-
return {
20-
...item,
21-
text: item?.text && yfmTransform(item.text),
22-
};
23-
}) as ContentItemProps[];
24-
2513
export default {
2614
title: 'Blocks/Form',
2715
component: FormBlock,
@@ -58,20 +46,6 @@ const DefaultTemplate: StoryFn<FormBlockModel> = (args) => (
5846
/>
5947
);
6048

61-
const WithContentListTemplate: StoryFn<FormBlockModel> = (args) => (
62-
<PageConstructor
63-
content={{
64-
blocks: [
65-
{
66-
...args,
67-
formData: __getFormData(args.formData),
68-
textContent: {list: transformedContentList, title: 'WithContentList'},
69-
},
70-
],
71-
}}
72-
/>
73-
);
74-
7549
const ContentDirectionTemplate: StoryFn<FormBlockModel> = (args) => (
7650
<PageConstructor
7751
content={{
@@ -119,7 +93,6 @@ export const WithBackgroundColor = ContentDirectionTemplate.bind({});
11993
export const WithBackgroundImage = ContentDirectionTemplate.bind({});
12094
export const DarkTheme = ContentDirectionTemplate.bind({});
12195
export const FormData = FormDataTemplate.bind({});
122-
export const WithContentList = WithContentListTemplate.bind({});
12396

12497
WithBackgroundColor.args = data.withBackground;
12598

src/blocks/Form/__tests__/Form.visual.test.tsx

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import {
99
FormData,
1010
WithBackgroundColor,
1111
WithBackgroundImage,
12-
WithContentList,
1312
} from './helpers';
1413

1514
const DEFAULT_FORM_DELAY = 20 * 1000;
@@ -50,10 +49,4 @@ test.describe('Form', () => {
5049
await delay(DEFAULT_FORM_DELAY);
5150
await expectScreenshot({skipTheme: 'dark'});
5251
});
53-
54-
test('render stories <WithContentList>', async ({mount, expectScreenshot, delay}) => {
55-
await mount(<WithContentList />);
56-
await delay(DEFAULT_FORM_DELAY);
57-
await expectScreenshot({skipTheme: 'dark'});
58-
});
5952
});

src/blocks/Form/__tests__/helpers.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,4 @@ export const {
99
WithBackgroundImage,
1010
DarkTheme,
1111
FormData,
12-
WithContentList,
1312
} = composeStories(FormStories);

0 commit comments

Comments
 (0)