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

Image Block: Change upload icon label #57704

Merged
merged 1 commit into from Jan 10, 2024
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/block-library/src/image/image.js
Expand Up @@ -459,7 +459,7 @@ export default function Image( {
<ToolbarButton
onClick={ uploadExternal }
icon={ upload }
label={ __( 'Upload external image' ) }
label={ __( 'Upload image to media library' ) }
/>
</ToolbarGroup>
</BlockControls>
Expand Down
6 changes: 4 additions & 2 deletions test/e2e/specs/editor/blocks/image.spec.js
Expand Up @@ -696,15 +696,17 @@ test.describe( 'Image', () => {
await expect( linkDom ).toHaveAttribute( 'href', url );
} );

test( 'should upload external image', async ( { editor } ) => {
test( 'should upload external image to media library', async ( {
editor,
} ) => {
await editor.insertBlock( {
name: 'core/image',
attributes: {
url: 'https://cldup.com/cXyG__fTLN.jpg',
},
} );

await editor.clickBlockToolbarButton( 'Upload external image' );
await editor.clickBlockToolbarButton( 'Upload image to media library' );

const imageBlock = editor.canvas.locator(
'role=document[name="Block: Image"i]'
Expand Down