-
Notifications
You must be signed in to change notification settings - Fork 130
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
A11y add axe-puppeteer tests #302
A11y add axe-puppeteer tests #302
Conversation
tests/package.json
Outdated
@@ -15,8 +15,12 @@ | |||
"test:coverage": "npm t -- --coverage", | |||
"test:ci": "npm t -- --ci --colors" | |||
}, | |||
"dependencies": {}, | |||
"dependencies": { | |||
"@babel/runtime": "^7.7.2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this needed? Wouldn't it be a dependency of axe-puppeteer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without it, when I run npm test
I get Cannot find module '@babel/runtime/helpers/interopRequireDefault' from 'index.js'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it tell you which index.js? Sounds like a bug on their end, if they need that dependency it should be included in their pacakge.json.
Could you check the issue trackers for the two new dependencies to see if it has been reported already?
In the meantime, we should move this to dev dependencies, hopefully we can remove it when it get's fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't find an issue for it, but it's from this package https://github.com/WordPress/gutenberg/tree/master/packages/jest-puppeteer-axe which is checking against index.js for @babel/runtime/helpers/interopRequireDefault in the node module when it's built
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see any babel imports in https://github.com/WordPress/gutenberg/blob/master/packages/jest-puppeteer-axe/src/index.js
How did you find out this is the one causing the issue? Is it one of its dependencies?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, so that is only in the packaged code shipped by npm.
Could you open an issue in the repo? Seeing it is a very small project inside a very large project (Gutenberg), it might not be a priority, but we should report it anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this might be the broader issue WordPress/gutenberg#14373 What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that is definitely related to this issue, but it was raised in March and it hasn't had any activity since then. Would you mind creating a PR like this one on that repo? Maybe that will get merged quickly.
WordPress/gutenberg#14374
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have done so here WordPress/gutenberg#18626
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Mark!
We should also create a new test case for checking the help.html page. |
ae5670f
to
f490e8d
Compare
25a5edd
to
e9dfb95
Compare
Co-Authored-By: Carlos Pereira Atencio <carlos@microbit.org>
// disable tab-index as we have values greater than 0 | ||
// and h1 as we aren't using this heading |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Glad to see a comments here and the other tests cases explaining why these rules are ignored, good call 👍
PR looks good, good work Mark! |
Yes, tests pass if the other tickets are merged into this branch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All green now after merging master, thanks Mark!
closes https://github.com/microbit-foundation/platform-software-issue-tracker/issues/409