Skip to content

Commit

Permalink
fixed linting on files changed
Browse files Browse the repository at this point in the history
  • Loading branch information
tejpowar committed Apr 8, 2024
1 parent a84000e commit 0fb87a4
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 30 deletions.
23 changes: 11 additions & 12 deletions ui/cypress/e2e/standards/list.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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`);
Expand Down Expand Up @@ -185,5 +185,4 @@ describe('Standards Listing Index', () => {
});
});
});

});
9 changes: 3 additions & 6 deletions ui/schema/future-standards/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -360,12 +360,9 @@ const schema = [
label: 'Legal authority',
format: (val) => {
let legalAuthorityTitles = val.legalAuthority.join(', <br />');
const mdBlock = `${legalAuthorityTitles}<p> ${val.legalAuthorityDescription}</p>`
return (
val && (
<MarkdownBlock md={mdBlock} />
)
)}
const mdBlock = `${legalAuthorityTitles}<p> ${val.legalAuthorityDescription}</p>`;
return val && <MarkdownBlock md={mdBlock} />;
},
},
trusted_by: {
hide_when_empty: true,
Expand Down
9 changes: 3 additions & 6 deletions ui/schema/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -355,12 +355,9 @@ const schema = [
label: 'Legal authority',
format: (val) => {
let legalAuthorityTitles = val.legalAuthority.join(', <br />');
const mdBlock = `${legalAuthorityTitles}<p> ${val.legalAuthorityDescription}</p>`
return (
val && (
<MarkdownBlock md={mdBlock} />
)
)}
const mdBlock = `${legalAuthorityTitles}<p> ${val.legalAuthorityDescription}</p>`;
return val && <MarkdownBlock md={mdBlock} />;
},
},
trusted_by: {
hide_when_empty: true,
Expand Down
9 changes: 3 additions & 6 deletions ui/schema/published-standards/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -354,12 +354,9 @@ const schema = [
label: 'Legal authority',
format: (val) => {
let legalAuthorityTitles = val.legalAuthority.join(', <br />');
const mdBlock = `${legalAuthorityTitles}<p> ${val.legalAuthorityDescription}</p>`
return (
val && (
<MarkdownBlock md={mdBlock} />
)
)}
const mdBlock = `${legalAuthorityTitles}<p> ${val.legalAuthorityDescription}</p>`;
return val && <MarkdownBlock md={mdBlock} />;
},
},
trusted_by: {
hide_when_empty: true,
Expand Down

0 comments on commit 0fb87a4

Please sign in to comment.