Skip to content

Commit 22e928c

Browse files
authored
build: remove axe checks from e2e tests (#26980)
Removes the code for running Axe against the e2e tests since it wasn't catching many failures. Automated accessibility checks have been set up in g3 which should be a bit closer to what we're looking for during GAR.
1 parent 4f3d4dd commit 22e928c

File tree

7 files changed

+1
-114
lines changed

7 files changed

+1
-114
lines changed

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@
8282
"@angular/platform-browser-dynamic": "^16.0.0-rc.2",
8383
"@angular/platform-server": "^16.0.0-rc.2",
8484
"@angular/router": "^16.0.0-rc.2",
85-
"@axe-core/webdriverjs": "^4.3.2",
8685
"@babel/core": "^7.16.12",
8786
"@bazel/bazelisk": "1.12.1",
8887
"@bazel/buildifier": "6.0.1",

src/e2e-app/protractor.conf.js

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -6,32 +6,6 @@ exports.config = {
66
defaultTimeoutInterval: 120000,
77
},
88

9-
plugins: [
10-
{
11-
// Runs the axe-core accessibility checks each time the e2e page changes and
12-
// Angular is ready.
13-
path: require.resolve('angular_material/tools/axe-protractor'),
14-
15-
rules: [
16-
// Exclude mat-menu elements because those are empty if not active.
17-
{id: 'aria-required-children', selector: '*:not(mat-menu)'},
18-
19-
// Disable color contrast checks since the final colors will vary based on the theme.
20-
{id: 'color-contrast', enabled: false},
21-
22-
// Don't require all content to be inside landmarks since some tests depend on the
23-
// page layout and moving this around can break them.
24-
{id: 'region', enabled: false},
25-
26-
// Don't require at least one `<h1>` since we don't have any content.
27-
{id: 'page-has-heading-one', enabled: false},
28-
29-
// Axe incorrectly picks up that `aria-required` is not allowed on the MDC slide toggle.
30-
{id: 'aria-allowed-attr', selector: '*:not(.mdc-switch)'},
31-
],
32-
},
33-
],
34-
359
// Since we want to use async/await we don't want to mix up with selenium's promise
3610
// manager. In order to enforce this, we disable the promise manager.
3711
SELENIUM_PROMISE_MANAGER: false,

src/e2e-app/test_suite.bzl

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@ def e2e_test_suite(name, data = [], tags = ["e2e"], deps = []):
44
protractor_web_test_suite(
55
name = name,
66
configuration = "//src/e2e-app:protractor.conf.js",
7-
data = [
8-
"//tools/axe-protractor",
9-
"@npm//@axe-core/webdriverjs",
10-
] + data,
7+
data = data,
118
on_prepare = "//src/e2e-app:start-devserver.js",
129
server = "//src/e2e-app:server",
1310
tags = tags,

tools/axe-protractor/BUILD.bazel

Lines changed: 0 additions & 9 deletions
This file was deleted.

tools/axe-protractor/build-message.js

Lines changed: 0 additions & 14 deletions
This file was deleted.

tools/axe-protractor/index.js

Lines changed: 0 additions & 48 deletions
This file was deleted.

yarn.lock

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -428,13 +428,6 @@
428428
resolved "https://registry.yarnpkg.com/@assemblyscript/loader/-/loader-0.10.1.tgz#70e45678f06c72fa2e350e8553ec4a4d72b92e06"
429429
integrity sha512-H71nDOOL8Y7kWRLqf6Sums+01Q5msqBW2KhDUTemh1tvY04eSkSXrK0uj/4mmY0Xr16/3zyZmsrxN7CKuRbNRg==
430430

431-
"@axe-core/webdriverjs@^4.3.2":
432-
version "4.4.2"
433-
resolved "https://registry.yarnpkg.com/@axe-core/webdriverjs/-/webdriverjs-4.4.2.tgz#01a5a0333f7e5d15d7a67704760a4f642fdd6101"
434-
integrity sha512-+dkfu0lXQbIwW6sv331iQLIQ7/DLDzpuQYY5pR5WKwcGyv6/1bePc5kO7TLak2oYDwK8TFbVzZ06yiH0DvnHCQ==
435-
dependencies:
436-
axe-core "^4.4.1"
437-
438431
"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.16.7":
439432
version "7.16.7"
440433
resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.16.7.tgz#44416b6bd7624b998f5b1af5d470856c40138789"
@@ -5003,11 +4996,6 @@ aws4@^1.8.0:
50034996
resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.11.0.tgz#d61f46d83b2519250e2784daf5b09479a8b41c59"
50044997
integrity sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==
50054998

5006-
axe-core@^4.4.1:
5007-
version "4.4.1"
5008-
resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-4.4.1.tgz#7dbdc25989298f9ad006645cd396782443757413"
5009-
integrity sha512-gd1kmb21kwNuWr6BQz8fv6GNECPBnUasepcoLbekws23NVBLODdsClRZ+bQ8+9Uomf3Sm3+Vwn0oYG9NvwnJCw==
5010-
50114999
50125000
version "0.21.4"
50135001
resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.4.tgz#c67b90dc0568e5c1cf2b0b858c43ba28e2eda575"

0 commit comments

Comments
 (0)