forked from carbon-design-system/ibm-products
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gallery-examples.test.js
400 lines (342 loc) · 14.4 KB
/
gallery-examples.test.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
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
158
159
160
161
162
163
164
165
166
167
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
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
/**
* Copyright IBM Corp. 2020, 2023
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/
import React from 'react';
import { render } from '@testing-library/react'; // https://testing-library.com/docs/react-testing-library/intro
import { init } from './test-common';
import { Example as APIKeyModalExample } from './APIKeyModal/src/Example/Example';
import { Example as AboutModalExample } from './AboutModal/src/Example/Example';
import { Example as BigNumbersExample } from './BigNumbers/src/Example/Example';
import { Example as CascadeExample } from './Cascade/src/Example/Example';
import { Example as CoachmarkExample } from './Coachmark/src/Example/Example';
import { Example as CoachmarkBeaconExample } from './CoachmarkBeacon/src/Example/Example';
import { Example as CoachmarkButtonExample } from './CoachmarkButton/src/Example/Example';
import { Example as CoachmarkFixedExample } from './CoachmarkFixed/src/Example/Example';
import { Example as CoachmarkOverlayElementExample } from './CoachmarkOverlayElement/src/Example/Example';
import { Example as CoachmarkOverlayElementsExample } from './CoachmarkOverlayElements/src/Example/Example';
import { Example as CoachmarkStackExample } from './CoachmarkStack/src/Example/Example';
import { Example as CreateFullPageExample } from './CreateFullPage/src/Example/Example';
import { Example as CreateModalExample } from './CreateModal/src/Example/Example';
import { Example as CreateSidePanelExample } from './CreateSidePanel/src/Example/Example';
import { Example as CreateTearsheetExample } from './CreateTearsheet/src/Example/Example';
import { Example as CreateTearsheetNarrowExample } from './CreateTearsheetNarrow/src/Example/Example';
import { Example as DataSpreadsheetExample } from './DataSpreadsheet/src/Example/Example';
import { Example as DatagridExample } from './Datagrid/src/Example/Example';
import { Example as DecoratorExample } from './Decorator/src/Example/Example';
import { Example as DelimitedListExample } from './DelimitedList/src/Example/Example';
import { Example as DescriptionListExample } from './DescriptionList/src/Example/Example';
import { Example as EditInPlaceExample } from './EditInPlace/src/Example/Example';
import { Example as EmptyStatesExample } from './EmptyStates/src/Example/Example';
import { Example as ExportModalExample } from './ExportModal/src/Example/Example';
import { Example as ExpressiveCardExample } from './ExpressiveCard/src/Example/Example';
import { Example as FilterPanelExample } from './FilterPanel/src/Example/Example';
import { Example as FullPageErrorExample } from './FullPageError/src/Example/Example';
import { Example as HTTPErrorsExample } from './HTTPErrors/src/Example/Example';
import { Example as ImportModalExample } from './ImportModal/src/Example/Example';
import { Example as InterstitialScreenExample } from './InterstitialScreen/src/Example/Example';
import { Example as InterstitialScreenViewExample } from './InterstitialScreenView/src/Example/Example';
import { Example as InterstitialScreenViewModuleExample } from './InterstitialScreenViewModule/src/Example/Example';
import { Example as NavExample } from './Nav/src/Example/Example';
import { Example as NotificationsPanelExample } from './NotificationsPanel/src/Example/Example';
import { Example as OptionsTileExample } from './OptionsTile/src/Example/Example';
import { Example as PageHeaderExample } from './PageHeader/src/Example/Example';
import { Example as ProductiveCardExample } from './ProductiveCard/src/Example/Example';
import { Example as RemoveModalExample } from './RemoveModal/src/Example/Example';
import { Example as SavingExample } from './Saving/src/Example/Example';
import { Example as ScrollGradientExample } from './ScrollGradient/src/Example/Example';
import { Example as SearchBarExample } from './SearchBar/src/Example/Example';
import { Example as SidePanelExample } from './SidePanel/src/Example/Example';
import { Example as StatusIconExample } from './StatusIcon/src/Example/Example';
import { Example as StatusIndicatorExample } from './StatusIndicator/src/Example/Example';
import { Example as StringFormatterExample } from './StringFormatter/src/Example/Example';
import { Example as TagOverflowExample } from './TagOverflow/src/Example/Example';
import { Example as TagSetExample } from './TagSet/src/Example/Example';
import { Example as TearsheetExample } from './Tearsheet/src/Example/Example';
import { Example as TruncatedListExample } from './TruncatedList/src/Example/Example';
import { Example as UserAvatarExample } from './UserAvatar/src/Example/Example';
import { Example as UserProfileImageExample } from './UserProfileImage/src/Example/Example';
import { Example as WebTerminalExample } from './WebTerminal/src/Example/Example';
import { Example as PrefixExampleExample } from './prefix-example/src/Example/Example';
import { Example as React16ExampleExample } from './react-16-example/src/Example/Example';
import { Example as React17ExampleExample } from './react-17-example/src/Example/Example';
describe('All examples', () => {
init(beforeEach, afterEach);
it('APIKeyModal renders', () => {
render(<APIKeyModalExample />);
// expect no errors int the console
expect(console.error).not.toHaveBeenCalled();
});
it('AboutModal renders', () => {
render(<AboutModalExample />);
// expect no errors int the console
expect(console.error).not.toHaveBeenCalled();
});
it('BigNumbers renders', () => {
render(<BigNumbersExample />);
// expect no errors int the console
expect(console.error).not.toHaveBeenCalled();
});
it('Cascade renders', () => {
render(<CascadeExample />);
// expect no errors int the console
expect(console.error).not.toHaveBeenCalled();
});
it('Coachmark renders', () => {
render(<CoachmarkExample />);
// expect no errors int the console
expect(console.error).not.toHaveBeenCalled();
});
it('CoachmarkBeacon renders', () => {
render(<CoachmarkBeaconExample />);
// expect no errors int the console
expect(console.error).not.toHaveBeenCalled();
});
it('CoachmarkButton renders', () => {
render(<CoachmarkButtonExample />);
// expect no errors int the console
expect(console.error).not.toHaveBeenCalled();
});
it('CoachmarkFixed renders', () => {
render(<CoachmarkFixedExample />);
// expect no errors int the console
expect(console.error).not.toHaveBeenCalled();
});
it('CoachmarkOverlayElement renders', () => {
render(<CoachmarkOverlayElementExample />);
// expect no errors int the console
expect(console.error).not.toHaveBeenCalled();
});
it('CoachmarkOverlayElements renders', () => {
render(<CoachmarkOverlayElementsExample />);
// expect no errors int the console
expect(console.error).not.toHaveBeenCalled();
});
it('CoachmarkStack renders', () => {
render(<CoachmarkStackExample />);
// expect no errors int the console
expect(console.error).not.toHaveBeenCalled();
});
it('CreateFullPage renders', () => {
render(<CreateFullPageExample />);
// expect no errors int the console
expect(console.error).not.toHaveBeenCalled();
});
it('CreateModal renders', () => {
render(<CreateModalExample />);
// expect no errors int the console
expect(console.error).not.toHaveBeenCalled();
});
it('CreateSidePanel renders', () => {
render(<CreateSidePanelExample />);
// expect no errors int the console
expect(console.error).not.toHaveBeenCalled();
});
it('CreateTearsheet renders', () => {
render(<CreateTearsheetExample />);
// expect no errors int the console
expect(console.error).not.toHaveBeenCalled();
});
it('CreateTearsheetNarrow renders', () => {
render(<CreateTearsheetNarrowExample />);
// expect no errors int the console
expect(console.error).not.toHaveBeenCalled();
});
it('DataSpreadsheet renders', () => {
render(<DataSpreadsheetExample />);
// expect no errors int the console
expect(console.error).not.toHaveBeenCalled();
});
it('Datagrid renders', () => {
render(<DatagridExample />);
// expect no errors int the console
expect(console.error).not.toHaveBeenCalled();
});
it('Decorator renders', () => {
render(<DecoratorExample />);
// expect no errors int the console
expect(console.error).not.toHaveBeenCalled();
});
it('DelimitedList renders', () => {
render(<DelimitedListExample />);
// expect no errors int the console
expect(console.error).not.toHaveBeenCalled();
});
it('DescriptionList renders', () => {
render(<DescriptionListExample />);
// expect no errors int the console
expect(console.error).not.toHaveBeenCalled();
});
it('EditInPlace renders', () => {
render(<EditInPlaceExample />);
// expect no errors int the console
expect(console.error).not.toHaveBeenCalled();
});
it('EmptyStates renders', () => {
render(<EmptyStatesExample />);
// expect no errors int the console
expect(console.error).not.toHaveBeenCalled();
});
it('ExportModal renders', () => {
render(<ExportModalExample />);
// expect no errors int the console
expect(console.error).not.toHaveBeenCalled();
});
it('ExpressiveCard renders', () => {
render(<ExpressiveCardExample />);
// expect no errors int the console
expect(console.error).not.toHaveBeenCalled();
});
it('FilterPanel renders', () => {
render(<FilterPanelExample />);
// expect no errors int the console
expect(console.error).not.toHaveBeenCalled();
});
it('FullPageError renders', () => {
render(<FullPageErrorExample />);
// expect no errors int the console
expect(console.error).not.toHaveBeenCalled();
});
it('HTTPErrors renders', () => {
render(<HTTPErrorsExample />);
// expect no errors int the console
expect(console.error).not.toHaveBeenCalled();
});
it('ImportModal renders', () => {
render(<ImportModalExample />);
// expect no errors int the console
expect(console.error).not.toHaveBeenCalled();
});
it('InterstitialScreen renders', () => {
render(<InterstitialScreenExample />);
// expect no errors int the console
expect(console.error).not.toHaveBeenCalled();
});
it('InterstitialScreenView renders', () => {
render(<InterstitialScreenViewExample />);
// expect no errors int the console
expect(console.error).not.toHaveBeenCalled();
});
it('InterstitialScreenViewModule renders', () => {
render(<InterstitialScreenViewModuleExample />);
// expect no errors int the console
expect(console.error).not.toHaveBeenCalled();
});
it('Nav renders', () => {
render(<NavExample />);
// expect no errors int the console
expect(console.error).not.toHaveBeenCalled();
});
it('NotificationsPanel renders', () => {
render(<NotificationsPanelExample />);
// expect no errors int the console
expect(console.error).not.toHaveBeenCalled();
});
it('OptionsTile renders', () => {
render(<OptionsTileExample />);
// expect no errors int the console
expect(console.error).not.toHaveBeenCalled();
});
it('PageHeader renders', () => {
render(<PageHeaderExample />);
// expect no errors int the console
expect(console.error).not.toHaveBeenCalled();
});
it('ProductiveCard renders', () => {
render(<ProductiveCardExample />);
// expect no errors int the console
expect(console.error).not.toHaveBeenCalled();
});
it('RemoveModal renders', () => {
render(<RemoveModalExample />);
// expect no errors int the console
expect(console.error).not.toHaveBeenCalled();
});
it('Saving renders', () => {
render(<SavingExample />);
// expect no errors int the console
expect(console.error).not.toHaveBeenCalled();
});
it('ScrollGradient renders', () => {
render(<ScrollGradientExample />);
// expect no errors int the console
expect(console.error).not.toHaveBeenCalled();
});
it('SearchBar renders', () => {
render(<SearchBarExample />);
// expect no errors int the console
expect(console.error).not.toHaveBeenCalled();
});
it('SidePanel renders', () => {
render(<SidePanelExample />);
// expect no errors int the console
expect(console.error).not.toHaveBeenCalled();
});
it('StatusIcon renders', () => {
render(<StatusIconExample />);
// expect no errors int the console
expect(console.error).not.toHaveBeenCalled();
});
it('StatusIndicator renders', () => {
render(<StatusIndicatorExample />);
// expect no errors int the console
expect(console.error).not.toHaveBeenCalled();
});
it('StringFormatter renders', () => {
render(<StringFormatterExample />);
// expect no errors int the console
expect(console.error).not.toHaveBeenCalled();
});
it('TagOverflow renders', () => {
render(<TagOverflowExample />);
// expect no errors int the console
expect(console.error).not.toHaveBeenCalled();
});
it('TagSet renders', () => {
render(<TagSetExample />);
// expect no errors int the console
expect(console.error).not.toHaveBeenCalled();
});
it('Tearsheet renders', () => {
render(<TearsheetExample />);
// expect no errors int the console
expect(console.error).not.toHaveBeenCalled();
});
it('TruncatedList renders', () => {
render(<TruncatedListExample />);
// expect no errors int the console
expect(console.error).not.toHaveBeenCalled();
});
it('UserAvatar renders', () => {
render(<UserAvatarExample />);
// expect no errors int the console
expect(console.error).not.toHaveBeenCalled();
});
it('UserProfileImage renders', () => {
render(<UserProfileImageExample />);
// expect no errors int the console
expect(console.error).not.toHaveBeenCalled();
});
it('WebTerminal renders', () => {
render(<WebTerminalExample />);
// expect no errors int the console
expect(console.error).not.toHaveBeenCalled();
});
it('PrefixExample renders', () => {
render(<PrefixExampleExample />);
// expect no errors int the console
expect(console.error).not.toHaveBeenCalled();
});
it('React16Example renders', () => {
render(<React16ExampleExample />);
// expect no errors int the console
expect(console.error).not.toHaveBeenCalled();
});
it('React17Example renders', () => {
render(<React17ExampleExample />);
// expect no errors int the console
expect(console.error).not.toHaveBeenCalled();
});
});