KINGgemeenten/accessibilitymonitor — pull request #8 by jessebeach (2014-06-17 19:17:25+00:00)
Title: Updates to the phantomquail.js script to support Success Criteria data

The changes to the script are as follows:

1. ```page.evaluateAsync``` is now called once for all tests. We need the complete test collection run in order to evaluate the Success Criteria.
1. We do one write out to the stream when the Test Collection and all the Success Criteria are evaluated.
1. In the evaluation output, all the tests are under a ```tests``` key and all the Success Criteria are under a ```successCriteria``` key. This will require some refactoring on the KING side in the code that consumes the results file.
1. Success Criteria results are keyed by the criteria name, for example ```wcag:4.1.2```, which itself contains an object with keys that represent the EARL results (passed, failed, untested...) for the criteria. Under each result is an array of objects that contains the selector and html for the case. I included only this much information for now since the individual tests are irrelevant at the Success Criteria level. The full Case object is available in the ```successCriteriaEvaluated``` callback, so more information could be passed through if needed.

I'll cut a patch tag when https://github.com/quailjs/quail/pull/239 is merged so that you have a stable release to merge the changes here against. That should happen in the next 24 hours.