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

chore: Test against ARIA practices #3144

Merged
merged 10 commits into from
Nov 9, 2021
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 31 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ defaults: &defaults

unix_box: &unix_box
docker:
- image: circleci/node:10-browsers
- image: circleci/node:16-browsers
Copy link
Contributor Author

Choose a reason for hiding this comment

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

So that we get access to Chrome 95

Copy link
Contributor

Choose a reason for hiding this comment

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

Just an fyi, circle is changing how they tag their images (should be cimg/node:16.13-browsers https://circleci.com/developer/images/image/cimg/node). I'll update the tag in another pr because we can also specify using lts-browsers which I think would be good to test on our nightly builds


win_box: &win_box
executor:
Expand Down Expand Up @@ -119,6 +119,16 @@ jobs:
- run: npm run build
- run: npm run test:act

# Run ARIA practices test cases
test_aria_practices:
<<: *defaults
<<: *unix_box
steps:
- checkout
- <<: *restore_dependency_cache_unix
- run: npm run build
- run: npm run test:apg

# Test locale files
test_locales:
<<: *defaults
Expand All @@ -140,7 +150,7 @@ jobs:
- run: npm run test:virtual-rules

# Run the test suite for nightly builds.
test_nightly:
test_nightly_chrome:
<<: *defaults
<<: *unix_box
steps:
Expand All @@ -155,6 +165,18 @@ jobs:
CHROME_BIN="$(which google-chrome-beta)" && echo "CHROME_BIN: $CHROME_BIN"
npm run test -- --browsers Chrome,FirefoxNightly

# Run the test suite for nightly builds.
test_nightly_aria_practices:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We should do this same nightly thing with ACT rules. I'll open that PR when this is merged.

<<: *defaults
<<: *unix_box
steps:
- checkout
- <<: *restore_dependency_cache_unix
- run: npm run build
# install ARIA practices
- run: npm install w3c/aria-practices#main
- run: npm run test:apg

# Test api docs can be built
build_api_docs:
<<: *defaults
Expand Down Expand Up @@ -269,6 +291,9 @@ workflows:
- test_act:
requires:
- test_unix
- test_aria_practices:
requires:
- test_unix
- test_locales:
requires:
- test_unix
Expand Down Expand Up @@ -354,6 +379,9 @@ workflows:
- develop
jobs:
- dependencies_unix
- test_nightly:
- test_nightly_chrome:
Copy link
Member

Choose a reason for hiding this comment

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

How will we know if/when this fails? Is there someone responsible for checking CI logs daily?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, those get kicked out to our #attest-build channel on Slack.

Copy link
Contributor

Choose a reason for hiding this comment

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

I also get emails every night about the run and see if they pass/fail

requires:
- dependencies_unix
- test_nightly_aria_practices:
requires:
- dependencies_unix
9 changes: 9 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,17 @@ module.exports = {
'no-use-before-define': 'off'
}
},
{
files: [
'test/aria-practices/**/*.js'
],
env: {
mocha: true
}
},
{
files: ['test/**/*.js'],
excludedFiles: 'test/aria-practices/**/*.js',
parserOptions: {
ecmaVersion: 5
},
Expand Down
Loading