ember-a11y / ember-a11y-testing

A suite of accessibility tests that can be run within the Ember testing framework
MIT License
137 stars 49 forks source link

feat: add qunit config #448

Open GreatWizard opened 1 year ago

GreatWizard commented 1 year ago

Features

Add QUnit config

QUnit and Testem integration

You can setup a new configuration checkbox in QUnit and Testem by using the setupQUnitA11yAudit When the checkbox is checked, it will set enableA11yAudit as a query param.

To use, import and invoke the setup function, passing in your QUnit instance:

// tests/test-helper.js
import Application from 'my-app/app';
import config from 'my-app/config/environment';
import * as QUnit from 'qunit';
import { setApplication } from '@ember/test-helpers';
import { start } from 'ember-qunit';
import { setupGlobalA11yHooks, setupQUnitA11yAudit } from 'ember-a11y-testing/test-support';
setApplication(Application.create(config.APP));

setupGlobalA11yHooks(() => true);
setupQUnitA11yAudit(QUnit);

start();

Here is the result in Testem:

Capture d’écran 2022-10-20 à 14 28 12
danwenzel commented 1 year ago

This is awesome! I can't wait to not have to fumble with manually removing and adding the query param! 🎉

MelSumner commented 1 month ago

@drewlee I made the change you suggested (trying to catch up on this repo), any chance you could give it another look?