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

Behat checkbox controller "clicks" instead of "checks"

XMLWordPrintable

    • MOODLE_25_STABLE, MOODLE_26_STABLE
    • MOODLE_25_STABLE, MOODLE_26_STABLE
    • Hide

      Create a Behat test like so:

      @mdl43394
      Feature: Test MDL-43394
       
          Scenario: Why does this not work?
              Given I log in as "admin"
              And I set the following administration settings values:
              | Enable completion tracking | 1 |
              And I log out
      

      This should fail without this patch (and show aforementioned error)

      Show
      Create a Behat test like so: @mdl43394 Feature: Test MDL-43394   Scenario: Why does this not work? Given I log in as "admin" And I set the following administration settings values: | Enable completion tracking | 1 | And I log out This should fail without this patch (and show aforementioned error)

      I discovered this while writing Behat tests for MDL-40241.

      No matter what I did I could not get the following to work

       And I set the following administration settings values:
          | Enable completion tracking | 1 |
       And I log out
      

      I'd always get the error:

            Exception thrown by (//html//*[self::input | self::textarea | self::select][not(./@type = 'submit' or ./@type = 'image' or ./@type = 'hidden')][@id=//label[contains(normalize-space(.), 'Enable completion tracking')]/@for])[1]
            Unable to submit on a "input" tag.
      

      Digging around in the code I think I found the correct fix

            sry_not4sale Aaron Barnes
            sry_not4sale Aaron Barnes
            David Monllaó David Monllaó
            Dan Poltawski Dan Poltawski
            Michael de Raadt Michael de Raadt
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

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