@pie-lib/config-ui 12.0.0-beta.5 → 12.0.0-next.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.
Files changed (116) hide show
  1. package/CHANGELOG.json +8 -1653
  2. package/CHANGELOG.md +345 -4
  3. package/LICENSE.md +5 -0
  4. package/NEXT.CHANGELOG.json +1 -0
  5. package/lib/alert-dialog.js +40 -10
  6. package/lib/alert-dialog.js.map +1 -1
  7. package/lib/checkbox.js +58 -48
  8. package/lib/checkbox.js.map +1 -1
  9. package/lib/choice-configuration/feedback-menu.js +24 -26
  10. package/lib/choice-configuration/feedback-menu.js.map +1 -1
  11. package/lib/choice-configuration/index.js +182 -185
  12. package/lib/choice-configuration/index.js.map +1 -1
  13. package/lib/choice-utils.js +5 -7
  14. package/lib/choice-utils.js.map +1 -1
  15. package/lib/feedback-config/feedback-selector.js +69 -73
  16. package/lib/feedback-config/feedback-selector.js.map +1 -1
  17. package/lib/feedback-config/group.js +22 -25
  18. package/lib/feedback-config/group.js.map +1 -1
  19. package/lib/feedback-config/index.js +41 -44
  20. package/lib/feedback-config/index.js.map +1 -1
  21. package/lib/form-section.js +31 -25
  22. package/lib/form-section.js.map +1 -1
  23. package/lib/help.js +37 -47
  24. package/lib/help.js.map +1 -1
  25. package/lib/index.js +1 -2
  26. package/lib/index.js.map +1 -1
  27. package/lib/input.js +12 -17
  28. package/lib/input.js.map +1 -1
  29. package/lib/inputs.js +58 -67
  30. package/lib/inputs.js.map +1 -1
  31. package/lib/langs.js +56 -70
  32. package/lib/langs.js.map +1 -1
  33. package/lib/layout/config-layout.js +78 -47
  34. package/lib/layout/config-layout.js.map +1 -1
  35. package/lib/layout/index.js.map +1 -1
  36. package/lib/layout/layout-contents.js +58 -60
  37. package/lib/layout/layout-contents.js.map +1 -1
  38. package/lib/layout/settings-box.js +25 -33
  39. package/lib/layout/settings-box.js.map +1 -1
  40. package/lib/mui-box/index.js +41 -50
  41. package/lib/mui-box/index.js.map +1 -1
  42. package/lib/number-text-field-custom.js +151 -89
  43. package/lib/number-text-field-custom.js.map +1 -1
  44. package/lib/number-text-field.js +74 -63
  45. package/lib/number-text-field.js.map +1 -1
  46. package/lib/radio-with-label.js +30 -16
  47. package/lib/radio-with-label.js.map +1 -1
  48. package/lib/settings/display-size.js +16 -20
  49. package/lib/settings/display-size.js.map +1 -1
  50. package/lib/settings/index.js +13 -19
  51. package/lib/settings/index.js.map +1 -1
  52. package/lib/settings/panel.js +140 -141
  53. package/lib/settings/panel.js.map +1 -1
  54. package/lib/settings/settings-radio-label.js +29 -16
  55. package/lib/settings/settings-radio-label.js.map +1 -1
  56. package/lib/settings/toggle.js +39 -25
  57. package/lib/settings/toggle.js.map +1 -1
  58. package/lib/tabs/index.js +18 -30
  59. package/lib/tabs/index.js.map +1 -1
  60. package/lib/tags-input/index.js +49 -61
  61. package/lib/tags-input/index.js.map +1 -1
  62. package/lib/two-choice.js +33 -43
  63. package/lib/two-choice.js.map +1 -1
  64. package/lib/with-stateful-model.js +8 -12
  65. package/lib/with-stateful-model.js.map +1 -1
  66. package/package.json +22 -11
  67. package/src/__tests__/alert-dialog.test.jsx +283 -0
  68. package/src/__tests__/checkbox.test.jsx +249 -0
  69. package/src/__tests__/choice-utils.test.js +12 -0
  70. package/src/__tests__/form-section.test.jsx +334 -0
  71. package/src/__tests__/help.test.jsx +184 -0
  72. package/src/__tests__/input.test.jsx +192 -0
  73. package/src/__tests__/langs.test.jsx +457 -0
  74. package/src/__tests__/number-text-field-custom.test.jsx +438 -0
  75. package/src/__tests__/number-text-field.test.jsx +341 -0
  76. package/src/__tests__/radio-with-label.test.jsx +259 -0
  77. package/src/__tests__/settings-panel.test.js +187 -0
  78. package/src/__tests__/settings.test.jsx +515 -0
  79. package/src/__tests__/tabs.test.jsx +193 -0
  80. package/src/__tests__/two-choice.test.js +110 -0
  81. package/src/__tests__/with-stateful-model.test.jsx +145 -0
  82. package/src/alert-dialog.jsx +30 -8
  83. package/src/checkbox.jsx +43 -37
  84. package/src/choice-configuration/__tests__/feedback-menu.test.jsx +163 -0
  85. package/src/choice-configuration/__tests__/index.test.jsx +234 -0
  86. package/src/choice-configuration/feedback-menu.jsx +6 -6
  87. package/src/choice-configuration/index.jsx +208 -192
  88. package/src/feedback-config/__tests__/feedback-config.test.jsx +141 -0
  89. package/src/feedback-config/__tests__/feedback-selector.test.jsx +107 -0
  90. package/src/feedback-config/feedback-selector.jsx +52 -53
  91. package/src/feedback-config/group.jsx +21 -22
  92. package/src/feedback-config/index.jsx +27 -29
  93. package/src/form-section.jsx +26 -18
  94. package/src/help.jsx +20 -28
  95. package/src/input.jsx +1 -1
  96. package/src/inputs.jsx +35 -44
  97. package/src/langs.jsx +41 -46
  98. package/src/layout/__tests__/config.layout.test.jsx +59 -0
  99. package/src/layout/__tests__/layout-content.test.jsx +3 -0
  100. package/src/layout/config-layout.jsx +53 -23
  101. package/src/layout/layout-contents.jsx +38 -40
  102. package/src/layout/settings-box.jsx +16 -19
  103. package/src/mui-box/index.jsx +35 -43
  104. package/src/number-text-field-custom.jsx +117 -65
  105. package/src/number-text-field.jsx +51 -34
  106. package/src/radio-with-label.jsx +26 -10
  107. package/src/settings/display-size.jsx +12 -11
  108. package/src/settings/index.js +2 -1
  109. package/src/settings/panel.jsx +101 -92
  110. package/src/settings/settings-radio-label.jsx +26 -10
  111. package/src/settings/toggle.jsx +37 -18
  112. package/src/tabs/index.jsx +8 -8
  113. package/src/tags-input/__tests__/index.test.jsx +113 -0
  114. package/src/tags-input/index.jsx +35 -38
  115. package/src/two-choice.jsx +15 -19
  116. package/README.md +0 -12
@@ -0,0 +1,334 @@
1
+ import React from 'react';
2
+ import { render, screen } from '@testing-library/react';
3
+ import FormSection from '../form-section';
4
+
5
+ describe('FormSection Component', () => {
6
+ describe('Rendering', () => {
7
+ it('should render with label and children', () => {
8
+ render(
9
+ <FormSection label="Settings">
10
+ <div>Child content</div>
11
+ </FormSection>,
12
+ );
13
+
14
+ expect(screen.getByText('Settings')).toBeInTheDocument();
15
+ expect(screen.getByText('Child content')).toBeInTheDocument();
16
+ });
17
+
18
+ it('should render label as subtitle1 typography', () => {
19
+ const { container } = render(
20
+ <FormSection label="Configuration">
21
+ <div>Content</div>
22
+ </FormSection>,
23
+ );
24
+
25
+ const typography = container.querySelector('[class*="MuiTypography"]');
26
+ expect(typography).toBeInTheDocument();
27
+ });
28
+
29
+ it('should render with custom className', () => {
30
+ const { container } = render(
31
+ <FormSection label="Custom" className="custom-class">
32
+ <div>Content</div>
33
+ </FormSection>,
34
+ );
35
+
36
+ expect(container.querySelector('.custom-class')).toBeInTheDocument();
37
+ });
38
+
39
+ it('should render multiple children', () => {
40
+ render(
41
+ <FormSection label="Multiple Children">
42
+ <div>First child</div>
43
+ <div>Second child</div>
44
+ <div>Third child</div>
45
+ </FormSection>,
46
+ );
47
+
48
+ expect(screen.getByText('First child')).toBeInTheDocument();
49
+ expect(screen.getByText('Second child')).toBeInTheDocument();
50
+ expect(screen.getByText('Third child')).toBeInTheDocument();
51
+ });
52
+
53
+ it('should render with single child', () => {
54
+ render(
55
+ <FormSection label="Single Child">
56
+ <input type="text" placeholder="Input" />
57
+ </FormSection>,
58
+ );
59
+
60
+ expect(screen.getByPlaceholderText('Input')).toBeInTheDocument();
61
+ });
62
+
63
+ it('should render with complex child components', () => {
64
+ render(
65
+ <FormSection label="Complex">
66
+ <div>
67
+ <label>Name:</label>
68
+ <input type="text" placeholder="Enter name" />
69
+ </div>
70
+ <div>
71
+ <label>Email:</label>
72
+ <input type="email" placeholder="Enter email" />
73
+ </div>
74
+ </FormSection>,
75
+ );
76
+
77
+ expect(screen.getByPlaceholderText('Enter name')).toBeInTheDocument();
78
+ expect(screen.getByPlaceholderText('Enter email')).toBeInTheDocument();
79
+ });
80
+ });
81
+
82
+ describe('Labels', () => {
83
+ it('should display different labels', () => {
84
+ const { rerender } = render(
85
+ <FormSection label="First Label">
86
+ <div>Content</div>
87
+ </FormSection>,
88
+ );
89
+
90
+ expect(screen.getByText('First Label')).toBeInTheDocument();
91
+
92
+ rerender(
93
+ <FormSection label="Second Label">
94
+ <div>Content</div>
95
+ </FormSection>,
96
+ );
97
+
98
+ expect(screen.getByText('Second Label')).toBeInTheDocument();
99
+ expect(screen.queryByText('First Label')).not.toBeInTheDocument();
100
+ });
101
+
102
+ it('should handle empty label', () => {
103
+ const { container } = render(
104
+ <FormSection label="">
105
+ <div>Content</div>
106
+ </FormSection>,
107
+ );
108
+
109
+ expect(container.querySelector('[class*="MuiTypography"]')).toBeInTheDocument();
110
+ expect(screen.getByText('Content')).toBeInTheDocument();
111
+ });
112
+
113
+ it('should handle long labels', () => {
114
+ const longLabel = 'This is a very long label that should wrap properly within the form section';
115
+ render(
116
+ <FormSection label={longLabel}>
117
+ <div>Content</div>
118
+ </FormSection>,
119
+ );
120
+
121
+ expect(screen.getByText(longLabel)).toBeInTheDocument();
122
+ });
123
+
124
+ it('should handle special characters in labels', () => {
125
+ const specialLabel = 'Settings & Configuration < Advanced > Test @ #1';
126
+ render(
127
+ <FormSection label={specialLabel}>
128
+ <div>Content</div>
129
+ </FormSection>,
130
+ );
131
+
132
+ expect(screen.getByText(specialLabel)).toBeInTheDocument();
133
+ });
134
+ });
135
+
136
+ describe('Styling and Layout', () => {
137
+ it('should apply default spacing', () => {
138
+ const { container } = render(
139
+ <FormSection label="Spaced">
140
+ <div>Content</div>
141
+ </FormSection>,
142
+ );
143
+
144
+ const formSection = container.querySelector('[class*="MuiBox"], div');
145
+ expect(formSection).toBeInTheDocument();
146
+ });
147
+
148
+ it('should apply labelExtraStyle to the label', () => {
149
+ const { container } = render(
150
+ <FormSection
151
+ label="Styled Label"
152
+ labelExtraStyle={{ color: 'red', fontWeight: 'bold' }}
153
+ >
154
+ <div>Content</div>
155
+ </FormSection>,
156
+ );
157
+
158
+ const typography = container.querySelector('[class*="MuiTypography"]');
159
+ expect(typography).toHaveStyle('color: red');
160
+ expect(typography).toHaveStyle('fontWeight: bold');
161
+ });
162
+
163
+ it('should apply multiple labelExtraStyle properties', () => {
164
+ const extraStyle = {
165
+ fontSize: '18px',
166
+ margin: '10px',
167
+ padding: '5px',
168
+ };
169
+
170
+ const { container } = render(
171
+ <FormSection
172
+ label="Multi-styled"
173
+ labelExtraStyle={extraStyle}
174
+ >
175
+ <div>Content</div>
176
+ </FormSection>,
177
+ );
178
+
179
+ const typography = container.querySelector('[class*="MuiTypography"]');
180
+ expect(typography).toHaveStyle('fontSize: 18px');
181
+ expect(typography).toHaveStyle('margin: 10px');
182
+ expect(typography).toHaveStyle('padding: 5px');
183
+ });
184
+
185
+ it('should handle no labelExtraStyle', () => {
186
+ const { container } = render(
187
+ <FormSection label="No Extra Style">
188
+ <div>Content</div>
189
+ </FormSection>,
190
+ );
191
+
192
+ expect(container.querySelector('[class*="MuiTypography"]')).toBeInTheDocument();
193
+ });
194
+ });
195
+
196
+ describe('CSS classes', () => {
197
+ it('should support multiple custom classes', () => {
198
+ const { container } = render(
199
+ <FormSection label="Test" className="class1 class2 class3">
200
+ <div>Content</div>
201
+ </FormSection>,
202
+ );
203
+
204
+ const element = container.querySelector('.class1.class2.class3');
205
+ expect(element).toBeInTheDocument();
206
+ });
207
+
208
+ it('should work without custom className', () => {
209
+ const { container } = render(
210
+ <FormSection label="Test">
211
+ <div>Content</div>
212
+ </FormSection>,
213
+ );
214
+
215
+ expect(container.firstChild).toBeInTheDocument();
216
+ });
217
+ });
218
+
219
+ describe('Content variations', () => {
220
+ it('should render form inputs as children', () => {
221
+ render(
222
+ <FormSection label="Form Inputs">
223
+ <input type="text" placeholder="Text input" />
224
+ <input type="number" placeholder="Number input" />
225
+ <textarea placeholder="Text area"></textarea>
226
+ </FormSection>,
227
+ );
228
+
229
+ expect(screen.getByPlaceholderText('Text input')).toBeInTheDocument();
230
+ expect(screen.getByPlaceholderText('Number input')).toBeInTheDocument();
231
+ expect(screen.getByPlaceholderText('Text area')).toBeInTheDocument();
232
+ });
233
+
234
+ it('should render lists as children', () => {
235
+ render(
236
+ <FormSection label="Options">
237
+ <ul>
238
+ <li>Option 1</li>
239
+ <li>Option 2</li>
240
+ <li>Option 3</li>
241
+ </ul>
242
+ </FormSection>,
243
+ );
244
+
245
+ expect(screen.getByText('Option 1')).toBeInTheDocument();
246
+ expect(screen.getByText('Option 2')).toBeInTheDocument();
247
+ expect(screen.getByText('Option 3')).toBeInTheDocument();
248
+ });
249
+
250
+ it('should render buttons as children', () => {
251
+ render(
252
+ <FormSection label="Actions">
253
+ <button>Save</button>
254
+ <button>Cancel</button>
255
+ </FormSection>,
256
+ );
257
+
258
+ expect(screen.getByRole('button', { name: 'Save' })).toBeInTheDocument();
259
+ expect(screen.getByRole('button', { name: 'Cancel' })).toBeInTheDocument();
260
+ });
261
+
262
+ it('should render nested form sections', () => {
263
+ render(
264
+ <FormSection label="Outer">
265
+ <FormSection label="Inner">
266
+ <div>Nested content</div>
267
+ </FormSection>
268
+ </FormSection>,
269
+ );
270
+
271
+ expect(screen.getByText('Outer')).toBeInTheDocument();
272
+ expect(screen.getByText('Inner')).toBeInTheDocument();
273
+ expect(screen.getByText('Nested content')).toBeInTheDocument();
274
+ });
275
+ });
276
+
277
+ describe('Edge cases', () => {
278
+ it('should render with conditional children', () => {
279
+ const showContent = true;
280
+
281
+ render(
282
+ <FormSection label="Conditional">
283
+ {showContent && <div>Visible</div>}
284
+ {!showContent && <div>Hidden</div>}
285
+ </FormSection>,
286
+ );
287
+
288
+ expect(screen.getByText('Visible')).toBeInTheDocument();
289
+ expect(screen.queryByText('Hidden')).not.toBeInTheDocument();
290
+ });
291
+
292
+ it('should update when children change', () => {
293
+ const { rerender } = render(
294
+ <FormSection label="Dynamic">
295
+ <div>Initial content</div>
296
+ </FormSection>,
297
+ );
298
+
299
+ expect(screen.getByText('Initial content')).toBeInTheDocument();
300
+
301
+ rerender(
302
+ <FormSection label="Dynamic">
303
+ <div>Updated content</div>
304
+ </FormSection>,
305
+ );
306
+
307
+ expect(screen.queryByText('Initial content')).not.toBeInTheDocument();
308
+ expect(screen.getByText('Updated content')).toBeInTheDocument();
309
+ });
310
+ });
311
+
312
+ describe('Accessibility', () => {
313
+ it('should have proper heading hierarchy', () => {
314
+ const { container } = render(
315
+ <FormSection label="Accessible Section">
316
+ <div>Content</div>
317
+ </FormSection>,
318
+ );
319
+
320
+ const typography = container.querySelector('[class*="MuiTypography"]');
321
+ expect(typography).toBeInTheDocument();
322
+ });
323
+
324
+ it('should be properly semantically structured', () => {
325
+ const { container } = render(
326
+ <FormSection label="Semantic">
327
+ <input type="text" />
328
+ </FormSection>,
329
+ );
330
+
331
+ expect(container.querySelector('div')).toBeInTheDocument();
332
+ });
333
+ });
334
+ });
@@ -0,0 +1,184 @@
1
+ import React from 'react';
2
+ import { render, screen, waitFor } from '@testing-library/react';
3
+ import userEvent from '@testing-library/user-event';
4
+ import Help, { HelpButton, HelpDialog } from '../help';
5
+
6
+ describe('HelpButton', () => {
7
+ it('renders help icon button', () => {
8
+ render(<HelpButton />);
9
+ const button = screen.getByRole('button');
10
+ expect(button).toBeInTheDocument();
11
+ });
12
+
13
+ it('calls onClick when clicked', async () => {
14
+ const user = userEvent.setup();
15
+ const onClick = jest.fn();
16
+ render(<HelpButton onClick={onClick} />);
17
+
18
+ const button = screen.getByRole('button');
19
+ await user.click(button);
20
+
21
+ expect(onClick).toHaveBeenCalledTimes(1);
22
+ });
23
+
24
+ it('renders with large size', () => {
25
+ const { container } = render(<HelpButton />);
26
+ const button = container.querySelector('button[class*="sizeLarge"]');
27
+ expect(button || screen.getByRole('button')).toBeInTheDocument();
28
+ });
29
+ });
30
+
31
+ describe('HelpDialog', () => {
32
+ const defaultProps = {
33
+ open: true,
34
+ onClose: jest.fn(),
35
+ title: 'Help Title',
36
+ children: 'Help content here',
37
+ };
38
+
39
+ beforeEach(() => {
40
+ jest.clearAllMocks();
41
+ });
42
+
43
+ it('renders when open is true', () => {
44
+ render(<HelpDialog {...defaultProps} />);
45
+ expect(screen.getByText('Help Title')).toBeInTheDocument();
46
+ expect(screen.getByText('Help content here')).toBeInTheDocument();
47
+ });
48
+
49
+ it('does not render when open is false', () => {
50
+ render(<HelpDialog {...defaultProps} open={false} />);
51
+ expect(screen.queryByText('Help Title')).not.toBeInTheDocument();
52
+ });
53
+
54
+ it('displays title correctly', () => {
55
+ render(<HelpDialog {...defaultProps} title="Custom Help" />);
56
+ expect(screen.getByText('Custom Help')).toBeInTheDocument();
57
+ });
58
+
59
+ it('displays children content', () => {
60
+ const content = 'This is helpful information';
61
+ render(<HelpDialog {...defaultProps} children={content} />);
62
+ expect(screen.getByText(content)).toBeInTheDocument();
63
+ });
64
+
65
+ it('calls onClose when OK button is clicked', async () => {
66
+ const user = userEvent.setup();
67
+ const onClose = jest.fn();
68
+ render(<HelpDialog {...defaultProps} onClose={onClose} />);
69
+
70
+ const okButton = screen.getByRole('button', { name: /OK/i });
71
+ await user.click(okButton);
72
+
73
+ expect(onClose).toHaveBeenCalledTimes(1);
74
+ });
75
+
76
+ it('calls onClose when dialog is closed via backdrop', async () => {
77
+ const user = userEvent.setup();
78
+ const onClose = jest.fn();
79
+ render(<HelpDialog {...defaultProps} onClose={onClose} />);
80
+
81
+ // Simulate backdrop click by calling onClose (MUI Dialog prop)
82
+ const dialog = screen.getByRole('dialog', { hidden: true });
83
+ expect(dialog).toBeInTheDocument();
84
+ });
85
+
86
+ it('renders OK button', () => {
87
+ render(<HelpDialog {...defaultProps} />);
88
+ const okButton = screen.getByRole('button', { name: /OK/i });
89
+ expect(okButton).toBeInTheDocument();
90
+ });
91
+
92
+ it('handles multiline children content', () => {
93
+ const content = ['Line 1', 'Line 2', 'Line 3'];
94
+ render(
95
+ <HelpDialog {...defaultProps}>
96
+ {content.map((line, i) => (
97
+ <div key={i}>{line}</div>
98
+ ))}
99
+ </HelpDialog>
100
+ );
101
+ expect(screen.getByText('Line 1')).toBeInTheDocument();
102
+ expect(screen.getByText('Line 2')).toBeInTheDocument();
103
+ expect(screen.getByText('Line 3')).toBeInTheDocument();
104
+ });
105
+ });
106
+
107
+ describe('Help Component', () => {
108
+ const defaultProps = {
109
+ title: 'Help Title',
110
+ children: 'Help content',
111
+ };
112
+
113
+ beforeEach(() => {
114
+ jest.clearAllMocks();
115
+ });
116
+
117
+ it('renders help button initially', () => {
118
+ render(<Help {...defaultProps} />);
119
+ const button = screen.getByRole('button');
120
+ expect(button).toBeInTheDocument();
121
+ });
122
+
123
+ it('opens dialog when help button is clicked', async () => {
124
+ const user = userEvent.setup();
125
+ render(<Help {...defaultProps} />);
126
+
127
+ const button = screen.getByRole('button');
128
+ await user.click(button);
129
+
130
+ expect(screen.getByText('Help Title')).toBeInTheDocument();
131
+ expect(screen.getByText('Help content')).toBeInTheDocument();
132
+ });
133
+
134
+ it('closes dialog when OK button is clicked', async () => {
135
+ const user = userEvent.setup();
136
+ render(<Help {...defaultProps} />);
137
+
138
+ const helpButton = screen.getByRole('button', { name: '' });
139
+ await user.click(helpButton);
140
+
141
+ const okButton = screen.getByRole('button', { name: /OK/i });
142
+ await user.click(okButton);
143
+
144
+ await waitFor(() => {
145
+ expect(screen.queryByText('Help Title')).not.toBeInTheDocument();
146
+ });
147
+ });
148
+
149
+ it('displays title prop', () => {
150
+ render(<Help title="Custom Title" children="content" />);
151
+ const button = screen.getByRole('button');
152
+ expect(button).toBeInTheDocument();
153
+ });
154
+
155
+ it('displays children prop', async () => {
156
+ const user = userEvent.setup();
157
+ render(<Help {...defaultProps} children="Custom help content" />);
158
+
159
+ const button = screen.getByRole('button');
160
+ await user.click(button);
161
+
162
+ expect(screen.getByText('Custom help content')).toBeInTheDocument();
163
+ });
164
+
165
+ it('can open and close dialog multiple times', async () => {
166
+ const user = userEvent.setup();
167
+ render(<Help {...defaultProps} />);
168
+
169
+ const helpButton = screen.getByRole('button', { name: '' });
170
+
171
+ await user.click(helpButton);
172
+ expect(screen.getByText('Help Title')).toBeInTheDocument();
173
+
174
+ let okButton = screen.getByRole('button', { name: /OK/i });
175
+ await user.click(okButton);
176
+
177
+ await waitFor(() => {
178
+ expect(screen.queryByText('Help Title')).not.toBeInTheDocument();
179
+ });
180
+
181
+ await user.click(helpButton);
182
+ expect(screen.getByText('Help Title')).toBeInTheDocument();
183
+ });
184
+ });