@wordpress/editor 12.14.1-next.d6164808d3.0 → 12.15.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/CHANGELOG.md +2 -0
- package/package.json +28 -28
- package/src/components/theme-support-check/test/index.js +13 -15
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/editor",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.15.0",
|
|
4
4
|
"description": "Enhanced block editor for WordPress posts.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -31,32 +31,32 @@
|
|
|
31
31
|
],
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@babel/runtime": "^7.16.0",
|
|
34
|
-
"@wordpress/a11y": "^3.
|
|
35
|
-
"@wordpress/api-fetch": "^6.
|
|
36
|
-
"@wordpress/blob": "^3.
|
|
37
|
-
"@wordpress/block-editor": "^9.
|
|
38
|
-
"@wordpress/blocks": "^11.
|
|
39
|
-
"@wordpress/components": "^20.0.
|
|
40
|
-
"@wordpress/compose": "^5.
|
|
41
|
-
"@wordpress/core-data": "^4.14.
|
|
42
|
-
"@wordpress/data": "^7.0.
|
|
43
|
-
"@wordpress/date": "^4.
|
|
44
|
-
"@wordpress/deprecated": "^3.
|
|
45
|
-
"@wordpress/element": "^4.
|
|
46
|
-
"@wordpress/hooks": "^3.
|
|
47
|
-
"@wordpress/html-entities": "^3.
|
|
48
|
-
"@wordpress/i18n": "^4.
|
|
49
|
-
"@wordpress/icons": "^9.
|
|
50
|
-
"@wordpress/keyboard-shortcuts": "^3.
|
|
51
|
-
"@wordpress/keycodes": "^3.
|
|
52
|
-
"@wordpress/media-utils": "^4.
|
|
53
|
-
"@wordpress/notices": "^3.
|
|
54
|
-
"@wordpress/preferences": "^2.
|
|
55
|
-
"@wordpress/reusable-blocks": "^3.
|
|
56
|
-
"@wordpress/rich-text": "^5.
|
|
57
|
-
"@wordpress/server-side-render": "^3.
|
|
58
|
-
"@wordpress/url": "^3.
|
|
59
|
-
"@wordpress/wordcount": "^3.
|
|
34
|
+
"@wordpress/a11y": "^3.16.0",
|
|
35
|
+
"@wordpress/api-fetch": "^6.13.0",
|
|
36
|
+
"@wordpress/blob": "^3.16.0",
|
|
37
|
+
"@wordpress/block-editor": "^9.8.0",
|
|
38
|
+
"@wordpress/blocks": "^11.15.0",
|
|
39
|
+
"@wordpress/components": "^20.0.0",
|
|
40
|
+
"@wordpress/compose": "^5.14.0",
|
|
41
|
+
"@wordpress/core-data": "^4.14.0",
|
|
42
|
+
"@wordpress/data": "^7.0.0",
|
|
43
|
+
"@wordpress/date": "^4.16.0",
|
|
44
|
+
"@wordpress/deprecated": "^3.16.0",
|
|
45
|
+
"@wordpress/element": "^4.14.0",
|
|
46
|
+
"@wordpress/hooks": "^3.16.0",
|
|
47
|
+
"@wordpress/html-entities": "^3.16.0",
|
|
48
|
+
"@wordpress/i18n": "^4.16.0",
|
|
49
|
+
"@wordpress/icons": "^9.7.0",
|
|
50
|
+
"@wordpress/keyboard-shortcuts": "^3.14.0",
|
|
51
|
+
"@wordpress/keycodes": "^3.16.0",
|
|
52
|
+
"@wordpress/media-utils": "^4.7.0",
|
|
53
|
+
"@wordpress/notices": "^3.16.0",
|
|
54
|
+
"@wordpress/preferences": "^2.8.0",
|
|
55
|
+
"@wordpress/reusable-blocks": "^3.14.0",
|
|
56
|
+
"@wordpress/rich-text": "^5.14.0",
|
|
57
|
+
"@wordpress/server-side-render": "^3.14.0",
|
|
58
|
+
"@wordpress/url": "^3.17.0",
|
|
59
|
+
"@wordpress/wordcount": "^3.16.0",
|
|
60
60
|
"classnames": "^2.3.1",
|
|
61
61
|
"lodash": "^4.17.21",
|
|
62
62
|
"memize": "^1.1.0",
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"publishConfig": {
|
|
72
72
|
"access": "public"
|
|
73
73
|
},
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "171b87c7465b93e685e081c5f57f153507363c95"
|
|
75
75
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
|
-
import {
|
|
4
|
+
import { render, screen } from '@testing-library/react';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Internal dependencies
|
|
@@ -10,10 +10,8 @@ import { ThemeSupportCheck } from '../index';
|
|
|
10
10
|
|
|
11
11
|
describe( 'ThemeSupportCheck', () => {
|
|
12
12
|
it( "should not render if there's no support check provided", () => {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
);
|
|
16
|
-
expect( wrapper.type() ).toBe( null );
|
|
13
|
+
render( <ThemeSupportCheck>foobar</ThemeSupportCheck> );
|
|
14
|
+
expect( screen.queryByText( 'foobar' ) ).not.toBeInTheDocument();
|
|
17
15
|
} );
|
|
18
16
|
|
|
19
17
|
it( 'should render if post-thumbnails are supported', () => {
|
|
@@ -21,7 +19,7 @@ describe( 'ThemeSupportCheck', () => {
|
|
|
21
19
|
'post-thumbnails': true,
|
|
22
20
|
};
|
|
23
21
|
const supportKeys = 'post-thumbnails';
|
|
24
|
-
|
|
22
|
+
render(
|
|
25
23
|
<ThemeSupportCheck
|
|
26
24
|
supportKeys={ supportKeys }
|
|
27
25
|
themeSupports={ themeSupports }
|
|
@@ -29,7 +27,7 @@ describe( 'ThemeSupportCheck', () => {
|
|
|
29
27
|
foobar
|
|
30
28
|
</ThemeSupportCheck>
|
|
31
29
|
);
|
|
32
|
-
expect(
|
|
30
|
+
expect( screen.getByText( 'foobar' ) ).toBeVisible();
|
|
33
31
|
} );
|
|
34
32
|
|
|
35
33
|
it( 'should render if post-thumbnails are supported for the post type', () => {
|
|
@@ -37,7 +35,7 @@ describe( 'ThemeSupportCheck', () => {
|
|
|
37
35
|
'post-thumbnails': [ 'post' ],
|
|
38
36
|
};
|
|
39
37
|
const supportKeys = 'post-thumbnails';
|
|
40
|
-
|
|
38
|
+
render(
|
|
41
39
|
<ThemeSupportCheck
|
|
42
40
|
supportKeys={ supportKeys }
|
|
43
41
|
postType={ 'post' }
|
|
@@ -46,7 +44,7 @@ describe( 'ThemeSupportCheck', () => {
|
|
|
46
44
|
foobar
|
|
47
45
|
</ThemeSupportCheck>
|
|
48
46
|
);
|
|
49
|
-
expect(
|
|
47
|
+
expect( screen.getByText( 'foobar' ) ).toBeVisible();
|
|
50
48
|
} );
|
|
51
49
|
|
|
52
50
|
it( "should not render if post-thumbnails aren't supported for the post type", () => {
|
|
@@ -54,7 +52,7 @@ describe( 'ThemeSupportCheck', () => {
|
|
|
54
52
|
'post-thumbnails': [ 'post' ],
|
|
55
53
|
};
|
|
56
54
|
const supportKeys = 'post-thumbnails';
|
|
57
|
-
|
|
55
|
+
render(
|
|
58
56
|
<ThemeSupportCheck
|
|
59
57
|
supportKeys={ supportKeys }
|
|
60
58
|
postType={ 'page' }
|
|
@@ -63,7 +61,7 @@ describe( 'ThemeSupportCheck', () => {
|
|
|
63
61
|
foobar
|
|
64
62
|
</ThemeSupportCheck>
|
|
65
63
|
);
|
|
66
|
-
expect(
|
|
64
|
+
expect( screen.queryByText( 'foobar' ) ).not.toBeInTheDocument();
|
|
67
65
|
} );
|
|
68
66
|
|
|
69
67
|
it( 'should not render if post-thumbnails is limited and false is passed for postType', () => {
|
|
@@ -71,7 +69,7 @@ describe( 'ThemeSupportCheck', () => {
|
|
|
71
69
|
'post-thumbnails': [ 'post' ],
|
|
72
70
|
};
|
|
73
71
|
const supportKeys = 'post-thumbnails';
|
|
74
|
-
|
|
72
|
+
render(
|
|
75
73
|
<ThemeSupportCheck
|
|
76
74
|
supportKeys={ supportKeys }
|
|
77
75
|
postType={ false }
|
|
@@ -80,7 +78,7 @@ describe( 'ThemeSupportCheck', () => {
|
|
|
80
78
|
foobar
|
|
81
79
|
</ThemeSupportCheck>
|
|
82
80
|
);
|
|
83
|
-
expect(
|
|
81
|
+
expect( screen.queryByText( 'foobar' ) ).not.toBeInTheDocument();
|
|
84
82
|
} );
|
|
85
83
|
|
|
86
84
|
it( "should not render if theme doesn't support post-thumbnails", () => {
|
|
@@ -88,7 +86,7 @@ describe( 'ThemeSupportCheck', () => {
|
|
|
88
86
|
'post-thumbnails': false,
|
|
89
87
|
};
|
|
90
88
|
const supportKeys = 'post-thumbnails';
|
|
91
|
-
|
|
89
|
+
render(
|
|
92
90
|
<ThemeSupportCheck
|
|
93
91
|
supportKeys={ supportKeys }
|
|
94
92
|
themeSupports={ themeSupports }
|
|
@@ -96,6 +94,6 @@ describe( 'ThemeSupportCheck', () => {
|
|
|
96
94
|
foobar
|
|
97
95
|
</ThemeSupportCheck>
|
|
98
96
|
);
|
|
99
|
-
expect(
|
|
97
|
+
expect( screen.queryByText( 'foobar' ) ).not.toBeInTheDocument();
|
|
100
98
|
} );
|
|
101
99
|
} );
|