Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Cannot read property 'run' of undefined at Context.eval #154

Open
afcbpeter1 opened this issue Feb 24, 2023 · 0 comments
Open

Comments

@afcbpeter1
Copy link

afcbpeter1 commented Feb 24, 2023

Hi Im following the documentation and I want a test that runs wcag2a and 2aa issue only but im getting a read property error im not sure why.

`// Define at the top of the spec file or just import it
function terminalLog(violations) {
    cy.task(
      'log',
      `${violations.length} accessibility violation${
        violations.length === 1 ? '' : 's'
      } ${violations.length === 1 ? 'was' : 'were'} detected`
    )
    // pluck specific keys to keep the table readable
    const violationData = violations.map(
      ({ id, impact, description, nodes }) => ({
        id,
        impact,
        description,
        nodes: nodes.length
      })
    )
  
    cy.task('table', violationData)
  }


describe('Womens T20 Cricket Test',() => {
    it('Has no detectable a11y violations on load (with custom parameters)', () => {
        cy.visit('https://www.skysports.com');
        cy.iframe('#sp_message_iframe_758392').find('.sp_message-accept-button').should('be.visible').click()
        cy.checkA11y(null, null, terminalLog, {
          runOnly: {
            type: 'tag',
            values: ['wcag2a', 'wcag2aa', 'wcag2aaa']
          }
        })
      })
    });`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant