[ {"name": "the UK form: lines, town, county and postcode, each labelled and autocompleted", "args": [{"id": "address", "legend": "What is your address?"}], "expect": "
What is your address?
"}, {"name": "a controlled UK address with its values", "args": [{"id": "address", "legend": "What is your address?", "value": {"line1": "10 Downing Street", "line2": null, "town": "London", "region": null, "postcode": "SW1A 2AA", "country": "GB"}}], "expect": "
What is your address?
"}, {"name": "UK errors with showErrors: each field marked with its own message", "args": [{"id": "address", "legend": "What is your address?", "showErrors": true, "value": {"line1": "", "line2": null, "town": "", "region": null, "postcode": "SW1A", "country": "GB"}}], "expect": "
What is your address?

Error: Enter address line 1, typically the building and street

Error: Enter town or city

Error: Enter a real postcode

"}, {"name": "a valid UK address with showErrors shows no errors", "args": [{"id": "address", "legend": "What is your address?", "showErrors": true, "value": {"line1": "1 High Street", "line2": null, "town": "Leeds", "region": null, "postcode": "ls1 1aa", "country": "GB"}}], "expect": "
What is your address?
"}, {"name": "the US form: State and ZIP code, with a country select", "args": [{"id": "addr", "legend": "Delivery address", "countries": [{"value": "GB", "label": "United Kingdom"}, {"value": "US", "label": "United States"}, {"value": "IE", "label": "Ireland"}], "value": {"line1": "1600 Pennsylvania Avenue NW", "line2": null, "town": "Washington", "region": "DC", "postcode": "20500", "country": "US"}}], "expect": "
Delivery address
"}, {"name": "a bad ZIP code with showErrors", "args": [{"id": "addr", "legend": "Delivery address", "countries": [{"value": "GB", "label": "United Kingdom"}, {"value": "US", "label": "United States"}, {"value": "IE", "label": "Ireland"}], "showErrors": true, "value": {"line1": "1 Main St", "line2": null, "town": "Springfield", "region": null, "postcode": "1234", "country": "US"}}], "expect": "
Delivery address

Error: Enter a real ZIP code

"}, {"name": "Ireland: the Eircode is optional", "args": [{"id": "addr", "legend": "Delivery address", "countries": [{"value": "GB", "label": "United Kingdom"}, {"value": "US", "label": "United States"}, {"value": "IE", "label": "Ireland"}], "defaultValue": {"line1": "", "line2": null, "town": "", "region": null, "postcode": null, "country": "IE"}}], "expect": "
Delivery address
"}, {"name": "no country chosen with showErrors: Select a country", "args": [{"id": "addr", "legend": "Delivery address", "countries": [{"value": "GB", "label": "United Kingdom"}, {"value": "US", "label": "United States"}, {"value": "IE", "label": "Ireland"}], "showErrors": true, "value": {"line1": "1 Rue de Rivoli", "line2": null, "town": "Paris", "region": null, "postcode": null, "country": ""}}], "expect": "
Delivery address

Error: Select a country

"}, {"name": "errors passed in, such as the server's, mark their fields", "args": [{"id": "address", "legend": "What is your address?", "errors": [{"field": "postcode", "message": "We do not deliver to this postcode"}], "value": {"line1": "1 Croft Road", "line2": null, "town": "Lerwick", "region": null, "postcode": "ZE1 0AA", "country": "GB"}}], "expect": "
What is your address?

Error: We do not deliver to this postcode

"}, {"name": "a hint, a page heading, a name and a class of its own", "args": [{"id": "home", "name": "homeAddress", "legend": "Where do you live?", "hint": "Your main home", "isPageHeading": true, "className": "app-address"}], "expect": "

Where do you live?

Your main home
"} ]