diff --git a/test/integration/fixtures/blocks/core__form.html b/test/integration/fixtures/blocks/core__form.html new file mode 100644 index 00000000000000..9015fe38dd19c7 --- /dev/null +++ b/test/integration/fixtures/blocks/core__form.html @@ -0,0 +1,21 @@ + +
+ + + + + + + + + + + + + + + + +
+
+ diff --git a/test/integration/fixtures/blocks/core__form.json b/test/integration/fixtures/blocks/core__form.json new file mode 100644 index 00000000000000..0c9f29ac87ee0c --- /dev/null +++ b/test/integration/fixtures/blocks/core__form.json @@ -0,0 +1,68 @@ +[ + { + "name": "core/form", + "isValid": true, + "attributes": { + "action": "#", + "method": "post", + "formId": "the-form-id" + }, + "innerBlocks": [ + { + "name": "core/input-field", + "isValid": true, + "attributes": { + "type": "text", + "label": "Name - required, inline label", + "inlineLabel": true, + "required": true + }, + "innerBlocks": [] + }, + { + "name": "core/input-field", + "isValid": true, + "attributes": { + "type": "checkbox", + "label": "Checkbox - inline label", + "inlineLabel": true, + "required": true + }, + "innerBlocks": [] + }, + { + "name": "core/input-field", + "isValid": true, + "attributes": { + "type": "email", + "label": "Email - required", + "inlineLabel": false, + "required": true + }, + "innerBlocks": [] + }, + { + "name": "core/input-field", + "isValid": true, + "attributes": { + "type": "textarea", + "label": "Textarea input", + "inlineLabel": false, + "required": false + }, + "innerBlocks": [] + }, + { + "name": "core/input-field", + "isValid": true, + "attributes": { + "type": "submit", + "label": "Submit", + "inlineLabel": false, + "required": false + }, + "innerBlocks": [] + } + ] + } +] diff --git a/test/integration/fixtures/blocks/core__form.parsed.json b/test/integration/fixtures/blocks/core__form.parsed.json new file mode 100644 index 00000000000000..1cb360568ad8fb --- /dev/null +++ b/test/integration/fixtures/blocks/core__form.parsed.json @@ -0,0 +1,88 @@ +[ + { + "blockName": "core/form", + "attrs": { + "formId": "the-form-id" + }, + "innerBlocks": [ + { + "blockName": "core/input-field", + "attrs": { + "label": "Name - required, inline label", + "inlineLabel": true, + "required": true + }, + "innerBlocks": [], + "innerHTML": "\n\n", + "innerContent": [ + "\n\n" + ] + }, + { + "blockName": "core/input-field", + "attrs": { + "type": "checkbox", + "label": "Checkbox - inline label", + "inlineLabel": true, + "required": true + }, + "innerBlocks": [], + "innerHTML": "\n\n", + "innerContent": [ + "\n\n" + ] + }, + { + "blockName": "core/input-field", + "attrs": { + "type": "email", + "label": "Email - required", + "required": true + }, + "innerBlocks": [], + "innerHTML": "\n\n", + "innerContent": [ + "\n\n" + ] + }, + { + "blockName": "core/input-field", + "attrs": { + "type": "textarea", + "label": "Textarea input" + }, + "innerBlocks": [], + "innerHTML": "\n\n", + "innerContent": [ + "\n\n" + ] + }, + { + "blockName": "core/input-field", + "attrs": { + "type": "submit", + "label": "Submit" + }, + "innerBlocks": [], + "innerHTML": "\n
\n", + "innerContent": [ + "\n
\n" + ] + } + ], + "innerHTML": "\n
\n\n\n\n\n\n\n\n
\n", + "innerContent": [ + "\n
", + null, + "\n\n", + null, + "\n\n", + null, + "\n\n", + null, + "\n\n", + null, + "
\n" + ] + } +] diff --git a/test/integration/fixtures/blocks/core__form.serialized.html b/test/integration/fixtures/blocks/core__form.serialized.html new file mode 100644 index 00000000000000..9015fe38dd19c7 --- /dev/null +++ b/test/integration/fixtures/blocks/core__form.serialized.html @@ -0,0 +1,21 @@ + +
+ + + + + + + + + + + + + + + + +
+
+ diff --git a/test/integration/fixtures/blocks/core__input-field.html b/test/integration/fixtures/blocks/core__input-field.html new file mode 100644 index 00000000000000..2574bc62f5c7cb --- /dev/null +++ b/test/integration/fixtures/blocks/core__input-field.html @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + +
+ diff --git a/test/integration/fixtures/blocks/core__input-field.json b/test/integration/fixtures/blocks/core__input-field.json new file mode 100644 index 00000000000000..488701c5558f76 --- /dev/null +++ b/test/integration/fixtures/blocks/core__input-field.json @@ -0,0 +1,57 @@ +[ + { + "name": "core/input-field", + "isValid": true, + "attributes": { + "type": "text", + "label": "Name - required, inline label", + "inlineLabel": true, + "required": true + }, + "innerBlocks": [] + }, + { + "name": "core/input-field", + "isValid": true, + "attributes": { + "type": "checkbox", + "label": "Checkbox - inline label", + "inlineLabel": true, + "required": true + }, + "innerBlocks": [] + }, + { + "name": "core/input-field", + "isValid": true, + "attributes": { + "type": "email", + "label": "Email - required", + "inlineLabel": false, + "required": true + }, + "innerBlocks": [] + }, + { + "name": "core/input-field", + "isValid": true, + "attributes": { + "type": "textarea", + "label": "Textarea input", + "inlineLabel": false, + "required": false + }, + "innerBlocks": [] + }, + { + "name": "core/input-field", + "isValid": true, + "attributes": { + "type": "submit", + "label": "Submit", + "inlineLabel": false, + "required": false + }, + "innerBlocks": [] + } +] diff --git a/test/integration/fixtures/blocks/core__input-field.parsed.json b/test/integration/fixtures/blocks/core__input-field.parsed.json new file mode 100644 index 00000000000000..886e3e6d35ad8e --- /dev/null +++ b/test/integration/fixtures/blocks/core__input-field.parsed.json @@ -0,0 +1,94 @@ +[ + { + "blockName": "core/input-field", + "attrs": { + "label": "Name - required, inline label", + "inlineLabel": true, + "required": true + }, + "innerBlocks": [], + "innerHTML": "\n\n", + "innerContent": [ + "\n\n" + ] + }, + { + "blockName": null, + "attrs": {}, + "innerBlocks": [], + "innerHTML": "\n\n", + "innerContent": [ "\n\n" ] + }, + { + "blockName": "core/input-field", + "attrs": { + "type": "checkbox", + "label": "Checkbox - inline label", + "inlineLabel": true, + "required": true + }, + "innerBlocks": [], + "innerHTML": "\n\n", + "innerContent": [ + "\n\n" + ] + }, + { + "blockName": null, + "attrs": {}, + "innerBlocks": [], + "innerHTML": "\n\n", + "innerContent": [ "\n\n" ] + }, + { + "blockName": "core/input-field", + "attrs": { + "type": "email", + "label": "Email - required", + "required": true + }, + "innerBlocks": [], + "innerHTML": "\n\n", + "innerContent": [ + "\n\n" + ] + }, + { + "blockName": null, + "attrs": {}, + "innerBlocks": [], + "innerHTML": "\n\n", + "innerContent": [ "\n\n" ] + }, + { + "blockName": "core/input-field", + "attrs": { + "type": "textarea", + "label": "Textarea input" + }, + "innerBlocks": [], + "innerHTML": "\n\n", + "innerContent": [ + "\n\n" + ] + }, + { + "blockName": null, + "attrs": {}, + "innerBlocks": [], + "innerHTML": "\n\n", + "innerContent": [ "\n\n" ] + }, + { + "blockName": "core/input-field", + "attrs": { + "type": "submit", + "label": "Submit" + }, + "innerBlocks": [], + "innerHTML": "\n
\n", + "innerContent": [ + "\n
\n" + ] + } +] diff --git a/test/integration/fixtures/blocks/core__input-field.serialized.html b/test/integration/fixtures/blocks/core__input-field.serialized.html new file mode 100644 index 00000000000000..2574bc62f5c7cb --- /dev/null +++ b/test/integration/fixtures/blocks/core__input-field.serialized.html @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + +
+