Commit 6fdf0ca6 authored by Vincent Bechu's avatar Vincent Bechu Committed by Klaus Wölfel

ERP5Type/tests: remove phantomJS: non compatible with jio/renderjs

parent af41f54b
...@@ -248,33 +248,12 @@ user_pref("pdfjs.migrationVersion", 42); ...@@ -248,33 +248,12 @@ user_pref("pdfjs.migrationVersion", 42);
""" % (self.host, self.port, """ % (self.host, self.port,
os.path.join(getConfiguration().instancehome, 'var')) 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: class FunctionalTestRunner:
# There is no test that can take more than 6 hours # There is no test that can take more than 6 hours
timeout = 6.0 * 3600 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'] self.instance_home = os.environ['INSTANCE_HOME']
# Such information should be automatically loaded # Such information should be automatically loaded
...@@ -283,9 +262,6 @@ class FunctionalTestRunner: ...@@ -283,9 +262,6 @@ class FunctionalTestRunner:
self.run_only = run_only self.run_only = run_only
profile_dir = os.path.join(self.instance_home, 'profile') profile_dir = os.path.join(self.instance_home, 'profile')
self.portal = portal 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): def getStatus(self):
...@@ -357,7 +333,6 @@ class FunctionalTestRunner: ...@@ -357,7 +333,6 @@ class FunctionalTestRunner:
class ERP5TypeFunctionalTestCase(ERP5TypeTestCase): class ERP5TypeFunctionalTestCase(ERP5TypeTestCase):
run_only = "" run_only = ""
foreground = 0 foreground = 0
use_phanthom = False
remote_code_url_list = None remote_code_url_list = None
def getTitle(self): def getTitle(self):
...@@ -375,7 +350,7 @@ class ERP5TypeFunctionalTestCase(ERP5TypeTestCase): ...@@ -375,7 +350,7 @@ class ERP5TypeFunctionalTestCase(ERP5TypeTestCase):
self.tic() self.tic()
host, port = self.startZServer() host, port = self.startZServer()
self.runner = FunctionalTestRunner(host, port, self.runner = FunctionalTestRunner(host, port,
self.portal, self.run_only, self.use_phanthom) self.portal, self.run_only)
def setSystemPreference(self): def setSystemPreference(self):
conversion_dict = _getConversionServerDict() conversion_dict = _getConversionServerDict()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment