You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This didn't surface validation issues introduced when adding in some
compacting via the GraphqlContentItemService. On the world index,
For example:
- the schema requires a description property even if it's nil
- the service would remove the property from the real content item
because the description is nil
- the test would include a description via the factory-generated
edition, so we weren't testing the behaviour when the description is
nil
I tried using `GovukSchemas::RandomSchemaGenerator` to generate a more
realistic content item, but it's only vaguely realistic. I tried adding
a new strategy to the generator to produce a minimal valid content item,
but it required significant processing to be in the right shape to pass
into a FactoryBot `create` method. I tried PUTting it, but that requires
some stubbing
We still think this provides some value insofar as telling us if we
produce all the expected fields when they are present in the edition,
but we could introduce some other kind of processing in the future with
which this might not catch issues, hence the note
A more thorough approach when introducing new content types is to
validate against a replicated database (real data) using
`script/live_content/validate` (a bulk version is incoming)
0 commit comments