diff --git a/content/developer/reference/backend/testing.rst b/content/developer/reference/backend/testing.rst index 4c4348456..284605e69 100644 --- a/content/developer/reference/backend/testing.rst +++ b/content/developer/reference/backend/testing.rst @@ -609,8 +609,9 @@ Here are some example of steps: tour.stepUtils.showAppsMenuItem(), // Second step { - trigger: '.o_app[data-menu-xmlid="your_module.maybe_your_module_menu_root"]', - edition: 'community' // Optional + trigger: '.o_app[data-menu-xmlid="your_module.maybe_your_module_menu_root"]', + isActive: ['community'], // Optional + run: "click", }, { // Third step }, @@ -621,7 +622,7 @@ Here are some example of steps: { trigger: '.js_product:has(strong:contains(Chair floor protection)) .js_add', - extra_trigger: '.oe_advanced_configurator_modal', // This ensure we are in the wizard + run: "click", }, .. example:: @@ -629,74 +630,83 @@ Here are some example of steps: .. code-block:: javascript { + isActive: ["mobile", "enterprise"], + content: "Click on Add a product link", trigger: 'a:contains("Add a product")', - // Extra-trigger to make sure a line is added before trying to add another one - extra_trigger: '.o_field_many2one[name="product_template_id"] .o_external_button', + tooltipPosition: "bottom", + async run(helpers) { //Exactly the same as run: "click" + helpers.click(); + } }, Here are some possible arguments for your personalized steps: -- **trigger**: Selector/element to ``run`` an action on. The tour will +- **trigger**: Required, Selector/element to ``run`` an action on. The tour will wait until the element exists and is visible before ``run``-ing the action *on it*. -- **extra_trigger**: Optional secondary condition for the step to - ``run``. Will be waited for like the **trigger** element but the - action will not run on the extra trigger. +- **run**: Optional, Action to perform on the *trigger* element. If no ``run``, + no action. - Useful to have a precondition, or two different and unrelated - conditions. -- **run**: Action to perform on the *trigger* element. + The action can be: - By default, tries to set the **trigger**'s content to ``Text`` if - it's an ``input``, otherwise ``click`` it. - - The action can also be: - - - A function, synchronous, executed with the trigger's ``Tip`` as + - A function, asynchronous, executed with the trigger's ``Tip`` as context (``this``) and the action helpers as parameter. - The name of one of the action helpers, which will be run on the trigger element: .. rst-class:: o-definition-list + ``check`` + Ensures that the **trigger** element is checked. This helper is intended + for `` elements only. + ``clear`` + Clears the value of the **trigger** element. This helper is + intended for `` or `