Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Hamza
erp5
Commits
52ffa32f
Commit
52ffa32f
authored
Mar 31, 2017
by
Vincent Bechu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ERP5Type/tests: remove phantomJS: non compatible with jio/renderjs
parent
87a6aa69
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
28 deletions
+3
-28
product/ERP5Type/tests/ERP5TypeFunctionalTestCase.py
product/ERP5Type/tests/ERP5TypeFunctionalTestCase.py
+3
-28
No files found.
product/ERP5Type/tests/ERP5TypeFunctionalTestCase.py
View file @
52ffa32f
...
@@ -249,33 +249,12 @@ user_pref("pdfjs.migrationVersion", 42);
...
@@ -249,33 +249,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
...
@@ -284,10 +263,7 @@ class FunctionalTestRunner:
...
@@ -284,10 +263,7 @@ 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 = Firefox(profile_dir, host, int(port))
self.browser = PhantomJS(profile_dir, host, int(port))
else:
self.browser = Firefox(profile_dir, host, int(port))
def getStatus(self):
def getStatus(self):
transaction.begin()
transaction.begin()
...
@@ -358,7 +334,6 @@ class FunctionalTestRunner:
...
@@ -358,7 +334,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):
...
@@ -376,7 +351,7 @@ class ERP5TypeFunctionalTestCase(ERP5TypeTestCase):
...
@@ -376,7 +351,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()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment