-
Notifications
You must be signed in to change notification settings - Fork 319
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Review feedback on test fixtures proposal #1885
Comments
The proposal generally got good feedback and most queries were handled by the existing approach. The following are the suggestions/questions that weren’t handled: Making the fixtures.json an object rather than an arrayThis is recommended by the GDS API guidance (https://www.gov.uk/guidance/gds-api-technical-and-data-standards#use-json) and makes it easier for us to add additional properties in the future This seems like a sensible suggestion to make our implementation more future-proof and reduce the possibility that we need to make any breaking changes. I’m also going to suggest we add the component name into the fixtures JSON so users don’t need to analyse the file path to get the component name. Handling
|
All of this sound sensible to me 👍🏻
Huh. I am surprised, I thought we had a few components that supported it! We have an open issue to make it possible to
I think we could still consider adding tests for the caller functionality, but equally I think this is something we could look at adding this in the future? I don't see it as a hard requirement for the initial implementation. However, suggest if we do so we make it a top-level property of the fixture object, rather than treating it as a special case in {
"examples": [
{
"name": "default",
"options": {
"legend": {
"text": "What is your address?"
}
},
"caller": "<p>Hello world</p>",
"html": "<fieldset class=\"govuk-fieldset\">\n<legend class=\"govuk-fieldset__legend\">What is your address?</legend>\n<p>Hello World</p>\n</fieldset>"
}
]
}
I think we should do this regardless, as I think we should be treating |
Added the following implementation details to the relevant cards:
|
What
Review any feedback we receive on the test fixtures proposal.
Why
We have submitted the test fixtures proposal for feedback on the original issue. The deadline for comments is 5pm on 4th August, so we should review the comments after that.
The text was updated successfully, but these errors were encountered: