Media & Text block should not use background image (Closes #52789) #95361
Annotations
3 errors and 2 warnings
Running the tests:
test/integration/full-content/full-content.test.js#L220
Error: File 'core__media-text__deprecated-v5.serialized.html' does not match expected value (however, the block re-serializes identically so you may need to run 'npm run fixtures:regenerate'):
expect(received).toEqual(expected) // deep equality
- Expected - 1
+ Received + 1
<!-- wp:media-text {"align":"wide","mediaType":"image","imageFill":true,"focalPoint":{"x":"0.56","y":"0.57"}} -->
- <div class="wp-block-media-text alignwide is-stacked-on-mobile is-image-fill"><figure class="wp-block-media-text__media" style="background-image:url(data:image/jpeg;base64,/9j/2wBDAAMCAgICAgMCAgIDAwMDBAYEBAQEBAgGBgUGCQgKCgkICQkKDA8MCgsOCwkJDRENDg8QEBEQCgwSExIQEw8QEBD/yQALCAABAAEBAREA/8wABgAQEAX/2gAIAQEAAD8A0s8g/9k=);background-position:56% 57%"><img src="data:image/jpeg;base64,/9j/2wBDAAMCAgICAgMCAgIDAwMDBAYEBAQEBAgGBgUGCQgKCgkICQkKDA8MCgsOCwkJDRENDg8QEBEQCgwSExIQEw8QEBD/yQALCAABAAEBAREA/8wABgAQEAX/2gAIAQEAAD8A0s8g/9k=" alt="My alt text"/></figure><div class="wp-block-media-text__content"><!-- wp:paragraph {"placeholder":"Content…"} -->
+ <div class="wp-block-media-text alignwide is-stacked-on-mobile is-image-fill"><figure class="wp-block-media-text__media"><img src="data:image/jpeg;base64,/9j/2wBDAAMCAgICAgMCAgIDAwMDBAYEBAQEBAgGBgUGCQgKCgkICQkKDA8MCgsOCwkJDRENDg8QEBEQCgwSExIQEw8QEBD/yQALCAABAAEBAREA/8wABgAQEAX/2gAIAQEAAD8A0s8g/9k=" alt="My alt text" style="object-position:56% 57%"/></figure><div class="wp-block-media-text__content"><!-- wp:paragraph {"placeholder":"Content…"} -->
<p>My Content</p>
<!-- /wp:paragraph --></div></div>
<!-- /wp:media-text -->
↵
at Object.<anonymous> (/home/runner/work/gutenberg/gutenberg/test/integration/full-content/full-content.test.js:220:12)
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:
test/integration/full-content/full-content.test.js#L32
Error: expect(jest.fn()).not.toHaveInformed(expected)
Expected mock function not to be called but it was called with:
["Block successfully updated for `%s` (%o).·
New content generated by `save` function:·
%s·
Content retrieved from post body:·
%s", "core/media-text", {"__experimentalLabel": [Function anonymous], "apiVersion": 3, "attributes": {"align": {"default": "none", "type": "string"}, "allowedBlocks": {"type": "array"}, "anchor": {"attribute": "id", "selector": "*", "source": "attribute", "type": "string"}, "backgroundColor": {"type": "string"}, "className": {"type": "string"}, "focalPoint": {"type": "object"}, "fontFamily": {"type": "string"}, "fontSize": {"type": "string"}, "gradient": {"type": "string"}, "href": {"__experimentalRole": "content", "attribute": "href", "selector": "figure a", "source": "attribute", "type": "string"}, "imageFill": {"type": "boolean"}, "isStackedOnMobile": {"default": true, "type": "boolean"}, "linkClass": {"attribute": "class", "selector": "figure a", "source": "attribute", "type": "string"}, "linkDestination": {"type": "string"}, "linkTarget": {"attribute": "target", "selector": "figure a", "source": "attribute", "type": "string"}, "lock": {"type": "object"}, "mediaAlt": {"__experimentalRole": "content", "attribute": "alt", "default": "", "selector": "figure img", "source": "attribute", "type": "string"}, "mediaId": {"__experimentalRole": "content", "type": "number"}, "mediaLink": {"type": "string"}, "mediaPosition": {"default": "left", "type": "string"}, "mediaSizeSlug": {"type": "string"}, "mediaType": {"__experimentalRole": "content", "type": "string"}, "mediaUrl": {"__experimentalRole": "content", "attribute": "src", "selector": "figure video,figure img", "source": "attribute", "type": "string"}, "mediaWidth": {"default": 50, "type": "number"}, "metadata": {"type": "object"}, "rel": {"attribute": "rel", "selector": "figure a", "source": "attribute", "type": "string"}, "style": {"type": "object"}, "textColor": {"type": "string"}, "verticalAlignment": {"type": "string"}}, "blockHooks": {}, "category": "media", "deprecated": [{"attributes": {"align": [Object], "anchor": [Object], "backgroundColor": [Object], "className": [Object], "focalPoint": [Object], "fontFamily": [Object], "fontSize": [Object], "gradient": [Object], "href": [Object], "imageFill": [Object], "isStackedOnMobile": [Object], "linkClass": [Object], "linkDestination": [Object], "linkTarget": [Object], "lock": [Object], "mediaAlt": [Object], "mediaId": [Object], "mediaLink": [Object], "mediaPosition": [Object], "mediaSizeSlug": [Object], "mediaType": [Object], "mediaUrl": [Object], "mediaWidth": [Object], "metadata": [Object], "rel": [Object], "style": [Object], "textColor": [Object], "verticalAlignment": [Object]}, "isEligible": [Function isEligible], "migrate": [Function migrateDefaultAlign], "save": [Function save], "supports": {"align": [Array], "anchor": true, "color": [Object], "html": false, "spacing": [Object], "typography": [Object]}}, {"attributes": {"align": [Object], "anchor": [Object], "backgroundColor": [Object], "className": [Object], "focalPoint": [Object], "gradient": [Object], "href": [Object], "imageFill": [Object], "isStackedOnMobile": [Object], "linkClass": [Object], "linkDestination": [Object], "linkTarget": [Object], "lock": [Object], "mediaAlt": [Object], "mediaId": [Object], "mediaLink": [Object], "mediaPosition": [Object], "mediaSizeSlug": [Object], "mediaType": [Object], "mediaUrl": [Object], "mediaWidth": [Object], "metadata": [Object], "rel": [Object], "style": [Object], "textColor": [Object], "verticalAlignment": [Object]}, "migrate": [Function migrateDefaultAlign], "save": [Function save], "supports": {"align": [Array], "anchor": true, "color": [Object], "html": false}}, {"attributes": {"align": [Object], "anchor": [Object], "backgroundColor": [Object], "className": [Object], "focalPoint": [Object], "gradient": [Object], "href": [Object], "imageFill": [Object], "isStackedOnMobile": [Object], "linkClass": [Object], "linkDestination": [Object], "linkTarget": [Object], "lock": [Object],
|
Running the tests
Process completed with exit code 1.
|
|
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c, actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
The logs for this run have expired and are no longer available.
Loading