From 234d747b04038a6c432aaf194e58efb68a340803 Mon Sep 17 00:00:00 2001 From: andiwand Date: Sun, 26 Nov 2023 01:46:30 +0100 Subject: [PATCH] fix html diff --- test/scripts/compare_output_server.py | 3 +++ test/scripts/html_render_diff.py | 7 +++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/test/scripts/compare_output_server.py b/test/scripts/compare_output_server.py index 64b3b4ace..3e712a644 100755 --- a/test/scripts/compare_output_server.py +++ b/test/scripts/compare_output_server.py @@ -31,6 +31,9 @@ def __init__(self, path): self._path = path def dispatch(self, event): + if event.event_type in ['opened']: + return + if os.path.isfile(event.src_path): Config.comparator.submit( os.path.relpath(event.src_path, self._path)) diff --git a/test/scripts/html_render_diff.py b/test/scripts/html_render_diff.py index a5bfe4246..5a6012638 100755 --- a/test/scripts/html_render_diff.py +++ b/test/scripts/html_render_diff.py @@ -29,12 +29,11 @@ def get_browser(driver='firefox', max_width=1000, max_height=10000): browser = webdriver.PhantomJS() elif driver == 'firefox': options = webdriver.FirefoxOptions() - options.headless = True - browser = webdriver.Firefox(options=options, - service_log_path=os.path.devnull) + options.add_argument("--headless") + browser = webdriver.Firefox(options=options) else: # chrome or unknown options = webdriver.ChromeOptions() - options.headless = True + options.add_argument("--headless=new") browser = webdriver.Chrome(options=options) browser.set_window_size(max_width, max_height) return browser