Commit Graph

16 Commits

Author SHA1 Message Date
Christophe Simonis d8d9c7277e [FIX] phantomjs test: `phantom` variable is undefined inside page. 2015-08-06 17:20:37 +02:00
Christophe Simonis f0dc416871 [FIX] phantomjs 2.0 compatibility
phantomjs 2.0 remove the deprecated attribute `phantom.args`. Use the
new `system` module.
2015-02-26 15:08:17 +01:00
Antony Lesuisse 3bb7866384 [FIX] test phantomjs clear localstorage before running tests 2014-06-30 16:32:02 +02:00
Christophe Simonis 4cd699df15 [IMP] js testing
- output "error" if any qunit tests failed
- failed js tests are logged as errors
- when running phantomjs considere empty waiting condition or initialisation code as "true"
- lint phantomtest.js file
2014-06-22 11:31:07 +02:00
chm@openerp.com 82989d95f7 [FIX] phantomjs: hide error if document.body does not exists
bzr revid: chm@openerp.com-20140325092547-ilnbqdj4rhdo0q3r
2014-03-25 10:25:47 +01:00
chm@openerp.com ea901ebb1d [FIX] phantomjs: don't use error method because it's undefined in phantomjs evaluating environment
bzr revid: chm@openerp.com-20140319112027-buua40iyi7hgnlly
2014-03-19 12:20:27 +01:00
Antony Lesuisse eac5185731 [IMP] phantom tests
- phantomjs more verbose
- revert to dumber console.log relay, dont try to be smart, just display it
- json is only optionally parsed for errors stack dumps

bzr revid: al@openerp.com-20140316160634-hh7br4mbg01xcrpk
2014-03-16 17:06:34 +01:00
Antony Lesuisse 096432ff73 [REV] reverting xmo@openerp.com-20140310115334-vjh7gx5oizdm6s67
This api change breaks jsfile tests (example test_ui_load.js). The api is broken
but the proper fix would be to avoid accessing phantom.args from PhantomTest

bzr revid: al@openerp.com-20140310184636-8r9x81xi1zqhcsek
2014-03-10 19:46:36 +01:00
Xavier Morel aaa80e9575 [IMP] phantomjs driver cleanups
bzr revid: xmo@openerp.com-20140310115334-vjh7gx5oizdm6s67
2014-03-10 12:53:34 +01:00
Xavier Morel bcbe89fbdc [IMP] phantomjs waitloop
* simplify waitFor itself
* log a "waiting for" message if the expression evaluates but is *false*

bzr revid: xmo@openerp.com-20140310112401-khvy0zcvwaaxa5om
2014-03-10 12:24:01 +01:00
Xavier Morel d5cb5c2a14 [FIX] correctly display JS stack frames in phantomjs runner
altered reporting to handle and deserialize JSON if JSON-deserializable. Can't
just send multiple lines as driver currently does not handle multiple lines of
message... Yeah turns out having a JSON-based protocol between phantomjs and
the python runner allowed multiple lines in messages, who'd have thought eh?

bzr revid: xmo@openerp.com-20140219123850-0h0upb3x33j7leqk
2014-02-19 13:38:50 +01:00
Antony Lesuisse 75c350976c [FIX] tests HttpCase phantomjs conditional injection inject=[(need,file)]
bzr revid: al@openerp.com-20140217000150-wt3pwqrqcd7n2mfd
2014-02-17 01:01:50 +01:00
Antony Lesuisse c8324bafcc [IMP] phantomjs testing
- avoid dbmanager by presetting db in the test session
- correctly handle login option
- serialize test cursor access

bzr revid: al@openerp.com-20140216212222-4o6x9uljyua3g1og
2014-02-16 22:22:22 +01:00
Christophe Matthieu 90ed82bb14 [IMP] test phantomtest: inject files with testing if a variable is already setted
bzr revid: chm@openerp.com-20140210131910-z8eggofegua88516
2014-02-10 14:19:10 +01:00
Antony Lesuisse 1f78dfb76d [IMP] phantomjs testing add an easy phantom_js helper
self.phantom_js(<page_to_load>, <code_to_run>, <global_object_to_wait>, **options)

example:

self.phantom_js("/", "openerp.module.mytest()", "openerp.module.mytest");

console.log('ok') or console.log('error') should be used to signal success or
failure. Other console.log's will be passed to the test logger.

bzr revid: al@openerp.com-20140210004517-jc2cobc31qshxchm
2014-02-10 01:45:17 +01:00
Antony Lesuisse 1f67b2165c [IMP] phantomtest helper
bzr revid: al@openerp.com-20140209223917-vruzjvl0mtsqoo87
2014-02-09 23:39:17 +01:00