Feature: Added InnerBlock Support for Download Button & Add Support for download attribute #123593
Annotations
10 errors and 2 warnings
Running the tests:
test/integration/full-content/full-content.test.js#L184
Error: File 'core__buttons.json' does not match expected value:
expect(received).toEqual(expected) // deep equality
- Expected - 0
+ Received + 4
@@ -8,40 +8,44 @@
},
},
"innerBlocks": Array [
Object {
"attributes": Object {
+ "download": false,
"tagName": "a",
"text": "My button 1",
"type": "button",
},
"innerBlocks": Array [],
"isValid": true,
"name": "core/button",
},
Object {
"attributes": Object {
+ "download": false,
"tagName": "a",
"text": "My button 2",
"type": "button",
},
"innerBlocks": Array [],
"isValid": true,
"name": "core/button",
},
Object {
"attributes": Object {
+ "download": false,
"tagName": "a",
"text": "My button 3",
"type": "button",
},
"innerBlocks": Array [],
"isValid": true,
"name": "core/button",
},
Object {
"attributes": Object {
+ "download": false,
"tagName": "button",
"text": "My button 4",
"type": "button",
},
"innerBlocks": Array [],
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:
test/integration/full-content/full-content.test.js#L220
Error: File 'core__file__new-window.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:file {"href":"http://localhost:8888/wp-content/uploads/2018/05/keycodes.js"} -->
- <div class="wp-block-file"><a id="wp-block-file--media-_clientId_0" href="http://localhost:8888/wp-content/uploads/2018/05/keycodes.js" target="_blank" rel="noreferrer noopener">6546</a><a href="http://localhost:8888/wp-content/uploads/2018/05/keycodes.js" class="wp-block-file__button wp-element-button" download aria-describedby="wp-block-file--media-_clientId_0">Download</a></div>
+ <div class="wp-block-file"><a id="wp-block-file--media-_clientId_0" href="http://localhost:8888/wp-content/uploads/2018/05/keycodes.js" target="_blank" rel="noreferrer noopener">6546</a><div class="wp-block-file__button-wrapper"></div></div>
<!-- /wp:file -->
↵
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/file", {"__experimentalLabel": [Function anonymous], "apiVersion": 3, "attributes": {"align": {"enum": ["left", "center", "right", "wide", "full", ""], "type": "string"}, "anchor": {"attribute": "id", "selector": "*", "source": "attribute", "type": "string"}, "backgroundColor": {"type": "string"}, "blob": {"role": "local", "type": "string"}, "borderColor": {"type": "string"}, "className": {"type": "string"}, "displayPreview": {"type": "boolean"}, "fileId": {"attribute": "id", "selector": "a:not([download])", "source": "attribute", "type": "string"}, "fileName": {"role": "content", "selector": "a:not([download])", "source": "rich-text", "type": "rich-text"}, "gradient": {"type": "string"}, "href": {"role": "content", "type": "string"}, "id": {"type": "number"}, "lock": {"type": "object"}, "metadata": {"type": "object"}, "previewHeight": {"default": 600, "type": "number"}, "showDownloadButton": {"default": true, "type": "boolean"}, "style": {"type": "object"}, "textColor": {"type": "string"}, "textLinkHref": {"attribute": "href", "role": "content", "selector": "a:not([download])", "source": "attribute", "type": "string"}, "textLinkTarget": {"attribute": "target", "selector": "a:not([download])", "source": "attribute", "type": "string"}}, "blockHooks": {}, "category": "media", "deprecated": [{"attributes": {"align": {"enum": ["left", "center", "right", "wide", "full", ""], "type": "string"}, "anchor": {"attribute": "id", "selector": "*", "source": "attribute", "type": "string"}, "className": {"type": "string"}, "displayPreview": {"type": "boolean"}, "downloadButtonText": {"selector": "a[download]", "source": "html", "type": "string"}, "fileId": {"attribute": "id", "selector": "a:not([download])", "source": "attribute", "type": "string"}, "fileName": {"selector": "a:not([download])", "source": "html", "type": "string"}, "href": {"type": "string"}, "id": {"type": "number"}, "lock": {"type": "object"}, "metadata": {"type": "object"}, "previewHeight": {"default": 600, "type": "number"}, "showDownloadButton": {"default": true, "type": "boolean"}, "textLinkHref": {"attribute": "href", "selector": "a:not([download])", "source": "attribute", "type": "string"}, "textLinkTarget": {"attribute": "target", "selector": "a:not([download])", "source": "attribute", "type": "string"}}, "save": [Function save], "supports": {"align": true, "anchor": true}}, {"attributes": {"align": {"enum": ["left", "center", "right", "wide", "full", ""], "type": "string"}, "anchor": {"attribute": "id", "selector": "*", "source": "attribute", "type": "string"}, "className": {"type": "string"}, "displayPreview": {"type": "boolean"}, "downloadButtonText": {"selector": "a[download]", "source": "html", "type": "string"}, "fileId": {"attribute": "id", "selector": "a:not([download])", "source": "attribute", "type": "string"}, "fileName": {"selector": "a:not([download])", "source": "html", "type": "string"}, "href": {"type": "string"}, "id": {"type": "number"}, "lock": {"type": "object"}, "metadata": {"type": "object"}, "previewHeight": {"default": 600, "type": "number"}, "showDownloadButton": {"default": true, "type": "boolean"}, "textLinkHref": {"attribute": "href", "selector": "a:not([download])", "source": "attribute", "type": "string"}, "textLinkTarget": {"attribute": "target", "selector": "a:not([download])", "source": "attribute", "type": "string"}}, "save": [Function save], "supports": {"align": true, "anchor": true}}, {"attributes": {"align": {"enum": ["left", "center", "right", "wide", "full", ""], "type": "string"}, "anchor": {"attribute": "id", "selector": "*", "source": "attribute", "type": "string"}, "className": {"type": "string"}, "displayPreview": {"type": "boolean"}, "downloadButtonText": {"selector": "a[download]", "source": "html", "type": "string"}, "fileName": {"selector": "a:not([download])",
|
Running the tests:
test/integration/full-content/full-content.test.js#L220
Error: File 'core__file__new-window__deprecated-1.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:file {"href":"http://localhost:8888/wp-content/uploads/2018/05/keycodes.js"} -->
- <div class="wp-block-file"><a href="http://localhost:8888/wp-content/uploads/2018/05/keycodes.js" target="_blank" rel="noreferrer noopener">6546</a><a href="http://localhost:8888/wp-content/uploads/2018/05/keycodes.js" class="wp-block-file__button wp-element-button" download>Download</a></div>
+ <div class="wp-block-file"><a href="http://localhost:8888/wp-content/uploads/2018/05/keycodes.js" target="_blank" rel="noreferrer noopener">6546</a><div class="wp-block-file__button-wrapper"></div></div>
<!-- /wp:file -->
↵
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/file", {"__experimentalLabel": [Function anonymous], "apiVersion": 3, "attributes": {"align": {"enum": ["left", "center", "right", "wide", "full", ""], "type": "string"}, "anchor": {"attribute": "id", "selector": "*", "source": "attribute", "type": "string"}, "backgroundColor": {"type": "string"}, "blob": {"role": "local", "type": "string"}, "borderColor": {"type": "string"}, "className": {"type": "string"}, "displayPreview": {"type": "boolean"}, "fileId": {"attribute": "id", "selector": "a:not([download])", "source": "attribute", "type": "string"}, "fileName": {"role": "content", "selector": "a:not([download])", "source": "rich-text", "type": "rich-text"}, "gradient": {"type": "string"}, "href": {"role": "content", "type": "string"}, "id": {"type": "number"}, "lock": {"type": "object"}, "metadata": {"type": "object"}, "previewHeight": {"default": 600, "type": "number"}, "showDownloadButton": {"default": true, "type": "boolean"}, "style": {"type": "object"}, "textColor": {"type": "string"}, "textLinkHref": {"attribute": "href", "role": "content", "selector": "a:not([download])", "source": "attribute", "type": "string"}, "textLinkTarget": {"attribute": "target", "selector": "a:not([download])", "source": "attribute", "type": "string"}}, "blockHooks": {}, "category": "media", "deprecated": [{"attributes": {"align": {"enum": ["left", "center", "right", "wide", "full", ""], "type": "string"}, "anchor": {"attribute": "id", "selector": "*", "source": "attribute", "type": "string"}, "className": {"type": "string"}, "displayPreview": {"type": "boolean"}, "downloadButtonText": {"selector": "a[download]", "source": "html", "type": "string"}, "fileId": {"attribute": "id", "selector": "a:not([download])", "source": "attribute", "type": "string"}, "fileName": {"selector": "a:not([download])", "source": "html", "type": "string"}, "href": {"type": "string"}, "id": {"type": "number"}, "lock": {"type": "object"}, "metadata": {"type": "object"}, "previewHeight": {"default": 600, "type": "number"}, "showDownloadButton": {"default": true, "type": "boolean"}, "textLinkHref": {"attribute": "href", "selector": "a:not([download])", "source": "attribute", "type": "string"}, "textLinkTarget": {"attribute": "target", "selector": "a:not([download])", "source": "attribute", "type": "string"}}, "save": [Function save], "supports": {"align": true, "anchor": true}}, {"attributes": {"align": {"enum": ["left", "center", "right", "wide", "full", ""], "type": "string"}, "anchor": {"attribute": "id", "selector": "*", "source": "attribute", "type": "string"}, "className": {"type": "string"}, "displayPreview": {"type": "boolean"}, "downloadButtonText": {"selector": "a[download]", "source": "html", "type": "string"}, "fileId": {"attribute": "id", "selector": "a:not([download])", "source": "attribute", "type": "string"}, "fileName": {"selector": "a:not([download])", "source": "html", "type": "string"}, "href": {"type": "string"}, "id": {"type": "number"}, "lock": {"type": "object"}, "metadata": {"type": "object"}, "previewHeight": {"default": 600, "type": "number"}, "showDownloadButton": {"default": true, "type": "boolean"}, "textLinkHref": {"attribute": "href", "selector": "a:not([download])", "source": "attribute", "type": "string"}, "textLinkTarget": {"attribute": "target", "selector": "a:not([download])", "source": "attribute", "type": "string"}}, "save": [Function save], "supports": {"align": true, "anchor": true}}, {"attributes": {"align": {"enum": ["left", "center", "right", "wide", "full", ""], "type": "string"}, "anchor": {"attribute": "id", "selector": "*", "source": "attribute", "type": "string"}, "className": {"type": "string"}, "displayPreview": {"type": "boolean"}, "downloadButtonText": {"selector": "a[download]", "source": "html", "type": "string"}, "fileName": {"selector": "a:not([download])",
|
Running the tests:
test/integration/full-content/full-content.test.js#L184
Error: File 'core__file__no-download-button.json' does not match expected value:
expect(received).toEqual(expected) // deep equality
- Expected - 1
+ Received + 0
@@ -1,9 +1,8 @@
Array [
Object {
"attributes": Object {
- "downloadButtonText": "",
"fileId": "wp-block-file--media-_clientId_0",
"fileName": "lkjfijwef",
"href": "http://localhost:8888/wp-content/uploads/2018/05/keycodes.js",
"previewHeight": 600,
"showDownloadButton": false,
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:
test/integration/full-content/full-content.test.js#L184
Error: File 'core__file__no-download-button__deprecated-1.json' does not match expected value:
expect(received).toEqual(expected) // deep equality
- Expected - 1
+ Received + 0
@@ -1,9 +1,8 @@
Array [
Object {
"attributes": Object {
- "downloadButtonText": "",
"fileName": "lkjfijwef",
"href": "http://localhost:8888/wp-content/uploads/2018/05/keycodes.js",
"previewHeight": 600,
"showDownloadButton": false,
"textLinkHref": "http://localhost:8888/wp-content/uploads/2018/05/keycodes.js",
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:
test/integration/full-content/full-content.test.js#L220
Error: File 'core__file__no-text-link.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:file {"href":"http://localhost:8888/wp-content/uploads/2018/05/keycodes.js"} -->
- <div class="wp-block-file"><a href="http://localhost:8888/wp-content/uploads/2018/05/keycodes.js" class="wp-block-file__button wp-element-button" download>Download</a></div>
+ <div class="wp-block-file"><div class="wp-block-file__button-wrapper"></div></div>
<!-- /wp:file -->
↵
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/file", {"__experimentalLabel": [Function anonymous], "apiVersion": 3, "attributes": {"align": {"enum": ["left", "center", "right", "wide", "full", ""], "type": "string"}, "anchor": {"attribute": "id", "selector": "*", "source": "attribute", "type": "string"}, "backgroundColor": {"type": "string"}, "blob": {"role": "local", "type": "string"}, "borderColor": {"type": "string"}, "className": {"type": "string"}, "displayPreview": {"type": "boolean"}, "fileId": {"attribute": "id", "selector": "a:not([download])", "source": "attribute", "type": "string"}, "fileName": {"role": "content", "selector": "a:not([download])", "source": "rich-text", "type": "rich-text"}, "gradient": {"type": "string"}, "href": {"role": "content", "type": "string"}, "id": {"type": "number"}, "lock": {"type": "object"}, "metadata": {"type": "object"}, "previewHeight": {"default": 600, "type": "number"}, "showDownloadButton": {"default": true, "type": "boolean"}, "style": {"type": "object"}, "textColor": {"type": "string"}, "textLinkHref": {"attribute": "href", "role": "content", "selector": "a:not([download])", "source": "attribute", "type": "string"}, "textLinkTarget": {"attribute": "target", "selector": "a:not([download])", "source": "attribute", "type": "string"}}, "blockHooks": {}, "category": "media", "deprecated": [{"attributes": {"align": {"enum": ["left", "center", "right", "wide", "full", ""], "type": "string"}, "anchor": {"attribute": "id", "selector": "*", "source": "attribute", "type": "string"}, "className": {"type": "string"}, "displayPreview": {"type": "boolean"}, "downloadButtonText": {"selector": "a[download]", "source": "html", "type": "string"}, "fileId": {"attribute": "id", "selector": "a:not([download])", "source": "attribute", "type": "string"}, "fileName": {"selector": "a:not([download])", "source": "html", "type": "string"}, "href": {"type": "string"}, "id": {"type": "number"}, "lock": {"type": "object"}, "metadata": {"type": "object"}, "previewHeight": {"default": 600, "type": "number"}, "showDownloadButton": {"default": true, "type": "boolean"}, "textLinkHref": {"attribute": "href", "selector": "a:not([download])", "source": "attribute", "type": "string"}, "textLinkTarget": {"attribute": "target", "selector": "a:not([download])", "source": "attribute", "type": "string"}}, "save": [Function save], "supports": {"align": true, "anchor": true}}, {"attributes": {"align": {"enum": ["left", "center", "right", "wide", "full", ""], "type": "string"}, "anchor": {"attribute": "id", "selector": "*", "source": "attribute", "type": "string"}, "className": {"type": "string"}, "displayPreview": {"type": "boolean"}, "downloadButtonText": {"selector": "a[download]", "source": "html", "type": "string"}, "fileId": {"attribute": "id", "selector": "a:not([download])", "source": "attribute", "type": "string"}, "fileName": {"selector": "a:not([download])", "source": "html", "type": "string"}, "href": {"type": "string"}, "id": {"type": "number"}, "lock": {"type": "object"}, "metadata": {"type": "object"}, "previewHeight": {"default": 600, "type": "number"}, "showDownloadButton": {"default": true, "type": "boolean"}, "textLinkHref": {"attribute": "href", "selector": "a:not([download])", "source": "attribute", "type": "string"}, "textLinkTarget": {"attribute": "target", "selector": "a:not([download])", "source": "attribute", "type": "string"}}, "save": [Function save], "supports": {"align": true, "anchor": true}}, {"attributes": {"align": {"enum": ["left", "center", "right", "wide", "full", ""], "type": "string"}, "anchor": {"attribute": "id", "selector": "*", "source": "attribute", "type": "string"}, "className": {"type": "string"}, "displayPreview": {"type": "boolean"}, "downloadButtonText": {"selector": "a[download]", "source": "html", "type": "string"}, "fileName": {"selector": "a:not([download])",
|
Running the tests:
test/integration/full-content/full-content.test.js#L220
Error: File 'core__file__no-text-link__deprecated-1.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:file {"href":"http://localhost:8888/wp-content/uploads/2018/05/keycodes.js"} -->
- <div class="wp-block-file"><a href="http://localhost:8888/wp-content/uploads/2018/05/keycodes.js" class="wp-block-file__button wp-element-button" download>Download</a></div>
+ <div class="wp-block-file"><div class="wp-block-file__button-wrapper"></div></div>
<!-- /wp:file -->
↵
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)
|
Your workflow is using a version of actions/cache that is scheduled for deprecation, actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9. Please update your workflow to use either v3 or v4 of actions/cache to avoid interruptions. Learn more: https://github.blog/changelog/2024-12-05-notice-of-upcoming-releases-and-breaking-changes-for-github-actions/#actions-cache-v1-v2-and-actions-toolkit-cache-package-closing-down
|
Setup Node.js and install dependencies
Both node-version and node-version-file inputs are specified, only node-version will be used
|
Loading