From 69bcc8a6ef09c9c1da0c0a1b732e1f63ca9513fa Mon Sep 17 00:00:00 2001 From: Ari Stathopoulos Date: Fri, 19 Apr 2024 11:17:16 +0300 Subject: [PATCH] add fixture for deprecated version of block --- .../blocks/core__form__deprecated-v1.html | 21 ++++ .../blocks/core__form__deprecated-v1.json | 91 +++++++++++++++ .../core__form__deprecated-v1.parsed.json | 104 ++++++++++++++++++ .../core__form__deprecated-v1.serialized.html | 24 ++++ 4 files changed, 240 insertions(+) create mode 100644 test/integration/fixtures/blocks/core__form__deprecated-v1.html create mode 100644 test/integration/fixtures/blocks/core__form__deprecated-v1.json create mode 100644 test/integration/fixtures/blocks/core__form__deprecated-v1.parsed.json create mode 100644 test/integration/fixtures/blocks/core__form__deprecated-v1.serialized.html diff --git a/test/integration/fixtures/blocks/core__form__deprecated-v1.html b/test/integration/fixtures/blocks/core__form__deprecated-v1.html new file mode 100644 index 00000000000000..6144cae766c3ed --- /dev/null +++ b/test/integration/fixtures/blocks/core__form__deprecated-v1.html @@ -0,0 +1,21 @@ + +
+
+ + + +
+ + + +
+ + + +
+
+
+
+
+
+ diff --git a/test/integration/fixtures/blocks/core__form__deprecated-v1.json b/test/integration/fixtures/blocks/core__form__deprecated-v1.json new file mode 100644 index 00000000000000..0946abfa25ca62 --- /dev/null +++ b/test/integration/fixtures/blocks/core__form__deprecated-v1.json @@ -0,0 +1,91 @@ +[ + { + "name": "core/form", + "isValid": false, + "attributes": { + "submissionMethod": "email", + "method": "post", + "style": { + "color": { + "text": "#913636", + "background": "#d1c6c6" + }, + "elements": { + "link": { + "color": { + "text": "#913636" + } + } + }, + "typography": { + "fontSize": "18px" + } + } + }, + "innerBlocks": [ + { + "name": "core/form-input", + "isValid": true, + "attributes": { + "type": "text", + "label": "Name", + "inlineLabel": false, + "required": true, + "value": "", + "visibilityPermissions": "all" + }, + "innerBlocks": [] + }, + { + "name": "core/form-input", + "isValid": true, + "attributes": { + "type": "email", + "label": "Email", + "inlineLabel": false, + "required": true, + "value": "", + "visibilityPermissions": "all" + }, + "innerBlocks": [] + }, + { + "name": "core/form-input", + "isValid": true, + "attributes": { + "type": "textarea", + "label": "Comment", + "inlineLabel": false, + "required": true, + "value": "", + "visibilityPermissions": "all" + }, + "innerBlocks": [] + }, + { + "name": "core/form-submit-button", + "isValid": true, + "attributes": {}, + "innerBlocks": [ + { + "name": "core/buttons", + "isValid": true, + "attributes": {}, + "innerBlocks": [ + { + "name": "core/button", + "isValid": true, + "attributes": { + "tagName": "button", + "type": "submit", + "text": "Submit" + }, + "innerBlocks": [] + } + ] + } + ] + } + ] + } +] diff --git a/test/integration/fixtures/blocks/core__form__deprecated-v1.parsed.json b/test/integration/fixtures/blocks/core__form__deprecated-v1.parsed.json new file mode 100644 index 00000000000000..65673e64145aa8 --- /dev/null +++ b/test/integration/fixtures/blocks/core__form__deprecated-v1.parsed.json @@ -0,0 +1,104 @@ +[ + { + "blockName": "core/form", + "attrs": { + "style": { + "color": { + "text": "#913636", + "background": "#d1c6c6" + }, + "elements": { + "link": { + "color": { + "text": "#913636" + } + } + }, + "typography": { + "fontSize": "18px" + } + } + }, + "innerBlocks": [ + { + "blockName": "core/form-input", + "attrs": {}, + "innerBlocks": [], + "innerHTML": "\n
\n", + "innerContent": [ + "\n
\n" + ] + }, + { + "blockName": "core/form-input", + "attrs": { + "type": "email" + }, + "innerBlocks": [], + "innerHTML": "\n
\n", + "innerContent": [ + "\n
\n" + ] + }, + { + "blockName": "core/form-input", + "attrs": { + "type": "textarea" + }, + "innerBlocks": [], + "innerHTML": "\n
\n", + "innerContent": [ + "\n
\n" + ] + }, + { + "blockName": "core/form-submit-button", + "attrs": {}, + "innerBlocks": [ + { + "blockName": "core/buttons", + "attrs": {}, + "innerBlocks": [ + { + "blockName": "core/button", + "attrs": { + "tagName": "button", + "type": "submit" + }, + "innerBlocks": [], + "innerHTML": "\n
\n", + "innerContent": [ + "\n
\n" + ] + } + ], + "innerHTML": "\n
\n", + "innerContent": [ + "\n
", + null, + "
\n" + ] + } + ], + "innerHTML": "\n
\n", + "innerContent": [ + "\n
", + null, + "
\n" + ] + } + ], + "innerHTML": "\n
\n\n\n\n\n\n
\n", + "innerContent": [ + "\n
", + null, + "\n\n", + null, + "\n\n", + null, + "\n\n", + null, + "
\n" + ] + } +] diff --git a/test/integration/fixtures/blocks/core__form__deprecated-v1.serialized.html b/test/integration/fixtures/blocks/core__form__deprecated-v1.serialized.html new file mode 100644 index 00000000000000..5cdb89a1fa3856 --- /dev/null +++ b/test/integration/fixtures/blocks/core__form__deprecated-v1.serialized.html @@ -0,0 +1,24 @@ + +
+ +
+ + +
+ + +
+ + +
+ +
+ +
+ +
+ +
+ +
+