Skip to content

dequelabs/axe-core

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

README

ks-integration allows integration tests to be run with Mocha and Selenium.

To run integration tests

Make sure that Firefox is installed and on the path. Currently does not work with any version of Firefox above 31.

  • grunt test

To write integration tests

  • In test/integration/rules create a full HTML page with your test cases (e.g., test.html)
  • In that same directory, create a JSON file with the same basename (e.g. test.json) with the following properties:
    • description - Test name
    • rule - The id of the rule you're testing
    • violations - An array of selector arrays in the same format that is returned by a11ycheck, for those nodes that are expected to give violations
    • passes - The same array of arrays, for those nodes that are expected to pass

Kensington Rule Engine

Requirements

  1. NodeJS
  2. Bower (after installing Node and NPM run npm install -g bower)

Building

  1. Clone this repo
  2. Open a Terminal or Command Prompt and run npm install && bower install
  3. grunt build to build distributables

Testing

Fixtures are generated by templates, so that we do not have to manually manage references to tests and source files. Due to Cross-Origin restrictions, you must run a fixture server before running the tests.

There are a couple options for running tests and the fixture server:

  1. grunt server - This will generate the fixtures and start a server at http://localhost:9876/
  2. grunt connect watch - This will start the server and also re-generate fixtures and distributables any time a source file or test is changed.