angular / protractor-accessibility-plugin

Runs a set of accessibility audits
MIT License
266 stars 37 forks source link

Update axe-webdriverjs to 0.5.0 #25

Open evilaliv3 opened 7 years ago

evilaliv3 commented 7 years ago

@sjelin could you upgrade protractor-accessibility-plugin to use axe-webdriverjs?

axe-webdriverjs 0.2.0 is still coupled to selenium-webdriver@^2.46.1 and this makes it incompatible with protractor 3.0.0 that is embedding selenium 3.0.1.

\cc @juliemr

sjelin commented 7 years ago

Yeah send us a PR

evilaliv3 commented 7 years ago

@sjelin i was about to implement the patch and retesting if it work without changes or requires some adaptation but it seems that the tests are not working already in the current master.

could you please recheck?

i've tested running npm test but i'm getting:

evilaliv3@remotehost:~/Devel/clean/protractor-accessibility-plugin$ npm test

> protractor-accessibility-plugin@0.3.0 test /home/evilaliv3/Devel/clean/protractor-accessibility-plugin
> node test.js

running: node node_modules/protractor/bin/protractor spec/successConfig.js
[09:48:40] I/launcher - Running 1 instances of WebDriver
[09:48:40] I/hosted - Using the selenium server at http://localhost:4444/wd/hub
[09:48:40] E/launcher - Error code: 135
[09:48:40] E/launcher - Error message: ECONNREFUSED connect ECONNREFUSED 127.0.0.1:4444
[09:48:40] E/launcher - Error: ECONNREFUSED connect ECONNREFUSED 127.0.0.1:4444
    at ClientRequest.<anonymous> (/home/evilaliv3/Devel/clean/protractor-accessibility-plugin/node_modules/selenium-webdriver/http/index.js:238:15)
    at emitOne (events.js:96:13)
    at ClientRequest.emit (events.js:188:7)
    at Socket.socketErrorListener (_http_client.js:310:9)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at emitErrorNT (net.js:1278:8)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickCallback (internal/process/next_tick.js:98:9)
From: Task: WebDriver.createSession()
    at Function.createSession (/home/evilaliv3/Devel/clean/protractor-accessibility-plugin/node_modules/selenium-webdriver/lib/webdriver.js:777:24)
    at Function.createSession (/home/evilaliv3/Devel/clean/protractor-accessibility-plugin/node_modules/selenium-webdriver/chrome.js:709:29)
    at createDriver (/home/evilaliv3/Devel/clean/protractor-accessibility-plugin/node_modules/selenium-webdriver/index.js:167:33)
    at Builder.build (/home/evilaliv3/Devel/clean/protractor-accessibility-plugin/node_modules/selenium-webdriver/index.js:623:16)
    at Hosted.getNewDriver (/home/evilaliv3/Devel/clean/protractor-accessibility-plugin/node_modules/protractor/lib/driverProviders/driverProvider.ts:60:29)
    at Runner.createBrowser (/home/evilaliv3/Devel/clean/protractor-accessibility-plugin/node_modules/protractor/lib/runner.ts:225:39)
    at q.then.then (/home/evilaliv3/Devel/clean/protractor-accessibility-plugin/node_modules/protractor/lib/runner.ts:391:27)
    at _fulfilled (/home/evilaliv3/Devel/clean/protractor-accessibility-plugin/node_modules/q/q.js:834:54)
    at self.promiseDispatch.done (/home/evilaliv3/Devel/clean/protractor-accessibility-plugin/node_modules/q/q.js:863:30)
    at Promise.promise.promiseDispatch (/home/evilaliv3/Devel/clean/protractor-accessibility-plugin/node_modules/q/q.js:796:13)
[09:48:40] E/launcher - Process exited with error code 135
>>> fail: Error: expecting exit code: 0, actual: 135
running: node node_modules/protractor/bin/protractor spec/failureConfig.js
[09:48:41] I/launcher - Running 1 instances of WebDriver
[09:48:41] I/hosted - Using the selenium server at http://localhost:4444/wd/hub
[09:48:41] E/launcher - Error code: 135
[09:48:41] E/launcher - Error message: ECONNREFUSED connect ECONNREFUSED 127.0.0.1:4444
[09:48:41] E/launcher - Error: ECONNREFUSED connect ECONNREFUSED 127.0.0.1:4444
    at ClientRequest.<anonymous> (/home/evilaliv3/Devel/clean/protractor-accessibility-plugin/node_modules/selenium-webdriver/http/index.js:238:15)
    at emitOne (events.js:96:13)
    at ClientRequest.emit (events.js:188:7)
    at Socket.socketErrorListener (_http_client.js:310:9)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at emitErrorNT (net.js:1278:8)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickCallback (internal/process/next_tick.js:98:9)
From: Task: WebDriver.createSession()
    at Function.createSession (/home/evilaliv3/Devel/clean/protractor-accessibility-plugin/node_modules/selenium-webdriver/lib/webdriver.js:777:24)
    at Function.createSession (/home/evilaliv3/Devel/clean/protractor-accessibility-plugin/node_modules/selenium-webdriver/chrome.js:709:29)
    at createDriver (/home/evilaliv3/Devel/clean/protractor-accessibility-plugin/node_modules/selenium-webdriver/index.js:167:33)
    at Builder.build (/home/evilaliv3/Devel/clean/protractor-accessibility-plugin/node_modules/selenium-webdriver/index.js:623:16)
    at Hosted.getNewDriver (/home/evilaliv3/Devel/clean/protractor-accessibility-plugin/node_modules/protractor/lib/driverProviders/driverProvider.ts:60:29)
    at Runner.createBrowser (/home/evilaliv3/Devel/clean/protractor-accessibility-plugin/node_modules/protractor/lib/runner.ts:225:39)
    at q.then.then (/home/evilaliv3/Devel/clean/protractor-accessibility-plugin/node_modules/protractor/lib/runner.ts:391:27)
    at _fulfilled (/home/evilaliv3/Devel/clean/protractor-accessibility-plugin/node_modules/q/q.js:834:54)
    at self.promiseDispatch.done (/home/evilaliv3/Devel/clean/protractor-accessibility-plugin/node_modules/q/q.js:863:30)
    at Promise.promise.promiseDispatch (/home/evilaliv3/Devel/clean/protractor-accessibility-plugin/node_modules/q/q.js:796:13)
[09:48:41] E/launcher - Process exited with error code 135
>>> fail: Error: expecting exit code: 1, actual: 135
Summary: fail
npm ERR! Test failed.  See above for more details.
sjelin commented 7 years ago

I actually cannot check that, as I don't have access to my dev machine at the moment. It looks like Protractor can't find the selenium sever though. Are you booting up webdriver-manager?

evilaliv3 commented 7 years ago

You are actually right, i was missing that. sorry for the issues.

Just tested the update and tests passes.

Going to make a pull requests.

evilaliv3 commented 7 years ago

Done ;)

Would it be possible to have soon a release including this?

sjelin commented 7 years ago

Hopefully!

evilaliv3 commented 7 years ago

it's a long way to the top if you wanna rock 'n' roll!

mfrankwork commented 7 years ago

Thanks for addressing the axe-webdriverjs update. Is there any news on when this will make it into a release?

lawlesscreation commented 5 years ago

Quite an old thread and I'm not sure how protractor accessibility plugin is being maintained but this is a bit of a blocker for our team.

We're getting false positives as the new ARIA 1.1 features (added to axe-core 2.4.0 https://github.com/GoogleChrome/lighthouse/issues/3282) are not supported by the current dependencies of protractor accessibility plugin.

It seems if we manually update the axe-webdriverjs package to 0.5.0 it fixes this issue.

The really odd thing is, I don't understand why NPM doesn't download 0.5.0 anyway? It should get the latest minor version looking at the package.json but for some reason it's not.

"axe-webdriverjs": "^0.2.0"