Skip to content

Commit 9c87e89

Browse files
tim-s-ccsdependabot[bot]
authored andcommitted
Make updates for new fixtures in GOV.UK Frontend
1 parent 715a113 commit 9c87e89

File tree

4 files changed

+22
-2
lines changed

4 files changed

+22
-2
lines changed

spec/ccs/frontend_helpers/govuk_frontend/cookie_banner/fixtures_spec.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,5 +255,14 @@
255255
expect(result).to eq_html(fixture_html.gsub('<button type=', '<button name="button" type=').gsub('hidden ', 'hidden="hidden" '))
256256
end
257257
end
258+
259+
context "when the fixture is 'rebrand'" do
260+
let(:fixture_name) { 'rebrand' }
261+
let(:result) { govuk_cookie_banner(fixture_options[:messages]) }
262+
263+
it 'has HTML matching the fixture' do
264+
expect(result).to eq_html(fixture_html)
265+
end
266+
end
258267
end
259268
end

spec/ccs/frontend_helpers/govuk_frontend/cookie_banner/validate_fixtures_spec.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525
'button attributes' => true,
2626
'link classes' => true,
2727
'link attributes' => true,
28-
'full banner hidden' => true
28+
'full banner hidden' => true,
29+
'rebrand' => true
2930
}
3031

3132
tested_fixtures = FixturesLoader.get_tested_fixtures(:govuk_frontend, component_name)

spec/ccs/frontend_helpers/govuk_frontend/service_navigation/fixtures_spec.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,5 +263,14 @@
263263
expect(result).to eq_html(fixture_html)
264264
end
265265
end
266+
267+
context "when the fixture is 'rebrand'" do
268+
let(:fixture_name) { 'rebrand' }
269+
let(:result) { govuk_service_navigation(navigation: { items: fixture_options[:navigation] }) }
270+
271+
it 'has HTML matching the fixture' do
272+
expect(result).to eq_html(fixture_html)
273+
end
274+
end
266275
end
267276
end

spec/ccs/frontend_helpers/govuk_frontend/service_navigation/validate_fixtures_spec.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@
3131
'with navigation having empty values' => true,
3232
'with navigation having only empty values' => true,
3333
'with navigation being an empty array' => true,
34-
'with slotted content' => false
34+
'with slotted content' => false,
35+
'rebrand' => true
3536
}
3637

3738
tested_fixtures = FixturesLoader.get_tested_fixtures(:govuk_frontend, component_name)

0 commit comments

Comments
 (0)