Skip to content

Commit

Permalink
Add test for navigation label when custom menu button text is set
Browse files Browse the repository at this point in the history
  • Loading branch information
domoscargin committed Aug 10, 2022
1 parent 7eb9590 commit dd0d382
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/govuk/components/header/template.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,15 @@ describe('header', () => {
expect($nav.attr('aria-label')).toEqual('Menu')
})

it('renders navigation label correctly when custom menu button text is set', () => {
const $ = render('header', examples['with custom menu button text'])

const $component = $('.govuk-header')
const $nav = $component.find('nav')

expect($nav.attr('aria-label')).toEqual('Dewislen')
})

it('allows navigation label to be customised', () => {
const $ = render('header', examples['with custom navigation label'])

Expand Down

0 comments on commit dd0d382

Please sign in to comment.