@qoretechnologies/reqore 0.38.8 → 0.40.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Collection/index.d.ts +4 -1
- package/dist/components/Collection/index.d.ts.map +1 -1
- package/dist/components/Collection/index.js +32 -14
- package/dist/components/Collection/index.js.map +1 -1
- package/dist/components/Collection/item.d.ts +1 -0
- package/dist/components/Collection/item.d.ts.map +1 -1
- package/dist/components/Collection/item.js.map +1 -1
- package/dist/components/ControlGroup/index.d.ts +4 -2
- package/dist/components/ControlGroup/index.d.ts.map +1 -1
- package/dist/components/ControlGroup/index.js.map +1 -1
- package/dist/components/Dropdown/list.d.ts +1 -0
- package/dist/components/Dropdown/list.d.ts.map +1 -1
- package/dist/components/Dropdown/list.js +2 -2
- package/dist/components/Dropdown/list.js.map +1 -1
- package/dist/components/Menu/divider.d.ts +1 -0
- package/dist/components/Menu/divider.d.ts.map +1 -1
- package/dist/components/Menu/divider.js +8 -5
- package/dist/components/Menu/divider.js.map +1 -1
- package/dist/components/Menu/section.d.ts +12 -0
- package/dist/components/Menu/section.d.ts.map +1 -0
- package/dist/components/Menu/section.js +87 -0
- package/dist/components/Menu/section.js.map +1 -0
- package/dist/components/Table/helpers.d.ts +1 -1
- package/dist/components/Table/helpers.d.ts.map +1 -1
- package/dist/components/Table/helpers.js +4 -1
- package/dist/components/Table/helpers.js.map +1 -1
- package/dist/components/Table/index.d.ts +1 -1
- package/dist/components/Table/index.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Collection/index.tsx +64 -18
- package/src/components/Collection/item.tsx +2 -0
- package/src/components/ControlGroup/index.tsx +8 -4
- package/src/components/Dropdown/list.tsx +6 -1
- package/src/components/Menu/divider.tsx +8 -1
- package/src/components/Menu/section.tsx +82 -0
- package/src/components/Table/helpers.ts +2 -0
- package/src/components/Table/index.tsx +1 -1
- package/src/index.tsx +1 -1
- package/src/mock/collectionData.tsx +36 -0
- package/src/mock/menu.ts +46 -48
- package/src/stories/Collection/Collection.stories.tsx +32 -0
- package/src/stories/Menu/Menu.stories.tsx +161 -108
- package/tests.json +1 -1
- package/__tests__/sidebar.test.tsx +0 -225
- package/dist/components/Sidebar/index.d.ts +0 -60
- package/dist/components/Sidebar/index.d.ts.map +0 -1
- package/dist/components/Sidebar/index.js +0 -266
- package/dist/components/Sidebar/index.js.map +0 -1
- package/dist/components/Sidebar/item.d.ts +0 -35
- package/dist/components/Sidebar/item.d.ts.map +0 -1
- package/dist/components/Sidebar/item.js +0 -98
- package/dist/components/Sidebar/item.js.map +0 -1
- package/dist/helpers/sidebar.d.ts +0 -5
- package/dist/helpers/sidebar.d.ts.map +0 -1
- package/dist/helpers/sidebar.js +0 -92
- package/dist/helpers/sidebar.js.map +0 -1
- package/src/components/Sidebar/index.tsx +0 -536
- package/src/components/Sidebar/item.tsx +0 -264
- package/src/helpers/sidebar.ts +0 -89
- package/src/stories/Sidebar/Sidebar.stories.tsx +0 -97
package/src/mock/menu.ts
CHANGED
|
@@ -1,59 +1,57 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export const qorusSidebarItems: IQorusSidebarItems = {
|
|
1
|
+
export const qorusSidebarItems = {
|
|
4
2
|
Menu: {
|
|
5
|
-
title:
|
|
3
|
+
title: 'Menu',
|
|
6
4
|
items: [
|
|
7
5
|
{
|
|
8
|
-
name:
|
|
9
|
-
as:
|
|
6
|
+
name: 'Menu item 1',
|
|
7
|
+
as: 'a',
|
|
10
8
|
props: {
|
|
11
|
-
href:
|
|
9
|
+
href: '/item-1',
|
|
12
10
|
},
|
|
13
|
-
icon:
|
|
14
|
-
id:
|
|
11
|
+
icon: 'Home3Line',
|
|
12
|
+
id: 'menu-item-1',
|
|
15
13
|
},
|
|
16
14
|
{
|
|
17
|
-
name:
|
|
18
|
-
as:
|
|
15
|
+
name: 'Menu item 2',
|
|
16
|
+
as: 'a',
|
|
19
17
|
props: {
|
|
20
|
-
href:
|
|
18
|
+
href: '/item-2',
|
|
21
19
|
},
|
|
22
|
-
icon:
|
|
23
|
-
id:
|
|
20
|
+
icon: 'Settings4Fill',
|
|
21
|
+
id: 'menu-item-2',
|
|
24
22
|
},
|
|
25
23
|
{
|
|
26
|
-
name:
|
|
27
|
-
icon:
|
|
28
|
-
id:
|
|
29
|
-
activePaths: [
|
|
24
|
+
name: 'Menu item 3',
|
|
25
|
+
icon: 'File3Line',
|
|
26
|
+
id: 'menu-item-3',
|
|
27
|
+
activePaths: ['/item-3'],
|
|
30
28
|
submenu: [
|
|
31
29
|
{
|
|
32
|
-
name:
|
|
33
|
-
as:
|
|
30
|
+
name: 'Submenu item 1',
|
|
31
|
+
as: 'a',
|
|
34
32
|
props: {
|
|
35
|
-
href:
|
|
33
|
+
href: '/item-3/item-1',
|
|
36
34
|
},
|
|
37
|
-
icon:
|
|
38
|
-
id:
|
|
35
|
+
icon: 'NodeTree',
|
|
36
|
+
id: 'submenu-item-1',
|
|
39
37
|
},
|
|
40
38
|
{
|
|
41
|
-
name:
|
|
42
|
-
as:
|
|
39
|
+
name: 'Submenu item 2',
|
|
40
|
+
as: 'a',
|
|
43
41
|
props: {
|
|
44
|
-
href:
|
|
42
|
+
href: '/item-3/item-2',
|
|
45
43
|
},
|
|
46
|
-
icon:
|
|
47
|
-
id:
|
|
44
|
+
icon: 'Chat3Fill',
|
|
45
|
+
id: 'submenu-item-2',
|
|
48
46
|
},
|
|
49
47
|
{
|
|
50
|
-
name:
|
|
51
|
-
as:
|
|
48
|
+
name: 'Super really long Submenu item 3',
|
|
49
|
+
as: 'a',
|
|
52
50
|
props: {
|
|
53
|
-
href:
|
|
51
|
+
href: '/item-3/item-3',
|
|
54
52
|
},
|
|
55
|
-
icon:
|
|
56
|
-
id:
|
|
53
|
+
icon: 'DatabaseFill',
|
|
54
|
+
id: 'submenu-item-3',
|
|
57
55
|
},
|
|
58
56
|
],
|
|
59
57
|
},
|
|
@@ -62,33 +60,33 @@ export const qorusSidebarItems: IQorusSidebarItems = {
|
|
|
62
60
|
Menu2: {
|
|
63
61
|
items: [
|
|
64
62
|
{
|
|
65
|
-
name:
|
|
66
|
-
as:
|
|
63
|
+
name: 'Super Long Really Another item 1',
|
|
64
|
+
as: 'a',
|
|
67
65
|
props: {
|
|
68
|
-
href:
|
|
66
|
+
href: '/another-item-1',
|
|
69
67
|
},
|
|
70
|
-
icon:
|
|
71
|
-
id:
|
|
68
|
+
icon: 'Home6Line',
|
|
69
|
+
id: 'another-item-1',
|
|
72
70
|
},
|
|
73
71
|
{
|
|
74
|
-
name:
|
|
75
|
-
as:
|
|
72
|
+
name: 'Another item 2',
|
|
73
|
+
as: 'a',
|
|
76
74
|
props: {
|
|
77
|
-
href:
|
|
75
|
+
href: '/another-item-2',
|
|
78
76
|
},
|
|
79
|
-
icon:
|
|
80
|
-
id:
|
|
77
|
+
icon: 'TableFill',
|
|
78
|
+
id: 'another-item-2',
|
|
81
79
|
},
|
|
82
80
|
{
|
|
83
|
-
name:
|
|
84
|
-
as:
|
|
81
|
+
name: 'Another item 3',
|
|
82
|
+
as: 'a',
|
|
85
83
|
props: {
|
|
86
84
|
onClick: () => {
|
|
87
|
-
alert(
|
|
85
|
+
alert('Click');
|
|
88
86
|
},
|
|
89
87
|
},
|
|
90
|
-
icon:
|
|
91
|
-
id:
|
|
88
|
+
icon: 'BellLine',
|
|
89
|
+
id: 'another-item-3',
|
|
92
90
|
},
|
|
93
91
|
],
|
|
94
92
|
},
|
|
@@ -5,6 +5,10 @@ import { IReqoreColumnsProps } from '../../components/Columns';
|
|
|
5
5
|
import { PADDING_FROM_SIZE } from '../../constants/sizes';
|
|
6
6
|
import items, { bigCollection } from '../../mock/collectionData';
|
|
7
7
|
|
|
8
|
+
import { expect } from '@storybook/jest';
|
|
9
|
+
import { fireEvent } from '@storybook/testing-library';
|
|
10
|
+
import { waitFor } from '@testing-library/react';
|
|
11
|
+
import { sleep } from '../../helpers/utils';
|
|
8
12
|
import { StoryMeta } from '../utils';
|
|
9
13
|
import { argManager, IntentArg, SizeArg } from '../utils/args';
|
|
10
14
|
|
|
@@ -283,3 +287,31 @@ export const DefaultFilter: Story = {
|
|
|
283
287
|
],
|
|
284
288
|
} as IReqoreCollectionProps,
|
|
285
289
|
};
|
|
290
|
+
|
|
291
|
+
export const CustomSortKeysWithDefaultSort: Story = {
|
|
292
|
+
args: {
|
|
293
|
+
label: 'Posts',
|
|
294
|
+
items: items.map((item) => ({
|
|
295
|
+
...item,
|
|
296
|
+
badge: [item.metadata.id, item.metadata.category],
|
|
297
|
+
})),
|
|
298
|
+
defaultSort: 'desc',
|
|
299
|
+
defaultSortBy: 'id',
|
|
300
|
+
sortKeys: {
|
|
301
|
+
id: 'ID',
|
|
302
|
+
category: 'Category',
|
|
303
|
+
},
|
|
304
|
+
},
|
|
305
|
+
play: async ({ canvasElement }) => {
|
|
306
|
+
await sleep(500);
|
|
307
|
+
|
|
308
|
+
await fireEvent.click(canvasElement.querySelector('.reqore-collection-sort'));
|
|
309
|
+
|
|
310
|
+
await waitFor(
|
|
311
|
+
() => expect(document.querySelectorAll('.reqore-popover-content')).toHaveLength(1),
|
|
312
|
+
{
|
|
313
|
+
timeout: 5000,
|
|
314
|
+
}
|
|
315
|
+
);
|
|
316
|
+
},
|
|
317
|
+
};
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { StoryFn, StoryObj } from '@storybook/react';
|
|
2
|
+
import { fireEvent, within } from '@storybook/testing-library';
|
|
3
|
+
import { noop } from 'lodash';
|
|
2
4
|
import { IReqoreMenuProps } from '../../components/Menu';
|
|
3
5
|
import { IReqoreMenuItemProps } from '../../components/Menu/item';
|
|
6
|
+
import { ReqoreMenuSection } from '../../components/Menu/section';
|
|
4
7
|
import {
|
|
8
|
+
ReqoreControlGroup,
|
|
5
9
|
ReqoreInput,
|
|
6
10
|
ReqoreMenu,
|
|
7
11
|
ReqoreMenuDivider,
|
|
@@ -91,121 +95,160 @@ const meta = {
|
|
|
91
95
|
export default meta;
|
|
92
96
|
type Story = StoryObj<typeof meta>;
|
|
93
97
|
|
|
94
|
-
const
|
|
95
|
-
|
|
96
|
-
<
|
|
97
|
-
<
|
|
98
|
-
|
|
99
|
-
Selected success
|
|
100
|
-
</ReqoreMenuItem>
|
|
101
|
-
<ReqoreMenuItem icon='Save3Fill' badge={10}>
|
|
102
|
-
Save
|
|
98
|
+
const MenuWithSubmenus = (args: IReqoreMenuProps) => (
|
|
99
|
+
<ReqoreMenu {...args} width='300px'>
|
|
100
|
+
<ReqoreMenuSection label='Submenu 1' icon='Apps2Fill'>
|
|
101
|
+
<ReqoreMenuItem icon='DualSim1Line' rightIcon='MoneyEuroBoxLine' onRightIconClick={noop}>
|
|
102
|
+
Submenu Item 1
|
|
103
103
|
</ReqoreMenuItem>
|
|
104
|
-
<ReqoreMenuDivider label='BIG Divider' size='huge' />
|
|
105
104
|
<ReqoreMenuItem
|
|
106
|
-
icon='
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
onRightIconClick={
|
|
110
|
-
tooltip={{
|
|
111
|
-
content: 'You sure?',
|
|
112
|
-
}}
|
|
113
|
-
intent='danger'
|
|
105
|
+
icon='DualSim1Line'
|
|
106
|
+
rightIcon='MoneyEuroBoxLine'
|
|
107
|
+
disabled
|
|
108
|
+
onRightIconClick={noop}
|
|
114
109
|
>
|
|
115
|
-
|
|
110
|
+
Submenu Item 2
|
|
116
111
|
</ReqoreMenuItem>
|
|
112
|
+
<ReqoreMenuSection icon='PlayListLine' label='Submenu 2 active' activeIntent='info'>
|
|
113
|
+
<ReqoreMenuItem icon='DualSim1Line' rightIcon='MoneyEuroBoxLine'>
|
|
114
|
+
Submenu Item 3
|
|
115
|
+
</ReqoreMenuItem>
|
|
116
|
+
<ReqoreMenuItem icon='DualSim1Line' rightIcon='MoneyEuroBoxLine'>
|
|
117
|
+
Submenu Item 4
|
|
118
|
+
</ReqoreMenuItem>
|
|
119
|
+
</ReqoreMenuSection>
|
|
120
|
+
<ReqoreMenuSection label='Collapsed submenu' isCollapsed={true} icon='ListOrdered'>
|
|
121
|
+
<ReqoreMenuItem icon='DualSim1Line' rightIcon='MoneyEuroBoxLine'>
|
|
122
|
+
Submenu Item 5
|
|
123
|
+
</ReqoreMenuItem>
|
|
124
|
+
<ReqoreMenuItem icon='DualSim1Line' rightIcon='MoneyEuroBoxLine'>
|
|
125
|
+
Submenu Item 6
|
|
126
|
+
</ReqoreMenuItem>
|
|
127
|
+
</ReqoreMenuSection>
|
|
128
|
+
</ReqoreMenuSection>
|
|
129
|
+
</ReqoreMenu>
|
|
130
|
+
);
|
|
117
131
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
132
|
+
const Template: StoryFn<IReqoreMenuProps> = (args) => {
|
|
133
|
+
return (
|
|
134
|
+
<ReqoreControlGroup verticalAlign='flex-start'>
|
|
135
|
+
<ReqoreMenu {...args}>
|
|
136
|
+
<ReqoreInput placeholder='Custom component' icon='Search2Fill' flat={false} />
|
|
137
|
+
<ReqoreMenuItem icon='Save3Fill' intent='success' selected>
|
|
138
|
+
Selected success
|
|
139
|
+
</ReqoreMenuItem>
|
|
140
|
+
<ReqoreMenuItem icon='Save3Fill' badge={10}>
|
|
141
|
+
Save
|
|
142
|
+
</ReqoreMenuItem>
|
|
143
|
+
<ReqoreMenuDivider label='BIG Divider' size='huge' />
|
|
144
|
+
<ReqoreMenuItem
|
|
145
|
+
icon='ChatPollFill'
|
|
146
|
+
onClick={() => alert('Item clicked')}
|
|
147
|
+
rightIcon='FahrenheitFill'
|
|
148
|
+
onRightIconClick={() => alert('Icon clicked')}
|
|
149
|
+
tooltip={{
|
|
150
|
+
content: 'You sure?',
|
|
151
|
+
}}
|
|
152
|
+
intent='danger'
|
|
153
|
+
>
|
|
154
|
+
Delete
|
|
155
|
+
</ReqoreMenuItem>
|
|
129
156
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
icon
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
<
|
|
167
|
-
icon='
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
157
|
+
<ReqoreMenuItem
|
|
158
|
+
icon='BluetoothConnectLine'
|
|
159
|
+
rightIcon='EditLine'
|
|
160
|
+
onRightIconClick={() => alert('Icon clicked')}
|
|
161
|
+
description='Button with right icon and description'
|
|
162
|
+
customTheme={{
|
|
163
|
+
main: 'info:darken:1:0.3',
|
|
164
|
+
}}
|
|
165
|
+
>
|
|
166
|
+
Some button
|
|
167
|
+
</ReqoreMenuItem>
|
|
168
|
+
|
|
169
|
+
<ReqoreMenuItem icon='Lock2Fill' description='I also have a description'>
|
|
170
|
+
This is a really long item that should wrap
|
|
171
|
+
</ReqoreMenuItem>
|
|
172
|
+
<ReqoreMenuItem icon='Lock2Fill' disabled>
|
|
173
|
+
Disabled
|
|
174
|
+
</ReqoreMenuItem>
|
|
175
|
+
<ReqoreMenuItem icon='Lock2Fill' disabled intent='warning'>
|
|
176
|
+
Disabled intent
|
|
177
|
+
</ReqoreMenuItem>
|
|
178
|
+
<ReqoreMenuDivider label='Divider' />
|
|
179
|
+
<ReqorePopover
|
|
180
|
+
component={ReqoreMenuItem}
|
|
181
|
+
flat={args.flat}
|
|
182
|
+
componentProps={
|
|
183
|
+
{
|
|
184
|
+
icon: 'EmotionUnhappyLine',
|
|
185
|
+
rightIcon: 'Scissors2Fill',
|
|
186
|
+
leftIconColor: 'danger:lighten',
|
|
187
|
+
wrap: args.wrapText,
|
|
188
|
+
flat: args.flat,
|
|
189
|
+
} as IReqoreMenuItemProps
|
|
190
|
+
}
|
|
191
|
+
openOnMount
|
|
192
|
+
content={
|
|
193
|
+
<ReqoreMenu {...args}>
|
|
194
|
+
<ReqoreMenuItem icon='ZhihuFill'>Item 1</ReqoreMenuItem>
|
|
195
|
+
<ReqoreMenuItem
|
|
196
|
+
icon='AccountCircleFill'
|
|
197
|
+
description='Would you look at that beautiful description'
|
|
198
|
+
intent='warning'
|
|
199
|
+
>
|
|
200
|
+
Item 2
|
|
201
|
+
</ReqoreMenuItem>
|
|
202
|
+
<ReqoreMenuItem icon='AnticlockwiseFill' disabled>
|
|
203
|
+
Item 3
|
|
204
|
+
</ReqoreMenuItem>
|
|
205
|
+
<ReqoreMenuItem
|
|
206
|
+
icon='ArchiveFill'
|
|
207
|
+
badge={{
|
|
208
|
+
label: '10',
|
|
209
|
+
effect: { gradient: { colors: { 0: '#00e3e8', 100: '#eb0e8c' } } },
|
|
210
|
+
}}
|
|
211
|
+
>
|
|
212
|
+
Item 4
|
|
213
|
+
</ReqoreMenuItem>
|
|
214
|
+
</ReqoreMenu>
|
|
215
|
+
}
|
|
216
|
+
isReqoreComponent
|
|
217
|
+
noWrapper
|
|
218
|
+
handler='click'
|
|
219
|
+
placement='right'
|
|
220
|
+
>
|
|
221
|
+
I have a submenu on click
|
|
222
|
+
</ReqorePopover>
|
|
223
|
+
<ReqoreMenuDivider
|
|
224
|
+
label='Fancy divider'
|
|
225
|
+
effect={{ gradient: { colors: { 0: '#0d5ba5', 100: '#ff5dfd' } } }}
|
|
226
|
+
align='left'
|
|
227
|
+
padded='none'
|
|
228
|
+
margin='none'
|
|
229
|
+
/>
|
|
230
|
+
<ReqoreMenuItem icon='DualSim1Line' rightIcon='MoneyEuroBoxLine' selected>
|
|
231
|
+
I am selected!
|
|
232
|
+
</ReqoreMenuItem>
|
|
233
|
+
<ReqoreMenuItem
|
|
234
|
+
icon='FireLine'
|
|
235
|
+
rightIcon='ArrowRightDownLine'
|
|
236
|
+
effect={{
|
|
237
|
+
gradient: {
|
|
238
|
+
colors: {
|
|
239
|
+
0: '#000000',
|
|
240
|
+
100: 'transparent',
|
|
241
|
+
},
|
|
200
242
|
},
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
</
|
|
208
|
-
|
|
243
|
+
}}
|
|
244
|
+
description='I also have a description'
|
|
245
|
+
badge={10}
|
|
246
|
+
>
|
|
247
|
+
Fancy
|
|
248
|
+
</ReqoreMenuItem>
|
|
249
|
+
</ReqoreMenu>
|
|
250
|
+
<MenuWithSubmenus {...args} />
|
|
251
|
+
</ReqoreControlGroup>
|
|
209
252
|
);
|
|
210
253
|
};
|
|
211
254
|
|
|
@@ -252,3 +295,13 @@ export const Transparent: Story = {
|
|
|
252
295
|
transparent: true,
|
|
253
296
|
},
|
|
254
297
|
};
|
|
298
|
+
|
|
299
|
+
export const SubmenuCanBeToggled: Story = {
|
|
300
|
+
render: (args) => <MenuWithSubmenus {...args} />,
|
|
301
|
+
play: async ({ canvasElement, ...rest }) => {
|
|
302
|
+
const canvas = within(canvasElement);
|
|
303
|
+
|
|
304
|
+
await fireEvent.click(canvas.queryAllByText('Submenu 2 active')[0]);
|
|
305
|
+
await fireEvent.click(canvas.queryAllByText('Collapsed submenu')[0]);
|
|
306
|
+
},
|
|
307
|
+
};
|