@@ -365,7 +365,7 @@ describe( 'Basic rendering', () => {
365365 />
366366 ) ;
367367
368- const linkPreview = screen . getByLabelText ( 'Currently selected ' ) ;
368+ const linkPreview = screen . getByLabelText ( 'Manage link ' ) ;
369369
370370 const isPreviewError = linkPreview . classList . contains ( 'is-error' ) ;
371371 expect ( isPreviewError ) . toBe ( true ) ;
@@ -816,7 +816,7 @@ describe( 'Manual link entry', () => {
816816
817817 render ( < LinkControlConsumer /> ) ;
818818
819- let linkPreview = screen . getByLabelText ( 'Currently selected ' ) ;
819+ let linkPreview = screen . getByLabelText ( 'Manage link ' ) ;
820820
821821 expect ( linkPreview ) . toBeInTheDocument ( ) ;
822822
@@ -850,7 +850,7 @@ describe( 'Manual link entry', () => {
850850 // Cancel the editing process.
851851 await user . click ( cancelButton ) ;
852852
853- linkPreview = screen . getByLabelText ( 'Currently selected ' ) ;
853+ linkPreview = screen . getByLabelText ( 'Manage link ' ) ;
854854
855855 expect ( linkPreview ) . toBeInTheDocument ( ) ;
856856
@@ -1058,7 +1058,7 @@ describe( 'Default search suggestions', () => {
10581058
10591059 // Click the "Edit/Change" button and check initial suggestions are not
10601060 // shown.
1061- const currentLinkUI = screen . getByLabelText ( 'Currently selected ' ) ;
1061+ const currentLinkUI = screen . getByLabelText ( 'Manage link ' ) ;
10621062 const currentLinkBtn = within ( currentLinkUI ) . getByRole ( 'button' , {
10631063 name : 'Edit link' ,
10641064 } ) ;
@@ -1206,8 +1206,7 @@ describe( 'Creating Entities (eg: Posts, Pages)', () => {
12061206
12071207 // Check for loading indicator.
12081208 const loadingIndicator = screen . getByText ( 'Creating…' ) ;
1209- const currentLinkLabel =
1210- screen . queryByLabelText ( 'Currently selected' ) ;
1209+ const currentLinkLabel = screen . queryByLabelText ( 'Manage link' ) ;
12111210
12121211 expect ( currentLinkLabel ) . not . toBeInTheDocument ( ) ;
12131212 expect ( loadingIndicator ) . toBeVisible ( ) ;
@@ -1218,8 +1217,7 @@ describe( 'Creating Entities (eg: Posts, Pages)', () => {
12181217 // Resolve the `createSuggestion` promise.
12191218 resolver ( ) ;
12201219
1221- const currentLink =
1222- await screen . findByLabelText ( 'Currently selected' ) ;
1220+ const currentLink = await screen . findByLabelText ( 'Manage link' ) ;
12231221
12241222 expect ( currentLink ) . toHaveTextContent ( entityNameText ) ;
12251223 expect ( currentLink ) . toHaveTextContent ( '/?p=123' ) ;
@@ -1265,7 +1263,7 @@ describe( 'Creating Entities (eg: Posts, Pages)', () => {
12651263
12661264 await user . click ( createButton ) ;
12671265
1268- const currentLink = screen . getByLabelText ( 'Currently selected ' ) ;
1266+ const currentLink = screen . getByLabelText ( 'Manage link ' ) ;
12691267
12701268 expect ( currentLink ) . toHaveTextContent ( 'Some new page to create' ) ;
12711269 expect ( currentLink ) . toHaveTextContent ( '/?p=123' ) ;
@@ -1322,7 +1320,7 @@ describe( 'Creating Entities (eg: Posts, Pages)', () => {
13221320 triggerEnter ( searchInput ) ;
13231321
13241322 expect (
1325- await screen . findByLabelText ( 'Currently selected ' )
1323+ await screen . findByLabelText ( 'Manage link ' )
13261324 ) . toHaveTextContent ( entityNameText ) ;
13271325 } ) ;
13281326
@@ -1495,7 +1493,7 @@ describe( 'Selecting links', () => {
14951493
14961494 render ( < LinkControlConsumer /> ) ;
14971495
1498- const currentLink = screen . getByLabelText ( 'Currently selected ' ) ;
1496+ const currentLink = screen . getByLabelText ( 'Manage link ' ) ;
14991497 const currentLinkAnchor = screen . getByRole ( 'link' , {
15001498 name : `${ selectedLink . title } (opens in a new tab)` ,
15011499 } ) ;
@@ -1525,7 +1523,7 @@ describe( 'Selecting links', () => {
15251523 render ( < LinkControlConsumer /> ) ;
15261524
15271525 // Required in order to select the button below.
1528- let currentLinkUI = screen . getByLabelText ( 'Currently selected ' ) ;
1526+ let currentLinkUI = screen . getByLabelText ( 'Manage link ' ) ;
15291527 const currentLinkBtn = within ( currentLinkUI ) . getByRole ( 'button' , {
15301528 name : 'Edit link' ,
15311529 } ) ;
@@ -1534,7 +1532,7 @@ describe( 'Selecting links', () => {
15341532 await user . click ( currentLinkBtn ) ;
15351533
15361534 const searchInput = screen . getByRole ( 'combobox' , { name : 'Link' } ) ;
1537- currentLinkUI = screen . queryByLabelText ( 'Currently selected ' ) ;
1535+ currentLinkUI = screen . queryByLabelText ( 'Manage link ' ) ;
15381536
15391537 // We should be back to showing the search input.
15401538 expect ( searchInput ) . toBeVisible ( ) ;
@@ -1697,8 +1695,7 @@ describe( 'Selecting links', () => {
16971695 triggerEnter ( searchInput ) ;
16981696
16991697 // Check that the suggestion selected via is now shown as selected.
1700- const currentLink =
1701- screen . getByLabelText ( 'Currently selected' ) ;
1698+ const currentLink = screen . getByLabelText ( 'Manage link' ) ;
17021699 const currentLinkAnchor = screen . getByRole ( 'link' , {
17031700 name : `${ selectedLink . title } (opens in a new tab)` ,
17041701 } ) ;
@@ -2089,7 +2086,7 @@ describe( 'Rich link previews', () => {
20892086
20902087 render ( < LinkControl value = { selectedLink } /> ) ;
20912088
2092- const linkPreview = screen . getByLabelText ( 'Currently selected ' ) ;
2089+ const linkPreview = screen . getByLabelText ( 'Manage link ' ) ;
20932090
20942091 const isRichLinkPreview = linkPreview . classList . contains ( 'is-rich' ) ;
20952092
@@ -2110,7 +2107,7 @@ describe( 'Rich link previews', () => {
21102107
21112108 render ( < LinkControl value = { selectedLink } hasRichPreviews /> ) ;
21122109
2113- const linkPreview = screen . getByLabelText ( 'Currently selected ' ) ;
2110+ const linkPreview = screen . getByLabelText ( 'Manage link ' ) ;
21142111
21152112 await waitFor ( ( ) => expect ( linkPreview ) . toHaveClass ( 'is-rich' ) ) ;
21162113 } ) ;
@@ -2127,7 +2124,7 @@ describe( 'Rich link previews', () => {
21272124
21282125 render ( < LinkControl value = { selectedLink } hasRichPreviews /> ) ;
21292126
2130- const linkPreview = screen . getByLabelText ( 'Currently selected ' ) ;
2127+ const linkPreview = screen . getByLabelText ( 'Manage link ' ) ;
21312128
21322129 await waitFor ( ( ) => expect ( linkPreview ) . toHaveClass ( 'is-rich' ) ) ;
21332130
@@ -2159,7 +2156,7 @@ describe( 'Rich link previews', () => {
21592156
21602157 render ( < LinkControl value = { selectedLink } hasRichPreviews /> ) ;
21612158
2162- const linkPreview = screen . getByLabelText ( 'Currently selected ' ) ;
2159+ const linkPreview = screen . getByLabelText ( 'Manage link ' ) ;
21632160
21642161 await waitFor ( ( ) => expect ( linkPreview ) . toHaveClass ( 'is-rich' ) ) ;
21652162
@@ -2183,7 +2180,7 @@ describe( 'Rich link previews', () => {
21832180
21842181 render ( < LinkControl value = { selectedLink } hasRichPreviews /> ) ;
21852182
2186- const linkPreview = screen . getByLabelText ( 'Currently selected ' ) ;
2183+ const linkPreview = screen . getByLabelText ( 'Manage link ' ) ;
21872184
21882185 await waitFor ( ( ) => expect ( linkPreview ) . toHaveClass ( 'is-rich' ) ) ;
21892186
@@ -2218,7 +2215,7 @@ describe( 'Rich link previews', () => {
22182215
22192216 render ( < LinkControl value = { selectedLink } hasRichPreviews /> ) ;
22202217
2221- const linkPreview = screen . getByLabelText ( 'Currently selected ' ) ;
2218+ const linkPreview = screen . getByLabelText ( 'Manage link ' ) ;
22222219
22232220 await waitFor ( ( ) =>
22242221 expect ( linkPreview ) . toHaveClass ( 'is-rich' )
@@ -2243,7 +2240,7 @@ describe( 'Rich link previews', () => {
22432240
22442241 render ( < LinkControl value = { selectedLink } hasRichPreviews /> ) ;
22452242
2246- const linkPreview = screen . getByLabelText ( 'Currently selected ' ) ;
2243+ const linkPreview = screen . getByLabelText ( 'Manage link ' ) ;
22472244
22482245 expect ( linkPreview ) . toHaveClass ( 'is-fetching' ) ;
22492246
@@ -2262,7 +2259,7 @@ describe( 'Rich link previews', () => {
22622259
22632260 render ( < LinkControl value = { selectedLink } hasRichPreviews /> ) ;
22642261
2265- const linkPreview = screen . getByLabelText ( 'Currently selected ' ) ;
2262+ const linkPreview = screen . getByLabelText ( 'Manage link ' ) ;
22662263
22672264 expect ( linkPreview ) . toHaveClass ( 'is-fetching' ) ;
22682265 expect ( linkPreview ) . not . toHaveClass ( 'is-rich' ) ;
@@ -2275,7 +2272,7 @@ describe( 'Rich link previews', () => {
22752272
22762273 render ( < LinkControl value = { selectedLink } hasRichPreviews /> ) ;
22772274
2278- const linkPreview = screen . getByLabelText ( 'Currently selected ' ) ;
2275+ const linkPreview = screen . getByLabelText ( 'Manage link ' ) ;
22792276
22802277 expect ( linkPreview ) . toHaveClass ( 'is-fetching' ) ;
22812278
0 commit comments