forked from carbon-design-system/ibm-products
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgallery-examples.test.js
More file actions
239 lines (204 loc) · 8.41 KB
/
Copy pathgallery-examples.test.js
File metadata and controls
239 lines (204 loc) · 8.41 KB
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
/**
* 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 CascadeExample } from './Cascade/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 DelimitedListExample } from './DelimitedList/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 HTTPErrorsExample } from './HTTPErrors/src/Example/Example';
import { Example as ImportModalExample } from './ImportModal/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 SidePanelExample } from './SidePanel/src/Example/Example';
import { Example as StatusIconExample } from './StatusIcon/src/Example/Example';
import { Example as TagSetExample } from './TagSet/src/Example/Example';
import { Example as TearsheetExample } from './Tearsheet/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('Cascade renders', () => {
render(<CascadeExample />);
// 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('DelimitedList renders', () => {
render(<DelimitedListExample />);
// 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('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('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('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('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('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();
});
});