From 6fdf0ca6343e9602f0697fb3ca13da4b284988c6 Mon Sep 17 00:00:00 2001 From: Vincent Bechu <vincent.bechu@nexedi.com> Date: Fri, 31 Mar 2017 15:48:16 +0200 Subject: [PATCH] ERP5Type/tests: remove phantomJS: non compatible with jio/renderjs --- .../tests/ERP5TypeFunctionalTestCase.py | 31 ++----------------- 1 file changed, 3 insertions(+), 28 deletions(-) diff --git a/product/ERP5Type/tests/ERP5TypeFunctionalTestCase.py b/product/ERP5Type/tests/ERP5TypeFunctionalTestCase.py index 315cb5aee0..01adeca1ce 100644 --- a/product/ERP5Type/tests/ERP5TypeFunctionalTestCase.py +++ b/product/ERP5Type/tests/ERP5TypeFunctionalTestCase.py @@ -248,33 +248,12 @@ user_pref("pdfjs.migrationVersion", 42); """ % (self.host, self.port, os.path.join(getConfiguration().instancehome, 'var')) -class PhantomJS(Browser): - def _createRunJS(self): - run_js = """ -var page = new WebPage(), - address; - -address = phantom.args[0]; -page.open(address, function (status) { - if (status !== 'success') { - console.log('FAIL to load the address'); - } else { - console.log('SUCCESS load the address'); - } - phantom.exit(); -}); -""" - return self._createFile('run.js', run_js) - - def _run(self, url): - self._runCommand("phantomjs", self._createRunJS(), url) - class FunctionalTestRunner: # There is no test that can take more than 6 hours timeout = 6.0 * 3600 - def __init__(self, host, port, portal, run_only='', use_phanthom=False): + def __init__(self, host, port, portal, run_only=''): self.instance_home = os.environ['INSTANCE_HOME'] # Such information should be automatically loaded @@ -283,10 +262,7 @@ class FunctionalTestRunner: self.run_only = run_only profile_dir = os.path.join(self.instance_home, 'profile') self.portal = portal - if use_phanthom: - self.browser = PhantomJS(profile_dir, host, int(port)) - else: - self.browser = Firefox(profile_dir, host, int(port)) + self.browser = Firefox(profile_dir, host, int(port)) def getStatus(self): transaction.begin() @@ -357,7 +333,6 @@ class FunctionalTestRunner: class ERP5TypeFunctionalTestCase(ERP5TypeTestCase): run_only = "" foreground = 0 - use_phanthom = False remote_code_url_list = None def getTitle(self): @@ -375,7 +350,7 @@ class ERP5TypeFunctionalTestCase(ERP5TypeTestCase): self.tic() host, port = self.startZServer() self.runner = FunctionalTestRunner(host, port, - self.portal, self.run_only, self.use_phanthom) + self.portal, self.run_only) def setSystemPreference(self): conversion_dict = _getConversionServerDict() -- 2.30.9