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:

    • 'test successful' is reported via console.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