Skip to content

Commit 6fc0304

Browse files
committed
Revert "Test alternative text for Transition navigation"
This reverts commit b58beb4. We're going to update the transition taxonomy topic to have a new name, based on what we did here. We no longer need this custom code.
1 parent 8183cc1 commit 6fc0304

File tree

2 files changed

+0
-48
lines changed

2 files changed

+0
-48
lines changed

app/controllers/content_items_controller.rb

-19
Original file line numberDiff line numberDiff line change
@@ -92,32 +92,13 @@ def load_content_item
9292
content_item["links"]["ordered_related_items"] = content_item["links"].fetch("suggested_ordered_related_items", [])
9393
end
9494

95-
if update_brexit_navigation?(content_item)
96-
content_item["links"]["taxons"] = taxons_updated_for_brexit_test(content_item)
97-
end
98-
9995
@content_item = PresenterBuilder.new(
10096
content_item,
10197
content_item_path,
10298
view_context,
10399
).presenter
104100
end
105101

106-
def update_brexit_navigation?(content_item)
107-
content_item["content_id"] == "7a616597-c921-47ba-bd50-7e73449e140b" # /visit-europe-1-january-2021
108-
end
109-
110-
def taxons_updated_for_brexit_test(content_item)
111-
content_item["links"]["taxons"].map do |taxon|
112-
taxon["title"] = "The UK and EU transition: new rules for 2021" if brexit_taxon?(taxon)
113-
taxon
114-
end
115-
end
116-
117-
def brexit_taxon?(taxon)
118-
taxon["content_id"] == "d6c2de5d-ef90-45d1-82d4-5f2438369eea"
119-
end
120-
121102
def format_banner_links(links, type)
122103
links.each.with_index(1).map do |(title, base_path), index|
123104
view_context.link_to(

test/integration/guide_test.rb

-29
Original file line numberDiff line numberDiff line change
@@ -112,35 +112,6 @@ class GuideTest < ActionDispatch::IntegrationTest
112112
assert_nil faq_schema
113113
end
114114

115-
test "a specific guide has tweaked Brexit navigation" do
116-
visit_europe_guide_id = "7a616597-c921-47ba-bd50-7e73449e140b"
117-
setup_and_visit_a_guide_with_the_brexit_taxon(visit_europe_guide_id)
118-
119-
assert page.has_css?(".gem-c-step-nav-header__title", text: "The UK and EU transition: new rules for 2021")
120-
end
121-
122-
test "a normal Brexit guide has normal Brexit navigation" do
123-
setup_and_visit_a_guide_with_the_brexit_taxon
124-
125-
assert page.has_css?(".gem-c-step-nav-header__title", text: "Brexit things")
126-
end
127-
128-
def setup_and_visit_a_guide_with_the_brexit_taxon(content_id = nil)
129-
@content_item = get_content_example("guide").tap do |item|
130-
item["content_id"] = content_id if content_id.present?
131-
item["links"]["taxons"] = [brexit_taxon]
132-
stub_content_store_has_item(item["base_path"], item.to_json)
133-
visit_with_cachebust(item["base_path"])
134-
end
135-
end
136-
137-
def brexit_taxon
138-
@brexit_taxon ||= GovukSchemas::Example.find("taxon", example_name: "taxon").tap do |taxon|
139-
taxon["title"] = "Brexit things"
140-
taxon["content_id"] = "d6c2de5d-ef90-45d1-82d4-5f2438369eea" # the real Brexit taxon ID
141-
end
142-
end
143-
144115
def setup_and_visit_part_in_guide
145116
@content_item = get_content_example("guide").tap do |item|
146117
chapter_path = "#{item['base_path']}/key-stage-1-and-2"

0 commit comments

Comments
 (0)