@wordpress/format-library 4.11.0 → 4.12.1
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/build/bold/index.js +6 -8
- package/build/bold/index.js.map +1 -1
- package/build/code/index.js +6 -8
- package/build/code/index.js.map +1 -1
- package/build/image/index.js +24 -28
- package/build/image/index.js.map +1 -1
- package/build/index.js +4 -7
- package/build/index.js.map +1 -1
- package/build/italic/index.js +6 -8
- package/build/italic/index.js.map +1 -1
- package/build/keyboard/index.js +6 -8
- package/build/keyboard/index.js.map +1 -1
- package/build/language/index.js +31 -20
- package/build/language/index.js.map +1 -1
- package/build/link/index.js +17 -17
- package/build/link/index.js.map +1 -1
- package/build/link/index.native.js +2 -6
- package/build/link/index.native.js.map +1 -1
- package/build/link/inline.js +11 -11
- package/build/link/inline.js.map +1 -1
- package/build/link/modal-screens/link-picker-screen.native.js +4 -6
- package/build/link/modal-screens/link-picker-screen.native.js.map +1 -1
- package/build/link/modal-screens/link-settings-screen.native.js +25 -33
- package/build/link/modal-screens/link-settings-screen.native.js.map +1 -1
- package/build/link/modal.native.js +8 -10
- package/build/link/modal.native.js.map +1 -1
- package/build/link/utils.js +18 -44
- package/build/link/utils.js.map +1 -1
- package/build/strikethrough/index.js +6 -8
- package/build/strikethrough/index.js.map +1 -1
- package/build/subscript/index.js +6 -8
- package/build/subscript/index.js.map +1 -1
- package/build/superscript/index.js +6 -8
- package/build/superscript/index.js.map +1 -1
- package/build/text-color/index.js +11 -14
- package/build/text-color/index.js.map +1 -1
- package/build/text-color/index.native.js +16 -23
- package/build/text-color/index.native.js.map +1 -1
- package/build/text-color/inline.js +15 -21
- package/build/text-color/inline.js.map +1 -1
- package/build/text-color/inline.native.js +16 -24
- package/build/text-color/inline.native.js.map +1 -1
- package/build/underline/index.js +4 -6
- package/build/underline/index.js.map +1 -1
- package/build/unknown/index.js +6 -8
- package/build/unknown/index.js.map +1 -1
- package/build-module/bold/index.js +6 -8
- package/build-module/bold/index.js.map +1 -1
- package/build-module/code/index.js +6 -8
- package/build-module/code/index.js.map +1 -1
- package/build-module/image/index.js +24 -28
- package/build-module/image/index.js.map +1 -1
- package/build-module/index.js +4 -7
- package/build-module/index.js.map +1 -1
- package/build-module/italic/index.js +6 -8
- package/build-module/italic/index.js.map +1 -1
- package/build-module/keyboard/index.js +6 -8
- package/build-module/keyboard/index.js.map +1 -1
- package/build-module/language/index.js +31 -20
- package/build-module/language/index.js.map +1 -1
- package/build-module/link/index.js +17 -17
- package/build-module/link/index.js.map +1 -1
- package/build-module/link/index.native.js +2 -6
- package/build-module/link/index.native.js.map +1 -1
- package/build-module/link/inline.js +11 -11
- package/build-module/link/inline.js.map +1 -1
- package/build-module/link/modal-screens/link-picker-screen.native.js +4 -5
- package/build-module/link/modal-screens/link-picker-screen.native.js.map +1 -1
- package/build-module/link/modal-screens/link-settings-screen.native.js +25 -33
- package/build-module/link/modal-screens/link-settings-screen.native.js.map +1 -1
- package/build-module/link/modal.native.js +8 -9
- package/build-module/link/modal.native.js.map +1 -1
- package/build-module/link/utils.js +18 -44
- package/build-module/link/utils.js.map +1 -1
- package/build-module/strikethrough/index.js +6 -8
- package/build-module/strikethrough/index.js.map +1 -1
- package/build-module/subscript/index.js +6 -8
- package/build-module/subscript/index.js.map +1 -1
- package/build-module/superscript/index.js +6 -8
- package/build-module/superscript/index.js.map +1 -1
- package/build-module/text-color/index.js +11 -14
- package/build-module/text-color/index.js.map +1 -1
- package/build-module/text-color/index.native.js +16 -23
- package/build-module/text-color/index.native.js.map +1 -1
- package/build-module/text-color/inline.js +15 -21
- package/build-module/text-color/inline.js.map +1 -1
- package/build-module/text-color/inline.native.js +16 -24
- package/build-module/text-color/inline.native.js.map +1 -1
- package/build-module/underline/index.js +4 -6
- package/build-module/underline/index.js.map +1 -1
- package/build-module/unknown/index.js +6 -8
- package/build-module/unknown/index.js.map +1 -1
- package/package.json +13 -13
- package/src/language/index.js +73 -66
- package/src/link/index.js +4 -2
- package/src/link/inline.js +1 -0
- package/src/link/test/__snapshots__/modal.native.js.snap +476 -0
- package/src/link/test/index.native.js +15 -15
- package/src/link/test/modal.native.js +5 -2
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
4
|
import { Keyboard, Platform } from 'react-native';
|
|
5
|
-
import { render, fireEvent
|
|
5
|
+
import { render, fireEvent } from 'test/helpers';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* WordPress dependencies
|
|
@@ -53,9 +53,7 @@ describe( 'Android', () => {
|
|
|
53
53
|
screen.getByLabelText( 'Link to, Search or type URL' )
|
|
54
54
|
);
|
|
55
55
|
// Await back button to allow async state updates to complete
|
|
56
|
-
const backButton = await
|
|
57
|
-
screen.getByLabelText( 'Go back' )
|
|
58
|
-
);
|
|
56
|
+
const backButton = await screen.findByLabelText( 'Go back' );
|
|
59
57
|
Keyboard.dismiss.mockClear();
|
|
60
58
|
fireEvent.press( backButton );
|
|
61
59
|
|
|
@@ -63,7 +61,7 @@ describe( 'Android', () => {
|
|
|
63
61
|
} );
|
|
64
62
|
|
|
65
63
|
it( 'improves apply animation performance by dismissing keyboard beforehand', async () => {
|
|
66
|
-
const
|
|
64
|
+
const screen = render(
|
|
67
65
|
<LinkEditSlot
|
|
68
66
|
activeAttributes={ {} }
|
|
69
67
|
onChange={ () => {} }
|
|
@@ -74,10 +72,12 @@ describe( 'Android', () => {
|
|
|
74
72
|
} }
|
|
75
73
|
/>
|
|
76
74
|
);
|
|
77
|
-
fireEvent.press( getByLabelText( 'Link' ) );
|
|
78
|
-
fireEvent.press(
|
|
75
|
+
fireEvent.press( screen.getByLabelText( 'Link' ) );
|
|
76
|
+
fireEvent.press(
|
|
77
|
+
screen.getByLabelText( 'Link to, Search or type URL' )
|
|
78
|
+
);
|
|
79
79
|
// Await back button to allow async state updates to complete
|
|
80
|
-
const backButton = await
|
|
80
|
+
const backButton = await screen.findByLabelText( 'Apply' );
|
|
81
81
|
Keyboard.dismiss.mockClear();
|
|
82
82
|
fireEvent.press( backButton );
|
|
83
83
|
|
|
@@ -112,9 +112,7 @@ describe( 'iOS', () => {
|
|
|
112
112
|
screen.getByLabelText( 'Link to, Search or type URL' )
|
|
113
113
|
);
|
|
114
114
|
// Await back button to allow async state updates to complete
|
|
115
|
-
const backButton = await
|
|
116
|
-
screen.getByLabelText( 'Go back' )
|
|
117
|
-
);
|
|
115
|
+
const backButton = await screen.findByLabelText( 'Go back' );
|
|
118
116
|
Keyboard.dismiss.mockClear();
|
|
119
117
|
fireEvent.press( backButton );
|
|
120
118
|
|
|
@@ -122,7 +120,7 @@ describe( 'iOS', () => {
|
|
|
122
120
|
} );
|
|
123
121
|
|
|
124
122
|
it( 'improves apply animation performance by dismissing keyboard beforehand', async () => {
|
|
125
|
-
const
|
|
123
|
+
const screen = render(
|
|
126
124
|
<LinkEditSlot
|
|
127
125
|
activeAttributes={ {} }
|
|
128
126
|
onChange={ () => {} }
|
|
@@ -133,10 +131,12 @@ describe( 'iOS', () => {
|
|
|
133
131
|
} }
|
|
134
132
|
/>
|
|
135
133
|
);
|
|
136
|
-
fireEvent.press( getByLabelText( 'Link' ) );
|
|
137
|
-
fireEvent.press(
|
|
134
|
+
fireEvent.press( screen.getByLabelText( 'Link' ) );
|
|
135
|
+
fireEvent.press(
|
|
136
|
+
screen.getByLabelText( 'Link to, Search or type URL' )
|
|
137
|
+
);
|
|
138
138
|
// Await back button to allow async state updates to complete
|
|
139
|
-
const backButton = await
|
|
139
|
+
const backButton = await screen.findByLabelText( 'Apply' );
|
|
140
140
|
Keyboard.dismiss.mockClear();
|
|
141
141
|
fireEvent.press( backButton );
|
|
142
142
|
|
|
@@ -9,7 +9,10 @@ import { render } from 'test/helpers';
|
|
|
9
9
|
|
|
10
10
|
describe( 'LinksUI', () => {
|
|
11
11
|
it( 'LinksUI renders', () => {
|
|
12
|
-
const
|
|
13
|
-
|
|
12
|
+
const value = { text: '' }; // empty `RichTextValue`
|
|
13
|
+
const screen = render(
|
|
14
|
+
<ModalLinkUI isVisible value={ value } activeAttributes={ {} } />
|
|
15
|
+
);
|
|
16
|
+
expect( screen.toJSON() ).toMatchSnapshot();
|
|
14
17
|
} );
|
|
15
18
|
} );
|