Skip to content

Commit

Permalink
Add accessibility checks to acceptance tests
Browse files Browse the repository at this point in the history
Closes #26
  • Loading branch information
giggio committed Jan 9, 2017
1 parent 3eb23a1 commit 587848a
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 16 deletions.
2 changes: 2 additions & 0 deletions package.json
Expand Up @@ -105,6 +105,8 @@
"merge-stream": "^1.0.0",
"mocha": "^3.2.0",
"phantomjs-prebuilt": "2.1.8",
"protractor": "^4.0.14",
"protractor-accessibility-plugin": "^0.3.0",
"run-sequence": "^1.2.2",
"sinon": "^1.17.3",
"sinon-chai": "^2.8.0",
Expand Down
5 changes: 4 additions & 1 deletion public/app/app.component.scss
@@ -1,3 +1,6 @@
h1 {
color: red
color: red;
}
a.nav-item.nav-link {
color: yellow;
}
2 changes: 1 addition & 1 deletion server/views/index.pug
@@ -1,4 +1,4 @@
html
html(lang="pt")
head
title TransEmpregos
meta(charset="UTF-8")
Expand Down
5 changes: 5 additions & 0 deletions test/protractor.config.ts
Expand Up @@ -12,6 +12,11 @@ exports.config = {
slow: 3000,
timeout: 4000
},
plugins: [{
axe: true,
chromeA11YDevTools: true,
package: 'protractor-accessibility-plugin'
}],
rootElement: 'trans-app',
baseUrl: 'http://localhost:3000',
useAllAngular2AppRoots: true
Expand Down
62 changes: 48 additions & 14 deletions yarn.lock
Expand Up @@ -202,6 +202,10 @@ accepts@1.3.3, accepts@^1.2.2, accepts@~1.3.3:
mime-types "~2.1.11"
negotiator "0.6.1"

accessibility-developer-tools@^2.9.0-rc.0:
version "2.11.0"
resolved "https://registry.yarnpkg.com/accessibility-developer-tools/-/accessibility-developer-tools-2.11.0.tgz#2b669c802671672aed5c61c42a782082a2fc7d2c"

acorn-globals@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-3.0.0.tgz#1a64dd8fa761288594620649526e2625917a56c6"
Expand Down Expand Up @@ -420,6 +424,20 @@ aws4@^1.2.1:
version "1.5.0"
resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.5.0.tgz#0a29ffb79c31c9e712eeb087e8e7a64b4a56d755"

axe-core@^2.0.5:
version "2.1.7"
resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-2.1.7.tgz#4f66f2b3ee3b58ec2d3db4339dd124c5b33b79c3"

axe-core@~1.1.0:
version "1.1.1"
resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-1.1.1.tgz#ae9da5da8ab4f1041907f1f5d8dfe39c946a92c5"

axe-webdriverjs@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/axe-webdriverjs/-/axe-webdriverjs-0.2.0.tgz#5e31edaf6e9ba33442762cfd85de3a07473c1155"
dependencies:
axe-core "~1.1.0"

babel-code-frame@^6.20.0:
version "6.20.0"
resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.20.0.tgz#b968f839090f9a8bc6d41938fb96cb84f7387b26"
Expand Down Expand Up @@ -2753,6 +2771,10 @@ hosted-git-info@^2.1.4:
version "2.1.5"
resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.1.5.tgz#0ba81d90da2e25ab34a332e6ec77936e1598118b"

html-entities@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-1.2.0.tgz#41948caf85ce82fed36e4e6a0ed371a6664379e2"

http-assert@^1.1.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/http-assert/-/http-assert-1.2.0.tgz#d6392e6f6519def4e340266b35096db6d3feba00"
Expand Down Expand Up @@ -4570,7 +4592,19 @@ proto-list@~1.2.1:
version "1.2.4"
resolved "https://registry.yarnpkg.com/proto-list/-/proto-list-1.2.4.tgz#212d5bfe1318306a420f6402b8e26ff39647a849"

"protractor@>=4 <5":
protractor-accessibility-plugin@^0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/protractor-accessibility-plugin/-/protractor-accessibility-plugin-0.3.0.tgz#b480ddc9a38f911df1967d5e96fe26e1b26bfbe3"
dependencies:
accessibility-developer-tools "^2.9.0-rc.0"
axe-core "^2.0.5"
axe-webdriverjs "^0.2.0"
html-entities "^1.2.0"
lodash "^3.10.1"
q "^1.4.1"
request "^2.65.0"

"protractor@>=4 <5", protractor@^4.0.14:
version "4.0.14"
resolved "https://registry.yarnpkg.com/protractor/-/protractor-4.0.14.tgz#efc4a877fac3a182a9dded26cd5869f4762fd172"
dependencies:
Expand Down Expand Up @@ -4990,56 +5024,56 @@ request@2, request@2.78.0, request@^2.61.0, request@^2.78.0:
tough-cookie "~2.3.0"
tunnel-agent "~0.4.1"

request@^2.79.0:
version "2.79.0"
resolved "https://registry.yarnpkg.com/request/-/request-2.79.0.tgz#4dfe5bf6be8b8cdc37fcf93e04b65577722710de"
request@^2.65.0, request@~2.74.0:
version "2.74.0"
resolved "https://registry.yarnpkg.com/request/-/request-2.74.0.tgz#7693ca768bbb0ea5c8ce08c084a45efa05b892ab"
dependencies:
aws-sign2 "~0.6.0"
aws4 "^1.2.1"
bl "~1.1.2"
caseless "~0.11.0"
combined-stream "~1.0.5"
extend "~3.0.0"
forever-agent "~0.6.1"
form-data "~2.1.1"
form-data "~1.0.0-rc4"
har-validator "~2.0.6"
hawk "~3.1.3"
http-signature "~1.1.0"
is-typedarray "~1.0.0"
isstream "~0.1.2"
json-stringify-safe "~5.0.1"
mime-types "~2.1.7"
node-uuid "~1.4.7"
oauth-sign "~0.8.1"
qs "~6.3.0"
qs "~6.2.0"
stringstream "~0.0.4"
tough-cookie "~2.3.0"
tunnel-agent "~0.4.1"
uuid "^3.0.0"

request@~2.74.0:
version "2.74.0"
resolved "https://registry.yarnpkg.com/request/-/request-2.74.0.tgz#7693ca768bbb0ea5c8ce08c084a45efa05b892ab"
request@^2.79.0:
version "2.79.0"
resolved "https://registry.yarnpkg.com/request/-/request-2.79.0.tgz#4dfe5bf6be8b8cdc37fcf93e04b65577722710de"
dependencies:
aws-sign2 "~0.6.0"
aws4 "^1.2.1"
bl "~1.1.2"
caseless "~0.11.0"
combined-stream "~1.0.5"
extend "~3.0.0"
forever-agent "~0.6.1"
form-data "~1.0.0-rc4"
form-data "~2.1.1"
har-validator "~2.0.6"
hawk "~3.1.3"
http-signature "~1.1.0"
is-typedarray "~1.0.0"
isstream "~0.1.2"
json-stringify-safe "~5.0.1"
mime-types "~2.1.7"
node-uuid "~1.4.7"
oauth-sign "~0.8.1"
qs "~6.2.0"
qs "~6.3.0"
stringstream "~0.0.4"
tough-cookie "~2.3.0"
tunnel-agent "~0.4.1"
uuid "^3.0.0"

require-directory@^2.1.1:
version "2.1.1"
Expand Down

0 comments on commit 587848a

Please sign in to comment.