File tree 2 files changed +0
-48
lines changed
2 files changed +0
-48
lines changed Original file line number Diff line number Diff line change @@ -92,32 +92,13 @@ def load_content_item
92
92
content_item [ "links" ] [ "ordered_related_items" ] = content_item [ "links" ] . fetch ( "suggested_ordered_related_items" , [ ] )
93
93
end
94
94
95
- if update_brexit_navigation? ( content_item )
96
- content_item [ "links" ] [ "taxons" ] = taxons_updated_for_brexit_test ( content_item )
97
- end
98
-
99
95
@content_item = PresenterBuilder . new (
100
96
content_item ,
101
97
content_item_path ,
102
98
view_context ,
103
99
) . presenter
104
100
end
105
101
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
-
121
102
def format_banner_links ( links , type )
122
103
links . each . with_index ( 1 ) . map do |( title , base_path ) , index |
123
104
view_context . link_to (
Original file line number Diff line number Diff line change @@ -112,35 +112,6 @@ class GuideTest < ActionDispatch::IntegrationTest
112
112
assert_nil faq_schema
113
113
end
114
114
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
-
144
115
def setup_and_visit_part_in_guide
145
116
@content_item = get_content_example ( "guide" ) . tap do |item |
146
117
chapter_path = "#{ item [ 'base_path' ] } /key-stage-1-and-2"
You can’t perform that action at this time.
0 commit comments