-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add base fixtures for checkbox, radio, and textarea inputs
- Loading branch information
1 parent
8cc11de
commit c222f88
Showing
12 changed files
with
104 additions
and
0 deletions.
There are no files selected for viewing
3 changes: 3 additions & 0 deletions
3
test/integration/fixtures/blocks/core__form-input__checkbox.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,3 @@ | ||
<!-- wp:form-input {"type":"checkbox","inlineLabel":true} --> | ||
<div class="wp-block-form-input"><label class="wp-block-form-input__label is-label-inline"><input class="wp-block-form-input__input" type="checkbox" name="label" required aria-required="true"/><span class="wp-block-form-input__label-content">Label</span></label></div> | ||
<!-- /wp:form-input --> |
15 changes: 15 additions & 0 deletions
15
test/integration/fixtures/blocks/core__form-input__checkbox.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,15 @@ | ||
[ | ||
{ | ||
"name": "core/form-input", | ||
"isValid": true, | ||
"attributes": { | ||
"type": "checkbox", | ||
"label": "Label", | ||
"inlineLabel": true, | ||
"required": true, | ||
"value": "", | ||
"visibilityPermissions": "all" | ||
}, | ||
"innerBlocks": [] | ||
} | ||
] |
14 changes: 14 additions & 0 deletions
14
test/integration/fixtures/blocks/core__form-input__checkbox.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,14 @@ | ||
[ | ||
{ | ||
"blockName": "core/form-input", | ||
"attrs": { | ||
"type": "checkbox", | ||
"inlineLabel": true | ||
}, | ||
"innerBlocks": [], | ||
"innerHTML": "\n<div class=\"wp-block-form-input\"><label class=\"wp-block-form-input__label is-label-inline\"><input class=\"wp-block-form-input__input\" type=\"checkbox\" name=\"label\" required aria-required=\"true\"/><span class=\"wp-block-form-input__label-content\">Label</span></label></div>\n", | ||
"innerContent": [ | ||
"\n<div class=\"wp-block-form-input\"><label class=\"wp-block-form-input__label is-label-inline\"><input class=\"wp-block-form-input__input\" type=\"checkbox\" name=\"label\" required aria-required=\"true\"/><span class=\"wp-block-form-input__label-content\">Label</span></label></div>\n" | ||
] | ||
} | ||
] |
3 changes: 3 additions & 0 deletions
3
test/integration/fixtures/blocks/core__form-input__checkbox.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,3 @@ | ||
<!-- wp:form-input {"type":"checkbox","inlineLabel":true} --> | ||
<div class="wp-block-form-input"><label class="wp-block-form-input__label is-label-inline"><input class="wp-block-form-input__input" type="checkbox" name="label" required aria-required="true"/><span class="wp-block-form-input__label-content">Label</span></label></div> | ||
<!-- /wp:form-input --> |
3 changes: 3 additions & 0 deletions
3
test/integration/fixtures/blocks/core__form-input__radio.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,3 @@ | ||
<!-- wp:form-input {"type":"radio","inlineLabel":true} --> | ||
<div class="wp-block-form-input"><label class="wp-block-form-input__label is-label-inline"><input class="wp-block-form-input__input" type="radio" name="label" required aria-required="true"/><span class="wp-block-form-input__label-content">Label</span></label></div> | ||
<!-- /wp:form-input --> |
15 changes: 15 additions & 0 deletions
15
test/integration/fixtures/blocks/core__form-input__radio.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,15 @@ | ||
[ | ||
{ | ||
"name": "core/form-input", | ||
"isValid": true, | ||
"attributes": { | ||
"type": "radio", | ||
"label": "Label", | ||
"inlineLabel": true, | ||
"required": true, | ||
"value": "", | ||
"visibilityPermissions": "all" | ||
}, | ||
"innerBlocks": [] | ||
} | ||
] |
14 changes: 14 additions & 0 deletions
14
test/integration/fixtures/blocks/core__form-input__radio.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,14 @@ | ||
[ | ||
{ | ||
"blockName": "core/form-input", | ||
"attrs": { | ||
"type": "radio", | ||
"inlineLabel": true | ||
}, | ||
"innerBlocks": [], | ||
"innerHTML": "\n<div class=\"wp-block-form-input\"><label class=\"wp-block-form-input__label is-label-inline\"><input class=\"wp-block-form-input__input\" type=\"radio\" name=\"label\" required aria-required=\"true\"/><span class=\"wp-block-form-input__label-content\">Label</span></label></div>\n", | ||
"innerContent": [ | ||
"\n<div class=\"wp-block-form-input\"><label class=\"wp-block-form-input__label is-label-inline\"><input class=\"wp-block-form-input__input\" type=\"radio\" name=\"label\" required aria-required=\"true\"/><span class=\"wp-block-form-input__label-content\">Label</span></label></div>\n" | ||
] | ||
} | ||
] |
3 changes: 3 additions & 0 deletions
3
test/integration/fixtures/blocks/core__form-input__radio.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,3 @@ | ||
<!-- wp:form-input {"type":"radio","inlineLabel":true} --> | ||
<div class="wp-block-form-input"><label class="wp-block-form-input__label is-label-inline"><input class="wp-block-form-input__input" type="radio" name="label" required aria-required="true"/><span class="wp-block-form-input__label-content">Label</span></label></div> | ||
<!-- /wp:form-input --> |
3 changes: 3 additions & 0 deletions
3
test/integration/fixtures/blocks/core__form-input__textarea.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,3 @@ | ||
<!-- 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">Label</span><textarea class="wp-block-form-input__input" name="label" required aria-required="true"></textarea></label></div> | ||
<!-- /wp:form-input --> |
15 changes: 15 additions & 0 deletions
15
test/integration/fixtures/blocks/core__form-input__textarea.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,15 @@ | ||
[ | ||
{ | ||
"name": "core/form-input", | ||
"isValid": true, | ||
"attributes": { | ||
"type": "textarea", | ||
"label": "Label", | ||
"inlineLabel": false, | ||
"required": true, | ||
"value": "", | ||
"visibilityPermissions": "all" | ||
}, | ||
"innerBlocks": [] | ||
} | ||
] |
13 changes: 13 additions & 0 deletions
13
test/integration/fixtures/blocks/core__form-input__textarea.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,13 @@ | ||
[ | ||
{ | ||
"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\">Label</span><textarea class=\"wp-block-form-input__input\" name=\"label\" 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\">Label</span><textarea class=\"wp-block-form-input__input\" name=\"label\" required aria-required=\"true\"></textarea></label></div>\n" | ||
] | ||
} | ||
] |
3 changes: 3 additions & 0 deletions
3
test/integration/fixtures/blocks/core__form-input__textarea.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,3 @@ | ||
<!-- 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">Label</span><textarea class="wp-block-form-input__input" name="label" required aria-required="true"></textarea></label></div> | ||
<!-- /wp:form-input --> |