[
{"name": "a checkbox with its label to the right, submitting yes", "args": [{"id": "terms", "label": "I agree to the terms and conditions"}], "expect": "
"},
{"name": "a name and value of its own", "args": [{"id": "c1", "name": "marketing", "value": "opt-in", "label": "Send me news by email"}], "expect": ""},
{"name": "controlled and ticked renders checked", "args": [{"id": "terms", "label": "I agree", "checked": true}], "expect": ""},
{"name": "controlled and clear renders no checked attribute", "args": [{"id": "terms", "label": "I agree", "checked": false}], "expect": ""},
{"name": "defaultChecked renders checked too", "args": [{"id": "remember", "label": "Remember me on this device", "defaultChecked": true}], "expect": ""},
{"name": "a hint goes under the label and describes the checkbox", "args": [{"id": "remember", "label": "Remember me", "hint": "Do not tick this on a shared computer"}], "expect": ""},
{"name": "an error goes above the box, marks it invalid and describes it", "args": [{"id": "terms", "label": "I agree to the terms", "error": "Agree to the terms to continue"}], "expect": ""},
{"name": "hint and error: described by both, hint first", "args": [{"id": "t", "label": "I agree", "hint": "You can read the terms first", "error": "Agree to the terms", "checked": false}], "expect": "Error: Agree to the terms
"},
{"name": "required and disabled are boolean attributes", "args": [{"id": "t", "label": "I agree", "required": true, "disabled": true}], "expect": ""},
{"name": "false booleans, an empty hint and a null error render nothing", "args": [{"id": "t", "label": "I agree", "required": false, "disabled": false, "hint": "", "error": null, "className": "fune-field--compact"}], "expect": ""},
{"name": "an error and a class name: the error class comes first", "args": [{"id": "t", "label": "I agree", "error": "Agree to continue", "className": "wide"}], "expect": ""},
{"name": "label and value are escaped", "args": [{"id": "t", "label": "Terms & ", "value": "a\"b"}], "expect": ""},
{"name": "an empty value is submitted as empty, not yes", "args": [{"id": "t", "label": "I agree", "value": ""}], "expect": ""},
{"name": "an id with a space is refused", "args": [{"id": "the terms", "label": "I agree"}], "expectError": "a field id cannot contain spaces"}
]