Add --save_screenshots option to paver test_bokchoy
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user