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

Behat step "I open the autocomplete suggestions list in the ..." is incorrect

XMLWordPrintable

    • MOODLE_311_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE, MOODLE_401_STABLE
    • MOODLE_311_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE, MOODLE_401_STABLE
    • MDL-76490-401
    • Hide
      1. Covered by automated tests
      2. For manual confirmation on master to 311 branches, edit course/tests/behat/rename_roles.feature around line 40:

        -    And "Tutor (Non-editing teacher)" "autocomplete_suggestions" should exist
        +    And "Dinosaurs" "autocomplete_suggestions" should exist
        

      3. Run the modified scenario:

        $ bin/moodle-docker-compose exec --user www-data webserver php admin/tool/behat/cli/run.php --name="Rename roles within a course"
        

      4. Confirm visually (either by watching the scenario and/or checking the failure dump screenshots) that the autocomplete being interacted with is in the student table row
      Show
      Covered by automated tests For manual confirmation on master to 311 branches, edit course/tests/behat/rename_roles.feature around line 40: - And "Tutor (Non-editing teacher)" "autocomplete_suggestions" should exist + And "Dinosaurs" "autocomplete_suggestions" should exist Run the modified scenario: $ bin/moodle-docker-compose exec --user www-data webserver php admin/tool/behat/cli/run.php --name="Rename roles within a course" Confirm visually (either by watching the scenario and/or checking the failure dump screenshots) that the autocomplete being interacted with is in the student table row

      Behat step

      And I open the autocomplete suggestions list in the "Some name" "dialogue"
      

      completely ignores container

      patch:

      diff --git a/lib/tests/behat/behat_forms.php b/lib/tests/behat/behat_forms.php
      index 4e73058f0d5..323fbe485c7 100644
      --- a/lib/tests/behat/behat_forms.php
      +++ b/lib/tests/behat/behat_forms.php
      @@ -722,7 +722,7 @@ class behat_forms extends behat_base {
           public function i_open_the_autocomplete_suggestions_list($container = null, $containertype = null) {
               $csstarget = ".form-autocomplete-downarrow";
               if ($container && $containertype) {
      -            $this->execute('behat_general::i_click_on', [$csstarget, 'css_element', $container, $containertype]);
      +            $this->execute('behat_general::i_click_on_in_the', [$csstarget, 'css_element', $container, $containertype]);
               } else {
                   $this->execute('behat_general::i_click_on', [$csstarget, 'css_element']);
               }
      
      

            pholden Paul Holden
            marina Marina Glancy
            Marina Glancy Marina Glancy
            Ilya Tregubov Ilya Tregubov
            Kim Jared Lucas Kim Jared Lucas
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours, 49 minutes
                2h 49m

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