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

Quick fix to step causing behat execution to halt forever and other problems

    XMLWordPrintable

    Details

      Description

      It has been detected that all master behat (@javascript) executions are halting forever since recently.

      A) Tracing down the problem, it seems that a missing quote is causing the problem, leading to the behat execution to wait forever asking for input (undefined step).

      coding_exception: Coding error detected, it must be fixed by a programmer: Step 'I click on "Cancel" "button in the "Confirm" "dialogue"'' is undefined. in /var/www/html/lib/tests/behat/behat_hooks.php:434
       
      >> default suite has undefined steps. Please choose the context to generate snippets:
       
        [0 ] None
        [1 ] behat_assignfeedback_editpdf
        [2 ] behat_auth
        [3 ] behat_auth_email
        [4 ] behat_backup
        ...
        ...
      

      https://github.com/moodle/moodle/commit/705003beae34891ab65d484d7547e6c648f0f7d5#diff-e1b0232a3432a7a08eed4e5ac8f0ac75R180

      Obvious fix it to add the missing quotes and verify it leads to runs completing.

      B) More problems found (a button within a button):

      $ find . -name "*.feature" | xargs ag '"button".*"button"'
      admin/tool/dataprivacy/tests/behat/manage_categories.feature
      15:    When I click on "Save" "button" in the "Delete category" "button"
      33:    When I click on "Delete" "button" in the "Confirm" "button"
      

      C) And still more... running some features locally to capture all them...

      • Need to fix some remaining 'And I press "Add"' cases.
      • Fix some dialog names.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              stronk7 Eloy Lafuente (stronk7)
              Reporter:
              stronk7 Eloy Lafuente (stronk7)
              Peer reviewer:
              Jun Pataleta
              Integrator:
              Jun Pataleta
              Tester:
              CiBoT
              Participants:
              Component watchers:
              Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                3/Dec/18