-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add fixture for deprecated version of block
- Loading branch information
Showing
4 changed files
with
240 additions
and
0 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
test/integration/fixtures/blocks/core__form__deprecated-v1.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<!-- wp:form {"style":{"color":{"text":"#913636","background":"#d1c6c6"},"elements":{"link":{"color":{"text":"#913636"}}},"typography":{"fontSize":"18px"}}} --> | ||
<form class="wp-block-form" style="color:#913636;background-color:#d1c6c6;font-size:18px" enctype="text/plain"><!-- wp:form-input --> | ||
<div class="wp-block-form-input"><label class="wp-block-form-input__label"><span class="wp-block-form-input__label-content">Name</span><input class="wp-block-form-input__input" type="text" name="name" required aria-required="true"/></label></div> | ||
<!-- /wp:form-input --> | ||
|
||
<!-- wp:form-input {"type":"email"} --> | ||
<div class="wp-block-form-input"><label class="wp-block-form-input__label"><span class="wp-block-form-input__label-content">Email</span><input class="wp-block-form-input__input" type="email" name="email" required aria-required="true"/></label></div> | ||
<!-- /wp:form-input --> | ||
|
||
<!-- wp:form-input {"type":"textarea"} --> | ||
<div class="wp-block-form-input"><label class="wp-block-form-input__label"><span class="wp-block-form-input__label-content">Comment</span><textarea class="wp-block-form-input__input" name="comment" required aria-required="true"></textarea></label></div> | ||
<!-- /wp:form-input --> | ||
|
||
<!-- wp:form-submit-button --> | ||
<div class="wp-block-form-submit-button"><!-- wp:buttons --> | ||
<div class="wp-block-buttons"><!-- wp:button {"tagName":"button","type":"submit"} --> | ||
<div class="wp-block-button"><button type="submit" class="wp-block-button__link wp-element-button">Submit</button></div> | ||
<!-- /wp:button --></div> | ||
<!-- /wp:buttons --></div> | ||
<!-- /wp:form-submit-button --></form> | ||
<!-- /wp:form --> |
91 changes: 91 additions & 0 deletions
91
test/integration/fixtures/blocks/core__form__deprecated-v1.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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": [] | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] |
104 changes: 104 additions & 0 deletions
104
test/integration/fixtures/blocks/core__form__deprecated-v1.parsed.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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<div class=\"wp-block-form-input\"><label class=\"wp-block-form-input__label\"><span class=\"wp-block-form-input__label-content\">Name</span><input class=\"wp-block-form-input__input\" type=\"text\" name=\"name\" required aria-required=\"true\"/></label></div>\n", | ||
"innerContent": [ | ||
"\n<div class=\"wp-block-form-input\"><label class=\"wp-block-form-input__label\"><span class=\"wp-block-form-input__label-content\">Name</span><input class=\"wp-block-form-input__input\" type=\"text\" name=\"name\" required aria-required=\"true\"/></label></div>\n" | ||
] | ||
}, | ||
{ | ||
"blockName": "core/form-input", | ||
"attrs": { | ||
"type": "email" | ||
}, | ||
"innerBlocks": [], | ||
"innerHTML": "\n<div class=\"wp-block-form-input\"><label class=\"wp-block-form-input__label\"><span class=\"wp-block-form-input__label-content\">Email</span><input class=\"wp-block-form-input__input\" type=\"email\" name=\"email\" required aria-required=\"true\"/></label></div>\n", | ||
"innerContent": [ | ||
"\n<div class=\"wp-block-form-input\"><label class=\"wp-block-form-input__label\"><span class=\"wp-block-form-input__label-content\">Email</span><input class=\"wp-block-form-input__input\" type=\"email\" name=\"email\" required aria-required=\"true\"/></label></div>\n" | ||
] | ||
}, | ||
{ | ||
"blockName": "core/form-input", | ||
"attrs": { | ||
"type": "textarea" | ||
}, | ||
"innerBlocks": [], | ||
"innerHTML": "\n<div class=\"wp-block-form-input\"><label class=\"wp-block-form-input__label\"><span class=\"wp-block-form-input__label-content\">Comment</span><textarea class=\"wp-block-form-input__input\" name=\"comment\" required aria-required=\"true\"></textarea></label></div>\n", | ||
"innerContent": [ | ||
"\n<div class=\"wp-block-form-input\"><label class=\"wp-block-form-input__label\"><span class=\"wp-block-form-input__label-content\">Comment</span><textarea class=\"wp-block-form-input__input\" name=\"comment\" required aria-required=\"true\"></textarea></label></div>\n" | ||
] | ||
}, | ||
{ | ||
"blockName": "core/form-submit-button", | ||
"attrs": {}, | ||
"innerBlocks": [ | ||
{ | ||
"blockName": "core/buttons", | ||
"attrs": {}, | ||
"innerBlocks": [ | ||
{ | ||
"blockName": "core/button", | ||
"attrs": { | ||
"tagName": "button", | ||
"type": "submit" | ||
}, | ||
"innerBlocks": [], | ||
"innerHTML": "\n<div class=\"wp-block-button\"><button type=\"submit\" class=\"wp-block-button__link wp-element-button\">Submit</button></div>\n", | ||
"innerContent": [ | ||
"\n<div class=\"wp-block-button\"><button type=\"submit\" class=\"wp-block-button__link wp-element-button\">Submit</button></div>\n" | ||
] | ||
} | ||
], | ||
"innerHTML": "\n<div class=\"wp-block-buttons\"></div>\n", | ||
"innerContent": [ | ||
"\n<div class=\"wp-block-buttons\">", | ||
null, | ||
"</div>\n" | ||
] | ||
} | ||
], | ||
"innerHTML": "\n<div class=\"wp-block-form-submit-button\"></div>\n", | ||
"innerContent": [ | ||
"\n<div class=\"wp-block-form-submit-button\">", | ||
null, | ||
"</div>\n" | ||
] | ||
} | ||
], | ||
"innerHTML": "\n<form class=\"wp-block-form\" style=\"color:#913636;background-color:#d1c6c6;font-size:18px\" enctype=\"text/plain\">\n\n\n\n\n\n</form>\n", | ||
"innerContent": [ | ||
"\n<form class=\"wp-block-form\" style=\"color:#913636;background-color:#d1c6c6;font-size:18px\" enctype=\"text/plain\">", | ||
null, | ||
"\n\n", | ||
null, | ||
"\n\n", | ||
null, | ||
"\n\n", | ||
null, | ||
"</form>\n" | ||
] | ||
} | ||
] |
24 changes: 24 additions & 0 deletions
24
test/integration/fixtures/blocks/core__form__deprecated-v1.serialized.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<!-- wp:form {"style":{"color":{"text":"#913636","background":"#d1c6c6"},"elements":{"link":{"color":{"text":"#913636"}}},"typography":{"fontSize":"18px"}}} --> | ||
<form class="wp-block-form" style="color:#913636;background-color:#d1c6c6;font-size:18px" enctype="text/plain"> | ||
<!-- wp:form-input --> | ||
<div class="wp-block-form-input"><label class="wp-block-form-input__label"><span class="wp-block-form-input__label-content">Name</span><input class="wp-block-form-input__input" type="text" name="name" required aria-required="true"/></label></div> | ||
<!-- /wp:form-input --> | ||
<!-- wp:form-input {"type":"email"} --> | ||
<div class="wp-block-form-input"><label class="wp-block-form-input__label"><span class="wp-block-form-input__label-content">Email</span><input class="wp-block-form-input__input" type="email" name="email" required aria-required="true"/></label></div> | ||
<!-- /wp:form-input --> | ||
<!-- wp:form-input {"type":"textarea"} --> | ||
<div class="wp-block-form-input"><label class="wp-block-form-input__label"><span class="wp-block-form-input__label-content">Comment</span><textarea class="wp-block-form-input__input" name="comment" required aria-required="true"></textarea></label></div> | ||
<!-- /wp:form-input --> | ||
<!-- wp:form-submit-button --> | ||
<div class="wp-block-form-submit-button"> | ||
<!-- wp:buttons --> | ||
<div class="wp-block-buttons"> | ||
<!-- wp:button {"tagName":"button","type":"submit"} --> | ||
<div class="wp-block-button"><button type="submit" class="wp-block-button__link wp-element-button">Submit</button></div> | ||
<!-- /wp:button --> | ||
</div> | ||
<!-- /wp:buttons --> | ||
</div> | ||
<!-- /wp:form-submit-button --> | ||
</form> | ||
<!-- /wp:form --> |