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

Plugin should be able to define named selectors for Behat tests

    XMLWordPrintable

    Details

    • Affected Branches:
      MOODLE_35_STABLE, MOODLE_36_STABLE

      Description

      Behat has a number of named selectors that make it easier to write readable and robust checks, for example:

      When I click on "Preview" "link" in the "My first pattern match question" "table_row"

      However, this list is currently fixed in core Moodle. Similar to MDL-48024, it should be possible for all plugins to contribute named selectors, so one could write things like

      When I click on "Reply" "link" in the "Hello world" "mod_forum/post"

      (that naming convetion is just a suggestion, but we already assume that Behat tests authors know Frankenstyle component names, for the @mod_forum tags we expect them to to .feature files.)

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              timhunt Tim Hunt
              Reporter:
              timhunt Tim Hunt
              Participants:
              Component watchers:
              Andrew Lyons, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              1 Vote for this issue
              Watchers:
              8 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: