diff --git a/ui/cypress/e2e/standards/list.cy.js b/ui/cypress/e2e/standards/list.cy.js index 955f68f6..8af270d7 100644 --- a/ui/cypress/e2e/standards/list.cy.js +++ b/ui/cypress/e2e/standards/list.cy.js @@ -27,26 +27,26 @@ describe('Standards Listing Index', () => { cy.visit('/published-standards'); let results; - cy.get('span[role="status"]').then($span => { - const text = $span.text() - results = parseInt(text.match(/\d+/)[0]) + cy.get('span[role="status"]').then(($span) => { + const text = $span.text(); + results = parseInt(text.match(/\d+/)[0]); }); cy.get('[title="Requirement"]').click(); cy.get('[type="checkbox"]').check('nationally mandated'); - cy.get('.FilterSummary_filterSection__cz_Lu').contains('X National requirement'); - cy.get('span[role="status"]').then($span => { - const text = $span.text() + cy.get('.FilterSummary_filterSection__cz_Lu').contains( + 'X National requirement' + ); + cy.get('span[role="status"]').then(($span) => { + const text = $span.text(); const filteredResults = parseInt(text.match(/\d+/)[0]); expect(filteredResults).to.be.lessThan(results); - }); - cy.get('#mandated').uncheck('nationally mandated') + cy.get('#mandated').uncheck('nationally mandated'); cy.get('.FilterSummary_widget__RYAmB').should('not.exist'); - cy.get('span[role="status"]').then($span => { - const text = $span.text() + cy.get('span[role="status"]').then(($span) => { + const text = $span.text(); const filteredResults = parseInt(text.match(/\d+/)[0]); expect(filteredResults).to.be.equal(results); - }); it('passes html validation', () => { cy.visit(`/published-standards`); @@ -185,5 +185,4 @@ describe('Standards Listing Index', () => { }); }); }); - }); diff --git a/ui/schema/future-standards/index.js b/ui/schema/future-standards/index.js index 90d320e2..fe55141a 100644 --- a/ui/schema/future-standards/index.js +++ b/ui/schema/future-standards/index.js @@ -360,12 +360,9 @@ const schema = [ label: 'Legal authority', format: (val) => { let legalAuthorityTitles = val.legalAuthority.join(',
'); - const mdBlock = `${legalAuthorityTitles}

${val.legalAuthorityDescription}

` - return ( - val && ( - - ) - )} + const mdBlock = `${legalAuthorityTitles}

${val.legalAuthorityDescription}

`; + return val && ; + }, }, trusted_by: { hide_when_empty: true, diff --git a/ui/schema/index.js b/ui/schema/index.js index e7c890e0..45429dc8 100644 --- a/ui/schema/index.js +++ b/ui/schema/index.js @@ -355,12 +355,9 @@ const schema = [ label: 'Legal authority', format: (val) => { let legalAuthorityTitles = val.legalAuthority.join(',
'); - const mdBlock = `${legalAuthorityTitles}

${val.legalAuthorityDescription}

` - return ( - val && ( - - ) - )} + const mdBlock = `${legalAuthorityTitles}

${val.legalAuthorityDescription}

`; + return val && ; + }, }, trusted_by: { hide_when_empty: true, diff --git a/ui/schema/published-standards/index.js b/ui/schema/published-standards/index.js index e8157805..9e41a442 100644 --- a/ui/schema/published-standards/index.js +++ b/ui/schema/published-standards/index.js @@ -354,12 +354,9 @@ const schema = [ label: 'Legal authority', format: (val) => { let legalAuthorityTitles = val.legalAuthority.join(',
'); - const mdBlock = `${legalAuthorityTitles}

${val.legalAuthorityDescription}

` - return ( - val && ( - - ) - )} + const mdBlock = `${legalAuthorityTitles}

${val.legalAuthorityDescription}

`; + return val && ; + }, }, trusted_by: { hide_when_empty: true,