Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add qunit config #448

Merged
merged 3 commits into from
Aug 27, 2024
Merged

Conversation

GreatWizard
Copy link
Contributor

@GreatWizard GreatWizard commented Oct 24, 2022

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
Copy link
Contributor

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

Copy link
Contributor

@drewlee drewlee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding this feature! It is indeed helpful and we do something similar in our apps. A couple of minor suggestions, otherwise looks good.

README.md Outdated Show resolved Hide resolved
addon-test-support/setup-qunit.ts Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@MelSumner MelSumner requested a review from drewlee July 10, 2024 21:15
@MelSumner
Copy link
Member

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

@MelSumner MelSumner merged commit 78f92c7 into ember-a11y:master Aug 27, 2024
12 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants