canvas-lms/spec/javascripts
Jennifer Stern 337a882536 Add automated a11y testing helper for qunit tests
refs SD-743
fixes CNVS-26721

This adds a qunit assertion helper that wraps the aXe library. Rules can
be ignored by passing an array of rules in the options argument to the
helper.

e.g.
`assertions.isAccessible $html, done, { ignores: 'aria-valid-attr-value'}`

Test plan:

Undo the changes that I made to the DashboardCard.jsx component.
You should get a warning about invalid aria attributes because the
aria-controls attribute is referring to an element that doesn't exist.

To fix this, I modified the component to hide/show the color picker so that
the aria attribute value is valid.

If you add the ignores option as described above, the test should pass
without my changes.

To verify the dashboard card color picker changes:

- Verify that you can click or use the ENTER key on a dashboard card
cog button to bring up the color picker
- Verify that you can select a color and apply it to the card.
- Verify that you can click outside the color picker to close it
- Verify that you can hit the ESC key to close the color picker
- When the color picker is closed, focus should return to the the cog
button trigger
- After selecting a color you should be able to open the color picker again
and select a different color

The color picker in the Calendar should be regression tested as well.

Change-Id: I5d5bfdaf39df1e0cb8776144771baeb1ed31ff2a
Reviewed-on: https://gerrit.instructure.com/70638
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Colleen Palmer <colleen@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Tested-by: Jenkins
2016-02-02 17:39:11 +00:00
..
collections Add new permissions management ui (role overrides) 2013-01-03 10:05:51 -07:00
fixtures new avatars upload image function 2014-03-07 18:52:28 +00:00
jsx let people write specs in jsx 2015-12-05 09:52:45 +00:00
support Add automated a11y testing helper for qunit tests 2016-02-02 17:39:11 +00:00
load_tests.js make qunit test order shuffling reproducible 2015-06-03 16:22:20 +00:00
qunit.serializer-fix.js clean up JS tests and integrate karma 2014-02-07 19:40:37 +00:00
requirejs_config.js.erb upgraded requirejs to 2.1.10 2014-03-10 22:27:53 +00:00
runner.html.erb spec: upgrade sinon to latest version: 1.17.2 2015-11-03 16:49:50 +00:00
webpack_ember_spec_index.js glob webpack unit tests 2016-01-29 00:08:50 +00:00
webpack_spec_index.js glob webpack unit tests 2016-01-29 00:08:50 +00:00