-
-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Image Folder Cleanup #82
Conversation
The folders are only removed when a test is green and when open eyes has the parameter cleanup passed to it with one of the supported options documented in the README.md file If any entry isn't entered or it doesn't exist in the supported list, no files will be cleaned up
# Conflicts: # setup.py
@josev814 Were you able to test this? Need to confirm that report generation does not break with these changes. Changes look good too except a minor comment. |
RobotEyes/__init__.py
Outdated
|
||
# Keeping this arg to avoid exceptions for those who have added tolerance in the previous versions. | ||
def __init__(self, tolerance=0): | ||
self.ROBOT_LIBRARY_LISTENER = self | ||
self.lib = 'none' | ||
|
||
def open_eyes(self, lib='SeleniumLibrary', tolerance=0, template_id=''): | ||
def open_eyes(self, lib='SeleniumLibrary', tolerance=0, cleanup=None, template_id=''): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you keep cleanup argument as last? For those users writing template tests and passing template_id. This could break their tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved the cleanup argument to the last position and updated the readme file
made pass_color and fail color class variables to quicker access/change when running a test without the baseline image color was undefined. fixed that issue by assigning color to self.pass_color updated the README.md file to relect changes
This reverts commit 3851151.
Adding an option to remove actual and/or diff folders
The folders are only removed when a test is green and when open eyes has the parameter cleanup passed to it with one of the supported options documented in the README.md file
If an entry isn't entered or it doesn't exist in the supported list, no files will be cleaned up.
This is to help with reducing the amount of images and folders that are generated.
We use this library in Azure Pipelines and having the option to remove actuals and diffs of image comparisons that have passed is beneficial in reducing the output size. Additionally, when tests are passed, it's not as much of a concern as when they fail. So only including the actuals and diffs when a test fails helps to reduce the result size as well.