How js tour works in Odoo unittests¶
The order is as following:
OPEN url_path from python phantom_js method
WAIT ready condition (Truthy or Falsy) from python phantom_js method
OPEN url from tour’s options in js file
WAIT wait_for (deferred object) from tour’s options in js file
DO first step from js tour
WAIT when trigger becomes visible
WAIT when extra_trigger becomes visible (if extra_trigger is presented)
EXECUTE action (run or click on trigger)
DO NEXT step
…
STOP Running when:
error happens:
thrown via
raise
reported via
console.error(...)
reported by tour system on timeout for initial ready condition. Timeout value is 60 sec and it cannot be changed.
reported by tour system on step timeout.
Odoo 12 and below: reported via
console.log('error', ...)
'test successful'
is reported viaconsole.log
(in Odoo 12 and below it was just'ok
)directly by code
indirectly by tour system when all steps are done
timeout from python phantom_js method is occured. Default is 60 sec