diff --git a/cypress/integration/a11y.lighttheme.spec.js b/cypress/integration/a11y.lighttheme.spec.js index 268a66951..0d1225190 100644 --- a/cypress/integration/a11y.lighttheme.spec.js +++ b/cypress/integration/a11y.lighttheme.spec.js @@ -7,8 +7,14 @@ const A11Y_OPTS = { type: 'tag', values: ['section508', 'best-practice', 'wcag21aa', 'wcag2aa'], }, + rules: { + 'color-contrast': { enabled: false }, + 'page-has-heading-one': { enabled: false }, + }, }; +const elmExclude = '[style*="padding-left: calc(1ch + 6px)"]'; + context('Accessibility (a11y)', () => { context('Logged out', () => { it('overview', () => { @@ -17,7 +23,8 @@ context('Accessibility (a11y)', () => { cy.visit('/account/login'); cy.injectAxe(); cy.wait(500); - cy.checkA11y({exclude: ['[style*="padding-left: calc(1ch + 6px)"]']}, A11Y_OPTS); + // excludes accessibility testing for Elm pop-up that only appears in Cypress and not on the actual UI + cy.checkA11y({exclude: [elmExclude]}, A11Y_OPTS); }); }); @@ -88,7 +95,8 @@ context('Accessibility (a11y)', () => { cy.injectAxe(); cy.wait(500); cy.clickSteps(); - cy.checkA11y({exclude: ['[style*="padding-left: calc(1ch + 6px)"]']}, A11Y_OPTS); + // excludes accessibility testing for Elm pop-up that only appears in Cypress and not on the actual UI + cy.checkA11y({exclude: [elmExclude]}, A11Y_OPTS); }); }); }); diff --git a/cypress/integration/a11y.spec.js b/cypress/integration/a11y.spec.js index 966f76c57..13300bbd2 100644 --- a/cypress/integration/a11y.spec.js +++ b/cypress/integration/a11y.spec.js @@ -3,26 +3,31 @@ */ const A11Y_OPTS = { - // runOnly: { - // type: 'tag', - // values: ['section508', 'best-practice', 'wcag21aa', 'wcag2aa'], - // }, + runOnly: { + type: 'tag', + values: ['section508', 'best-practice', 'wcag21aa', 'wcag2aa'], + }, + rules: { + 'color-contrast': { enabled: false }, + 'page-has-heading-one': { enabled: false }, + }, }; context('Accessibility (a11y)', () => { - // context('Logged out', () => { - // it.skip('overview', () => { - // cy.clearSession(); - // cy.visit('/account/login'); - // cy.injectAxe(); - // cy.wait(500); - // cy.checkA11y(A11Y_OPTS); - // }); - // }); + context('Logged out', () => { + it.skip('overview', () => { + //cy.clearSession(); + cy.visit('/account/login'); + cy.injectAxe(); + cy.wait(500); + // excludes accessibility testing for Elm pop-up that only appears in Cypress and not on the actual UI + cy.checkA11y({exclude: [elmExclude]}, A11Y_OPTS); + }); + }); context('Logged in', () => { beforeEach(() => { - cy.clearSession(); + //cy.clearSession(); cy.server(); // overview page cy.route('GET', '*api/v1/user*', 'fixture:favorites.json'); @@ -73,12 +78,8 @@ context('Accessibility (a11y)', () => { cy.checkA11yForPage('/github/octocat', A11Y_OPTS); }); - it.skip('hooks page', () => { - cy.login('/github/octocat/hooks'); - cy.injectAxe(); - cy.wait(500); - cy.get('[data-test=hook]').click({ multiple: true }); - cy.checkA11y(A11Y_OPTS); + it('hooks page', () => { + cy.checkA11yForPage('/github/octocat/hooks', A11Y_OPTS); }); it.skip('build page', () => { @@ -86,7 +87,8 @@ context('Accessibility (a11y)', () => { cy.injectAxe(); cy.wait(500); cy.clickSteps(); - cy.checkA11y(A11Y_OPTS); + // excludes accessibility testing for Elm pop-up that only appears in Cypress and not on the actual UI + cy.checkA11y({exclude: [elmExclude]}, A11Y_OPTS); }); }); }); diff --git a/cypress/support/commands.js b/cypress/support/commands.js index 9753e84b8..edbc27bf7 100644 --- a/cypress/support/commands.js +++ b/cypress/support/commands.js @@ -600,6 +600,7 @@ Cypress.Commands.add('checkA11yForPage', (path = '/', opts = {}) => { cy.login(path); cy.injectAxe(); cy.wait(500); + // excludes accessibility testing for Elm pop-up that only appears in Cypress and not on the actual UI cy.checkA11y({exclude: ['[style*="padding-left: calc(1ch + 6px)"]']}, opts); }); diff --git a/src/elm/Pages/Hooks.elm b/src/elm/Pages/Hooks.elm index 5772bf013..e8240a393 100644 --- a/src/elm/Pages/Hooks.elm +++ b/src/elm/Pages/Hooks.elm @@ -120,7 +120,7 @@ hooksToRows now hooks org repo redeliverHook = -} tableHeaders : Table.Columns tableHeaders = - [ ( Just "-icon", "" ) + [ ( Just "-icon", "Status" ) , ( Nothing, "source" ) , ( Nothing, "created" ) , ( Nothing, "host" )