Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-85133

Add additional Behat step to expand all toolbars when more Tiny plugins installed

XMLWordPrintable

    • MOODLE_405_STABLE

      In scenarios where multiple TinyMCE plugins are used, some buttons may be hidden, leading to issues with Behat tests due to unclicked buttons.

      To ensure all buttons are clickable, it's necessary to expand all toolbars when multiple TinyMCE plugins are present. Without this step, certain Behat tests, such as mod/quiz/tests/behat/manually_mark_question.feature, might fail because a button was not clicked. The issue can be addressed by adding an additional step to the i_click_on_button step definition, as follows:

      $this->expand_all_toolbars($locator);

      The final step definition would be:

      public function i_click_on_button(string $button, string $locator): void {        $this->require_tiny_tags();
              $container = $this->get_editor_container_for_locator($locator);
       
              $this->expand_all_toolbars($locator);
              $this->execute('behat_general::i_click_on_in_the', [$button, 'button', $container, 'NodeElement']);
          } 

      With this change, the toolbars will always be expanded, ensuring that all buttons are clickable.

            Unassigned Unassigned
            daniel.cifuentes Daniel Cifuentes
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.