Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use "Save" instead of "Apply" in Link Control #50964

Merged
merged 3 commits into from
May 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ function LinkControl( {
! valueHasChanges || currentInputIsEmpty
}
>
{ __( 'Apply' ) }
{ __( 'Save' ) }
</Button>
<Button variant="tertiary" onClick={ handleCancel }>
{ __( 'Cancel' ) }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,7 @@ describe( 'Manual link entry', () => {
} );

let submitButton = screen.getByRole( 'button', {
name: 'Apply',
name: 'Save',
} );

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

submitButton = screen.getByRole( 'button', {
name: 'Apply',
name: 'Save',
} );

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

let submitButton = screen.queryByRole( 'button', {
name: 'Apply',
name: 'Save',
} );

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

submitButton = screen.queryByRole( 'button', {
name: 'Apply',
name: 'Save',
} );

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

// check that the "Apply" button is disabled by default.
const submitButton = screen.queryByRole( 'button', {
name: 'Apply',
name: 'Save',
} );

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

const submitButton = screen.queryByRole( 'button', {
name: 'Apply',
name: 'Save',
} );

await user.click( submitButton );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ describe( 'General media replace flow', () => {

await user.click(
screen.getByRole( 'button', {
name: 'Apply',
name: 'Save',
} )
);

Expand Down
8 changes: 4 additions & 4 deletions test/e2e/specs/editor/blocks/image.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ test.describe( 'Image', () => {

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

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

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

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

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

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

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