0.1.5 • Published 7 years ago

nightwatch-axe v0.1.5

Weekly downloads
41
License
MIT
Repository
github
Last release
7 years ago

Nightwatch Axe

Circle CI

Nightwatch.js custom commands for aXe.

Install

Install using yarn or npm

yarn add nightwatch-axe

Update your nightwatch config file with new paths to command and assertion files

{
  custom_commands_path : [
    "./node_modules/nightwatch-axe/src/commands"
  ]
}

aXe Commands

axeInject()

Injects the axe-core js library into your test page

export default {
  '@tags': ['accessibility'],

  'Page Is Accessible'(browser) {
    ...
    
    browser.axeInject()
  }
}

axeRun(options)

Analyzes the current page against applied axe rules

Parameter NameParameter TypeDescription
selectorstringcss selector to area under test
optionsobjectset of axe options
export default {
  '@tags': ['accessibility'],

  'Page Is Accessible'(browser) {
    ...
    
    browser.axeInject()
    browser.axeRun('#main', {
      rules: {
        'color-contrast': { enabled: false }
      }
    })
  }
}
0.1.5

7 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago