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);
""" % (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()
......
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