feature: added aspect ration & scale option to video block #119267
Annotations
4 errors and 1 warning
Running the tests:
test/integration/full-content/full-content.test.js#L32
Error: expect(jest.fn()).not.toHaveErrored(expected)
Expected mock function not to be called but it was called with:
["Block validation failed for `core/video` ({
name: 'core/video',
icon: {
src: {
'$$typeof': Symbol(react.element),
type: {
'$$typeof': Symbol(react.forward_ref),
render: [Function (anonymous)] {
[length]: 2,
[name]: '',
displayName: 'SVG'
},
[displayName]: [Getter/Setter]
},
key: null,
ref: null,
props: {
viewBox: '0 0 24 24',
xmlns: 'http://www.w3.org/2000/svg',
children: {
'$$typeof': Symbol(react.element),
type: [Function],
key: null,
ref: null,
props: [Object],
_owner: null,
_store: [Object],
[_self]: undefined,
[_source]: undefined
}
},
_owner: null,
_store: { [validated]: false },
[_self]: undefined,
[_source]: undefined
}
},
keywords: [ 'movie', [length]: 1 ],
attributes: {
autoplay: {
type: 'boolean',
source: 'attribute',
selector: 'video',
attribute: 'autoplay'
},
caption: {
type: 'rich-text',
source: 'rich-text',
selector: 'figcaption',
role: 'content'
},
controls: {
type: 'boolean',
source: 'attribute',
selector: 'video',
attribute: 'controls',
default: true
},
id: { type: 'number', role: 'content' },
loop: {
type: 'boolean',
source: 'attribute',
selector: 'video',
attribute: 'loop'
},
muted: {
type: 'boolean',
source: 'attribute',
selector: 'video',
attribute: 'muted'
},
poster: {
type: 'string',
source: 'attribute',
selector: 'video',
attribute: 'poster'
},
preload: {
type: 'string',
source: 'attribute',
selector: 'video',
attribute: 'preload',
default: 'metadata'
},
blob: { type: 'string', role: 'local' },
src: {
type: 'string',
source: 'attribute',
selector: 'video',
attribute: 'src',
role: 'content'
},
playsInline: {
type: 'boolean',
source: 'attribute',
selector: 'video',
attribute: 'playsinline'
},
tracks: {
role: 'content',
type: 'array',
items: { type: 'object' },
default: [ [length]: 0 ]
},
aspectRatio: { type: 'string' },
scale: { type: 'string', default: 'cover' },
align: {
type: 'string',
enum: [ 'left', 'center', 'right', 'wide', 'full', '', [length]: 6 ]
},
lock: { type: 'object' },
anchor: {
type: 'string',
source: 'attribute',
attribute: 'id',
selector: '*'
},
className: { type: 'string' },
style: { type: 'object' },
metadata: { type: 'object' }
},
providesContext: {},
usesContext: [ [length]: 0 ],
selectors: {},
supports: {
anchor: true,
align: true,
spacing: {
margin: true,
padding: true,
__experimentalDefaultControls: { margin: false, padding: false }
},
interactivity: { clientNavigation: true }
},
styles: [ [length]: 0 ],
blockHooks: {},
save: <ref *1> [Function: save] {
[length]: 1,
[name]: 'save',
[prototype]: { [constructor]: [Circular *1] }
},
schema: 'https://schemas.wp.org/trunk/block.json',
apiVersion: 3,
title: 'Video',
category: 'media',
description: 'Embed a video from your media library or upload a new one.',
textdomain: 'default',
editorStyle: 'wp-block-video-editor',
style: 'wp-block-video',
example: {
attributes: {
src: 'https://upload.wikimedia.org/wikipedia/commons/c/ca/Wood_thrush_in_Central_Park_switch_sides_%2816510%29.webm',
caption: 'Wood thrush singing in Central Park, NYC.'
}
},
transforms: {
from: [
{
type: 'files',
isMatch: [Function: isMatch] { [length]: 1, [name]: 'isMatch' },
transform: [Function: transform] { [length]: 1, [n
|
Running the tests:
test/integration/full-content/full-content.test.js#L32
Error: expect(jest.fn()).not.toHaveWarned(expected)
Expected mock function not to be called but it was called with:
["Expected attributes [
[ 'controls', '', false, [length]: 3 ],
[
'src',
'data:video/mp4;base64,AAAAHGZ0eXBpc29tAAACAGlzb21pc28ybXA0MQAAAAhmcmVlAAAC721kYXQhEAUgpBv/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AC8AAAAAAAEAAAAAAWRtZGlhAAAAIG1kaGQAAAAAAAAAAAAAAAAAAKxEAAAIAFXEAAAAAAAtaGRscgAAAAAAAAAAc291bgAAAAAAAAAAAAAAAFNvdW5kSGFuZGxlcgAAAAEPbWluZgAAABBzbWhkAAAAAAAAAAAAAAAkZGluZgAAABxkcmVmAAAAAAAAAAEAAAAMdXJsIAAAAAEAAADTc3RibAAAAGdzdHNkAAAAAAAAAAEAAABXbXA0YQAAAAAAAAABAAAAAAAAAAAAAgAQAAAAAKxEAAAAAAAzZXNkcwAAAAADgICAIgACAASAgIAUQBUAAAAAAfQAAAHz+QWAgIACEhAGgICAAQIAAAAYc3R0cwAAAAAAAAABAAAAAgAABAAAAAAcc3RzYwAAAAAAAAABAAAAAQAAAAIAAAABAAAAHHN0c3oAAAAAAAAAAAAAAAIAAAFzAAABdAAAABRzdGNvAAAAAAAAAAEAAAAsAAAAYnVkdGEAAABabWV0YQAAAAAAAAAhaGRscgAAAAAAAAAAbWRpcmFwcGwAAAAAAAAAAAAAAAAtaWxzdAAAACWpdG9vAAAAHWRhdGEAAAABAAAAAExhdmY1Ni40MC4xMDE=',
true,
[length]: 3
],
[
'style',
'height:100%;width:100%;object-fit:cover',
true,
[length]: 3
],
[length]: 3
], instead saw [
[ 'controls', '', false, [length]: 3 ],
[
'src',
'data:video/mp4;base64,AAAAHGZ0eXBpc29tAAACAGlzb21pc28ybXA0MQAAAAhmcmVlAAAC721kYXQhEAUgpBv/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAC8AAAAAAAEAAAAAAWRtZGlhAAAAIG1kaGQAAAAAAAAAAAAAAAAAAKxEAAAIAFXEAAAAAAAtaGRscgAAAAAAAAAAc291bgAAAAAAAAAAAAAAAFNvdW5kSGFuZGxlcgAAAAEPbWluZgAAABBzbWhkAAAAAAAAAAAAAAAkZGluZgAAABxkcmVmAAAAAAAAAAEAAAAMdXJsIAAAAAEAAADTc3RibAAAAGdzdHNkAAAAAAAAAAEAAABXbXA0YQAAAAAAAAABAAA
|
Running the tests:
test/integration/full-content/full-content.test.js#L184
Error: File 'core__video__deprecated-1.json' does not match expected value:
expect(received).toEqual(expected) // deep equality
- Expected - 0
+ Received + 1
@@ -6,10 +6,11 @@
"controls": true,
"loop": false,
"muted": false,
"playsInline": false,
"preload": "metadata",
+ "scale": "cover",
"src": "data:video/mp4;base64,AAAAHGZ0eXBpc29tAAACAGlzb21pc28ybXA0MQAAAAhmcmVlAAAC721kYXQhEAUgpBv/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcCEQBSCkG//AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAKxEAAAAAAAzZXNkcwAAAAADgICAIgACAASAgIAUQBUAAAAAAfQAAAHz+QWAgIACEhAGgICAAQIAAAAYc3R0cwAAAAAAAAABAAAAAgAABAAAAAAcc3RzYwAAAAAAAAABAAAAAQAAAAIAAAABAAAAHHN0c3oAAAAAAAAAAAAAAAIAAAFzAAABdAAAABRzdGNvAAAAAAAAAAEAAAAsAAAAYnVkdGEAAABabWV0YQAAAAAAAAAhaGRscgAAAAAAAAAAbWRpcmFwcGwAAAAAAAAAAAAAAAAtaWxzdAAAACWpdG9vAAAAHWRhdGEAAAABAAAAAExhdmY1Ni40MC4xMDE=",
"tracks": Array [],
},
"innerBlocks": Array [],
"isValid": true,
at Object.<anonymous> (/home/runner/work/gutenberg/gutenberg/test/integration/full-content/full-content.test.js:184:11)
at Promise.then.completed (/home/runner/work/gutenberg/gutenberg/node_modules/jest-circus/build/utils.js:300:28)
at new Promise (<anonymous>)
at callAsyncCircusFn (/home/runner/work/gutenberg/gutenberg/node_modules/jest-circus/build/utils.js:233:10)
at _callCircusTest (/home/runner/work/gutenberg/gutenberg/node_modules/jest-circus/build/run.js:315:40)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at _runTest (/home/runner/work/gutenberg/gutenberg/node_modules/jest-circus/build/run.js:251:3)
at _runTestsForDescribeBlock (/home/runner/work/gutenberg/gutenberg/node_modules/jest-circus/build/run.js:125:9)
at _runTestsForDescribeBlock (/home/runner/work/gutenberg/gutenberg/node_modules/jest-circus/build/run.js:120:9)
at run (/home/runner/work/gutenberg/gutenberg/node_modules/jest-circus/build/run.js:70:3)
at runAndTransformResultsToJestFormat (/home/runner/work/gutenberg/gutenberg/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)
at jestAdapter (/home/runner/work/gutenberg/gutenberg/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)
at runTestInternal (/home/runner/work/gutenberg/gutenberg/node_modules/jest-runner/build/runTest.js:367:16)
at runTest (/home/runner/work/gutenberg/gutenberg/node_modules/jest-runner/build/runTest.js:444:34)
at Object.worker (/home/runner/work/gutenberg/gutenberg/node_modules/jest-runner/build/testWorker.js:106:12)
|
Running the tests
Process completed with exit code 1.
|
Setup Node.js and install dependencies
Both node-version and node-version-file inputs are specified, only node-version will be used
|
Loading