add custom-a11y-rules.js from edx-custom-a11y-rules
This commit is contained in:
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user