Skip to content

Commit 156ac69

Browse files
authored
Use "Save" instead of "Apply" in Link Control (#50964)
* Update word and related tests * Fix unit test for Media flow * Change submit text for Image block replace flow
1 parent 4112155 commit 156ac69

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

packages/block-editor/src/components/link-control/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ function LinkControl( {
410410
! valueHasChanges || currentInputIsEmpty
411411
}
412412
>
413-
{ __( 'Apply' ) }
413+
{ __( 'Save' ) }
414414
</Button>
415415
<Button variant="tertiary" onClick={ handleCancel }>
416416
{ __( 'Cancel' ) }

packages/block-editor/src/components/link-control/test/index.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -655,7 +655,7 @@ describe( 'Manual link entry', () => {
655655
} );
656656

657657
let submitButton = screen.getByRole( 'button', {
658-
name: 'Apply',
658+
name: 'Save',
659659
} );
660660

661661
expect( submitButton ).toBeDisabled();
@@ -673,7 +673,7 @@ describe( 'Manual link entry', () => {
673673
await user.keyboard( '[Enter]' );
674674

675675
submitButton = screen.getByRole( 'button', {
676-
name: 'Apply',
676+
name: 'Save',
677677
} );
678678

679679
// Verify the UI hasn't allowed submission.
@@ -696,7 +696,7 @@ describe( 'Manual link entry', () => {
696696
} );
697697

698698
let submitButton = screen.queryByRole( 'button', {
699-
name: 'Apply',
699+
name: 'Save',
700700
} );
701701

702702
expect( submitButton ).toBeDisabled();
@@ -715,7 +715,7 @@ describe( 'Manual link entry', () => {
715715
await user.click( submitButton );
716716

717717
submitButton = screen.queryByRole( 'button', {
718-
name: 'Apply',
718+
name: 'Save',
719719
} );
720720

721721
// Verify the UI hasn't allowed submission.
@@ -1809,7 +1809,7 @@ describe( 'Addition Settings UI', () => {
18091809

18101810
// check that the "Apply" button is disabled by default.
18111811
const submitButton = screen.queryByRole( 'button', {
1812-
name: 'Apply',
1812+
name: 'Save',
18131813
} );
18141814

18151815
expect( submitButton ).toBeDisabled();
@@ -2242,7 +2242,7 @@ describe( 'Controlling link title text', () => {
22422242
expect( textInput ).toHaveValue( textValue );
22432243

22442244
const submitButton = screen.queryByRole( 'button', {
2245-
name: 'Apply',
2245+
name: 'Save',
22462246
} );
22472247

22482248
await user.click( submitButton );

packages/block-editor/src/components/media-replace-flow/test/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ describe( 'General media replace flow', () => {
137137

138138
await user.click(
139139
screen.getByRole( 'button', {
140-
name: 'Apply',
140+
name: 'Save',
141141
} )
142142
);
143143

test/e2e/specs/editor/blocks/image.spec.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ test.describe( 'Image', () => {
339339

340340
// Wait for the cropping tools to disappear.
341341
await expect(
342-
page.locator( 'role=button[name="Apply"i]' )
342+
page.locator( 'role=button[name="Save"i]' )
343343
).toBeHidden();
344344

345345
// Assert that the image is edited.
@@ -396,7 +396,7 @@ test.describe( 'Image', () => {
396396

397397
// Wait for the cropping tools to disappear.
398398
await expect(
399-
page.locator( 'role=button[name="Apply"i]' )
399+
page.locator( 'role=button[name="Save"i]' )
400400
).toBeHidden();
401401

402402
// Assert that the image is edited.
@@ -441,7 +441,7 @@ test.describe( 'Image', () => {
441441

442442
// Wait for the cropping tools to disappear.
443443
await expect(
444-
page.locator( 'role=button[name="Apply"i]' )
444+
page.locator( 'role=button[name="Save"i]' )
445445
).toBeHidden();
446446

447447
// Assert that the image is edited.
@@ -498,7 +498,7 @@ test.describe( 'Image', () => {
498498
await page.click( 'role=button[name="Edit"i]' );
499499
// Replace the url.
500500
await page.fill( 'role=combobox[name="URL"i]', imageUrl );
501-
await page.click( 'role=button[name="Apply"i]' );
501+
await page.click( 'role=button[name="Save"i]' );
502502

503503
const regex = new RegExp(
504504
`<!-- wp:image {"sizeSlug":"large","linkDestination":"none"} -->

0 commit comments

Comments
 (0)