diff --git a/packages/block-library/src/embed/edit.js b/packages/block-library/src/embed/edit.js
index da3dac3e3d62b..c0a10a20e31fc 100644
--- a/packages/block-library/src/embed/edit.js
+++ b/packages/block-library/src/embed/edit.js
@@ -30,6 +30,7 @@ import { useBlockProps } from '@wordpress/block-editor';
import { store as coreStore } from '@wordpress/core-data';
import { View } from '@wordpress/primitives';
import { getAuthority } from '@wordpress/url';
+import { Caption } from '../utils/caption';
const EmbedEdit = ( props ) => {
const {
@@ -261,7 +262,15 @@ const EmbedEdit = ( props ) => {
toggleResponsive={ toggleResponsive }
switchBackToURLInput={ () => setIsEditingURL( true ) }
/>
-
+
+
+
>
);
};
diff --git a/packages/block-library/src/embed/embed-preview.js b/packages/block-library/src/embed/embed-preview.js
index 1a230faf0c3d5..c0c7d5942d1d7 100644
--- a/packages/block-library/src/embed/embed-preview.js
+++ b/packages/block-library/src/embed/embed-preview.js
@@ -21,7 +21,6 @@ import { getAuthority } from '@wordpress/url';
* Internal dependencies
*/
import WpEmbedPreview from './wp-embed-preview';
-import { Caption } from '../utils/caption';
export default function EmbedPreview( {
preview,
@@ -32,9 +31,6 @@ export default function EmbedPreview( {
className,
icon,
label,
- insertBlocksAfter,
- attributes,
- setAttributes,
} ) {
const [ interactive, setInteractive ] = useState( false );
@@ -96,11 +92,7 @@ export default function EmbedPreview( {
/* eslint-enable jsx-a11y/no-static-element-interactions */
return (
-
+ >
);
}
diff --git a/test/e2e/specs/editor/various/embedding.spec.js b/test/e2e/specs/editor/various/embedding.spec.js
index fb9746dce52e3..fe488f9130174 100644
--- a/test/e2e/specs/editor/various/embedding.spec.js
+++ b/test/e2e/specs/editor/various/embedding.spec.js
@@ -134,15 +134,15 @@ test.describe( 'Embedding content', () => {
'https://developer.wordpress.org/block-editor/reference-guides/block-api/block-attributes/'
);
await expect(
- currenEmbedBlock.locator( 'figure' ),
+ currenEmbedBlock,
'WordPress valid content. Should render valid figure element.'
- ).toHaveClass( 'wp-block-embed' );
+ ).toHaveClass( /wp-block-embed/ );
await embedUtils.insertEmbed(
'https://www.youtube.com/watch?v=lXMskKTw3Bc'
);
await expect(
- currenEmbedBlock.locator( 'figure' ),
+ currenEmbedBlock,
'Video content. Should render valid figure element, and include the aspect ratio class.'
).toHaveClass( /wp-embed-aspect-16-9/ );