-
Notifications
You must be signed in to change notification settings - Fork 46
feat: upgrade to axe-core 3.0.0-alpha.9 #46
Conversation
test/integration/shadow-dom.js
Outdated
var script = document.createElement('script'); | ||
script.innerHTML = 'var shadowSupport = document.body && typeof document.body.attachShadow === \'function\';'; | ||
document.documentElement.appendChild(script); | ||
shadowSupported = shadowSupport; |
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.
@WilcoFiers any ideas on how I can get a variable back out of executeAsyncScript
? The shadowSupport check is working, but I can't store it in a variable in the outer scope.
43dab9b
to
f3aa36e
Compare
@WilcoFiers @dylanb I pushed a change that updates axe-webdriverjs to use
It seems like it's getting confused by the two async script calls (the one in my test, and the other one in |
It's also worth noting that I think we should keep the |
Ok, the issue with executeAsyncScript has been resolved. It was failing due to options being null, it just needed to default to an empty object. I also wrapped the body of the analyze function in a Promise so we can resolve and reject based on what axe.run does. |
test/unit/index.js
Outdated
} | ||
}) | ||
.analyze() | ||
.then() |
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 think this is needed.
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.
The then()
call? Or the entire test?
test/unit/index.js
Outdated
@@ -255,5 +255,54 @@ describe('Builder', function () { | |||
done(); | |||
}); | |||
}); | |||
|
|||
it('should pass results to .then() instead of a callback', function (done) { |
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.
We should also have a callback that checks the analyze callback is executed before .then()
.
package.json
Outdated
@@ -64,7 +64,7 @@ | |||
"sinon": "^1.17.3" | |||
}, | |||
"dependencies": { | |||
"axe-core": "^2.5.0", | |||
"axe-core": "^3.0.0-alpha.8", |
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 we should release this with 2.5.0. Maybe we could use npm-install-version
to install axe-core@next
so we can run that shadowDOM test separately. WDYT?
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.
Sounds like more complexity to me. But we can discuss it later.
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.
We talked about doing a release with axe-core 2.6 and the axe.run changes, and a separate Shadow DOM prerelease later. I've separated the changes into two PRs so we can do that.
f88c2ca
to
9b4f8cd
Compare
9b4f8cd
to
500e073
Compare
@WilcoFiers I've updated this PR to remove conflicts. Looks like |
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.
Circle is failing.
That's so odd, the previous builds on this PR didn't have the same timeout issues. I wonder if that means axe-core is significantly slower in alpha.9? That should be including the configurable script timeout, with double the default value. |
The tests are passing now, turns out Circle didn't know how to handle |
dbfd176
to
a5baeb2
Compare
@WilcoFiers is attest-master capable of handling prerelease versions? This PR still needs a version bump and a changelog update.