From b3e92a4800c4d6dd388cb7a7b7539a01ea1a8350 Mon Sep 17 00:00:00 2001 From: Oliver Byford Date: Fri, 8 Jan 2021 15:08:41 +0000 Subject: [PATCH] Test for display attribute on header fallback png --- src/govuk/components/header/template.test.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/govuk/components/header/template.test.js b/src/govuk/components/header/template.test.js index fcd2d219180..3f66458b86b 100644 --- a/src/govuk/components/header/template.test.js +++ b/src/govuk/components/header/template.test.js @@ -226,6 +226,10 @@ describe('header', () => { // Cheerio converts xhref to href - https://github.com/cheeriojs/cheerio/issues/1101 expect($fallbackImage.attr('href')).toEqual('data:,') }) + + it('hides the image when SVG is supported by using the SVG display attribute', () => { + expect($fallbackImage.attr('display')).toEqual('none') + }) }) }) })