[FIX] tests: disable screencast when no logfile

When an HttpCase browser_js test is started, the screencast is started
and is discarded at the end of the test if no logfile was provided by
the config.

This behavior can impact the performances.

With this commit, the screencast does not start at all if not needed.
This commit is contained in:
Christophe Monniez
2018-09-04 19:17:01 +02:00
parent f29df7fb2e
commit c6ed80e1b6
+3 -2
View File
@@ -842,8 +842,9 @@ class HttpCase(TransactionCase):
url = "http://%s:%s%s" % (HOST, PORT, url_path or '/')
self._logger.info('Open "%s" in browser', url)
self._logger.info('Starting screen cast')
self.browser.start_screencast()
if odoo.tools.config['logfile']:
self._logger.info('Starting screen cast')
self.browser.start_screencast()
self.browser.navigate_to(url)
# Needed because tests like test01.js (qunit tests) are passing a ready