Skip to content

Commit

Permalink
Merge pull request #2163 from alphagov/add-missing-schemas
Browse files Browse the repository at this point in the history
Add missing schemas to prevent `Etl::Edition::Content::Parser::InvalidSchemaError`
  • Loading branch information
AgaDufrat authored Oct 16, 2024
2 parents f042706 + 1f1e2da commit 244b32b
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 7 deletions.
15 changes: 11 additions & 4 deletions app/domain/etl/edition/content/parsers/no_content.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,39 +5,46 @@ def parse(_json)

def schemas
%w[
coronavirus_landing_page
coming_soon
completed_transaction
coronavirus_landing_page
embassies_index
external_content
facet
facet_group
facet_value
field_of_operation
generic
government
historic_appointments
historic_appointment
homepage
how_government_works
knowledge_alpha
landing_page
ministers_index
organisations_homepage
person
placeholder
placeholder_corporate_information_page
placeholder_ministerial_role
placeholder_organisation
placeholder_person
placeholder_policy_area
placeholder_topical_event
placeholder_world_location
placeholder_worldwide_organisation
placeholder_person
placeholder
policy
redirect
role
role_appointment
smart_answer
special_route
substitute
topic
world_location
vanish
world_index
world_location
]
end
end
14 changes: 11 additions & 3 deletions spec/domain/etl/edition/content/no_content_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,30 +15,38 @@
facet
facet_group
facet_value
field_of_operation
generic
government
historic_appointments
historic_appointment
homepage
how_government_works
knowledge_alpha
landing_page
ministers_index
organisations_homepage
person
placeholder
placeholder_corporate_information_page
placeholder_ministerial_role
placeholder_organisation
placeholder_person
placeholder_policy_area
placeholder_topical_event
placeholder_world_location
placeholder_worldwide_organisation
placeholder_person
placeholder
policy
redirect
role
role_appointment
smart_answer
special_route
substitute
topic
world_location
vanish
world_index
world_location
]
no_content_schemas.each do |schema|
json = build_raw_json(schema_name: schema, body: "<p>Body for #{schema}</p>")
Expand Down

0 comments on commit 244b32b

Please sign in to comment.