Commit d426931e by Omar Khan

Add --save_screenshots option to paver test_bokchoy

parent ac6749ac
......@@ -30,7 +30,8 @@ BOKCHOY_OPTS = [
make_option("-q", "--quiet", action="store_const", const=0, dest="verbosity"),
make_option("-v", "--verbosity", action="count", dest="verbosity"),
make_option("--pdb", action="store_true", help="Drop into debugger on failures or errors"),
make_option("--skip_firefox_version_validation", action='store_false', dest="validate_firefox_version")
make_option("--skip_firefox_version_validation", action='store_false', dest="validate_firefox_version"),
make_option("--save_screenshots", action='store_true', dest="save_screenshots"),
]
......@@ -52,6 +53,7 @@ def parse_bokchoy_opts(options):
'extra_args': getattr(options, 'extra_args', ''),
'pdb': getattr(options, 'pdb', False),
'test_dir': getattr(options, 'test_dir', 'tests'),
'save_screenshots': getattr(options, 'save_screenshots', False),
}
......
......@@ -62,6 +62,7 @@ class BokChoyTestSuite(TestSuite):
self.a11y_file = Env.BOK_CHOY_A11Y_CUSTOM_RULES_FILE
self.imports_dir = kwargs.get('imports_dir', None)
self.coveragerc = kwargs.get('coveragerc', None)
self.save_screenshots = kwargs.get('save_screenshots', False)
def __enter__(self):
super(BokChoyTestSuite, self).__enter__()
......@@ -234,6 +235,8 @@ class BokChoyTestSuite(TestSuite):
]
if self.pdb:
cmd.append("--pdb")
if self.save_screenshots:
cmd.append("--with-save-baseline")
cmd.append(self.extra_args)
cmd = (" ").join(cmd)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment