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

Add new step definitions to restrict the scope of clicks and "contains text" assertions

    XMLWordPrintable

Details

    • MOODLE_25_STABLE, MOODLE_26_STABLE
    • MOODLE_25_STABLE
    • MDL-40566_master
    • Hide
      1. Add the test on top of your current integration branch
        • git fetch git://github.com/dmonllao/moodle.git MDL-40566-test
        • git cherry-pick 8db0933b66a62714378bcec7d93517ef6d0edbaa
      2. Update the available tests
        • php admin/tool/behat/cli/util.php --enable
      3. Run the pulled test (there are not steps that runs these new options)
      4. They SHOULD all pass
      Show
      Add the test on top of your current integration branch git fetch git://github.com/dmonllao/moodle.git MDL-40566 -test git cherry-pick 8db0933b66a62714378bcec7d93517ef6d0edbaa Update the available tests php admin/tool/behat/cli/util.php --enable Run the pulled test (there are not steps that runs these new options) They SHOULD all pass

    Description

      As Eloy commented in MDL-40392, new steps definitions like this can be added:

      • I should see "xxxxx" in the "yyyy" "MOODLE_ELEMENT"
      • I click on "xxxxx" "SELECTOR" in the "yyyyy" "MOODLE_ELEMENT"

      MOODLE_ELEMENT would be a closed list of variables like block, header or region and "yyyyy" would be a var depending on this MOODLE_ELEMENT var used to specify the block name, the form fieldset heading...

      Note that SELECTOR is one of the selectors listed in http://docs.moodle.org/dev/Acceptance_testing#Providing_values_to_steps

      Until now only the needed step definitions have been added, but now that contributors will begin to add feature files will be better if they have a bigger set of steps which allows them to skip using CSS selectors and XPath as much as possible.

      Attachments

        Issue Links

          Activity

            People

              dmonllao David Monllaó
              dmonllao David Monllaó
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                9/Sep/13