@elastic/eui 94.0.0 → 94.1.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/es/components/basic_table/basic_table.js +6 -2
- package/es/components/basic_table/collapsed_item_actions.js +11 -20
- package/es/components/basic_table/default_item_action.js +9 -16
- package/es/components/basic_table/in_memory_table.js +6 -2
- package/es/components/table/table_cells_shared.styles.js +7 -2
- package/es/components/table/table_header_cell.js +31 -33
- package/eui.d.ts +5 -3
- package/i18ntokens.json +14 -14
- package/lib/components/basic_table/basic_table.js +6 -2
- package/lib/components/basic_table/collapsed_item_actions.js +11 -20
- package/lib/components/basic_table/default_item_action.js +12 -17
- package/lib/components/basic_table/in_memory_table.js +6 -2
- package/lib/components/table/table_cells_shared.styles.js +7 -2
- package/lib/components/table/table_header_cell.js +31 -33
- package/optimize/es/components/basic_table/collapsed_item_actions.js +11 -20
- package/optimize/es/components/basic_table/default_item_action.js +9 -16
- package/optimize/es/components/table/table_cells_shared.styles.js +7 -2
- package/optimize/es/components/table/table_header_cell.js +31 -33
- package/optimize/lib/components/basic_table/collapsed_item_actions.js +11 -20
- package/optimize/lib/components/basic_table/default_item_action.js +12 -17
- package/optimize/lib/components/table/table_cells_shared.styles.js +7 -2
- package/optimize/lib/components/table/table_header_cell.js +31 -33
- package/package.json +2 -2
- package/test-env/components/basic_table/basic_table.js +6 -2
- package/test-env/components/basic_table/collapsed_item_actions.js +11 -20
- package/test-env/components/basic_table/default_item_action.js +12 -17
- package/test-env/components/basic_table/in_memory_table.js +6 -2
- package/test-env/components/table/table_cells_shared.styles.js +7 -2
- package/test-env/components/table/table_header_cell.js +31 -33
- package/src/components/date_picker/react-datepicker/LICENSE +0 -21
- package/src/components/date_picker/react-datepicker/README.md +0 -168
- package/src/services/theme/README.md +0 -153
- package/src/test/README.md +0 -44
package/src/test/README.md
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
# Testing-related utilities
|
|
2
|
-
|
|
3
|
-
EUI uses many of the utilities in this directory in its own Jest tests and, in case they are useful for consuming apps, exports them from `@elastic/eui/lib/test` (commonjs) and `@elastic/eui/es/test` (esm)
|
|
4
|
-
|
|
5
|
-
### findTestSubject
|
|
6
|
-
|
|
7
|
-
Provides a quick mechanism for searching an Enzyme-mounted component tree for an element with a specific `data-test-subj` attribute.
|
|
8
|
-
|
|
9
|
-
```js
|
|
10
|
-
// if mountedComponent contains e.g. <button data-test-subj="custom-button"/>, this would return that button
|
|
11
|
-
const component = findTestSubject(mountedComponent, 'custom-button');
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
### startThrowingReactWarnings
|
|
15
|
-
|
|
16
|
-
Patches `console.warn` and `console.error` to throw any warnings or errors, causing Jest to fail the test. This catches warnings emitted by React.
|
|
17
|
-
|
|
18
|
-
### stopThrowingReactWarnings
|
|
19
|
-
|
|
20
|
-
Must be called after `startThrowingReactWarnings`, this unpatches the console and restores normal functionality.
|
|
21
|
-
|
|
22
|
-
### sleep
|
|
23
|
-
|
|
24
|
-
Returns an `await`able promise that resolves after the specified duration.
|
|
25
|
-
|
|
26
|
-
```js
|
|
27
|
-
doSomeAction();
|
|
28
|
-
await sleep(500); // wait 500ms
|
|
29
|
-
expect(resultOfSomeAction);
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
### takeMountedSnapshot
|
|
33
|
-
|
|
34
|
-
Use this function to generate a Jest snapshot of components that have been fully rendered using Enzyme's `mount` method. Typically, a mounted component will result in a snapshot containing both React components and HTML elements. This function removes the React components, leaving only HTML elements in the snapshot.
|
|
35
|
-
|
|
36
|
-
This function takes an optional configuration as a second argument, which supports one option: `hasArrayOutput`. Enable this option if the mounted component has multiple direct children, otherwise only the first is included in the snapshot.
|
|
37
|
-
|
|
38
|
-
```js
|
|
39
|
-
expect(
|
|
40
|
-
takeMountedSnapshot(mountedComponent, {
|
|
41
|
-
hasArrayOutput: true,
|
|
42
|
-
})
|
|
43
|
-
).toMatchSnapshot();
|
|
44
|
-
```
|