diff --git a/package.json b/package.json index 876b169897..c7f7232cb4 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ "uglify-js": "2.4.24" }, "devDependencies": { - "jshint": "^2.7.0" + "jshint": "^2.7.0", + "edx-custom-a11y-rules": "edx/edx-custom-a11y-rules" } } diff --git a/pavelib/paver_tests/test_paver_bok_choy_cmds.py b/pavelib/paver_tests/test_paver_bok_choy_cmds.py index 9df04d09e9..87a0969cd6 100644 --- a/pavelib/paver_tests/test_paver_bok_choy_cmds.py +++ b/pavelib/paver_tests/test_paver_bok_choy_cmds.py @@ -25,6 +25,7 @@ class TestPaverBokChoyCmd(unittest.TestCase): "DEFAULT_STORE={default_store} " "SCREENSHOT_DIR='{repo_dir}/test_root/log{shard_str}' " "BOK_CHOY_HAR_DIR='{repo_dir}/test_root/log{shard_str}/hars' " + "BOKCHOY_A11Y_CUSTOM_RULES_FILE='{repo_dir}/{a11y_custom_file}' " "SELENIUM_DRIVER_LOG_DIR='{repo_dir}/test_root/log{shard_str}' " "nosetests {repo_dir}/common/test/acceptance/{exp_text} " "--with-xunit " @@ -35,6 +36,7 @@ class TestPaverBokChoyCmd(unittest.TestCase): repo_dir=REPO_DIR, shard_str='/shard_' + self.shard if self.shard else '', exp_text=name, + a11y_custom_file='node_modules/edx-custom-a11y-rules/lib/custom_a11y_rules.js', ) return expected_statement diff --git a/pavelib/utils/envs.py b/pavelib/utils/envs.py index ac5b5be565..7fef62016f 100644 --- a/pavelib/utils/envs.py +++ b/pavelib/utils/envs.py @@ -32,6 +32,10 @@ class Env(object): BOK_CHOY_A11Y_REPORT_DIR = REPORT_DIR / "a11y" BOK_CHOY_COVERAGERC = BOK_CHOY_DIR / ".coveragerc" BOK_CHOY_A11Y_COVERAGERC = BOK_CHOY_DIR / ".a11ycoveragerc" + BOK_CHOY_A11Y_CUSTOM_RULES_FILE = ( + REPO_ROOT / "node_modules" / "edx-custom-a11y-rules" / + "lib" / "custom_a11y_rules.js" + ) # If set, put reports for run in "unique" directories. # The main purpose of this is to ensure that the reports can be 'slurped' diff --git a/pavelib/utils/test/suites/bokchoy_suite.py b/pavelib/utils/test/suites/bokchoy_suite.py index 7e87b15c33..2c73597a9b 100644 --- a/pavelib/utils/test/suites/bokchoy_suite.py +++ b/pavelib/utils/test/suites/bokchoy_suite.py @@ -55,6 +55,7 @@ class BokChoyTestSuite(TestSuite): self.num_processes = kwargs.get('num_processes', DEFAULT_NUM_PROCESSES) self.extra_args = kwargs.get('extra_args', '') self.har_dir = self.log_dir / 'hars' + self.a11y_file = Env.BOK_CHOY_A11Y_CUSTOM_RULES_FILE self.imports_dir = kwargs.get('imports_dir', None) self.coveragerc = kwargs.get('coveragerc', None) @@ -205,6 +206,7 @@ class BokChoyTestSuite(TestSuite): "DEFAULT_STORE={}".format(self.default_store), "SCREENSHOT_DIR='{}'".format(self.log_dir), "BOK_CHOY_HAR_DIR='{}'".format(self.har_dir), + "BOKCHOY_A11Y_CUSTOM_RULES_FILE='{}'".format(self.a11y_file), "SELENIUM_DRIVER_LOG_DIR='{}'".format(self.log_dir), "nosetests", test_spec,