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

Behat: should have a step like Given the filter_mlang2 plugin is installed

    XMLWordPrintable

Details

    • MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE
    • MOODLE_311_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE
    • Hide

      Thanks for your feedback Andrew. I think this is polished, tested, and backported now. I will send for integration if CiBoT does not spot anything.

      I think I have missed 3.10 branch support by 1 week. However, I think it would be very helpful to plugin maintainers if the 310 changes could also be merged into that branch.

      Show
      Thanks for your feedback Andrew. I think this is polished, tested, and backported now. I will send for integration if CiBoT does not spot anything. I think I have missed 3.10 branch support by 1 week. However, I think it would be very helpful to plugin maintainers if the 310 changes could also be merged into that branch.
    • Hide
      1. Install qtype_wordselect, but without having filter_multilang2 installed.
      2. Edit question/type/wordselect/tests/behat/filter_test.feature and add

        Given the filter_multilang2 plugin is installed

        at the start of the scenario.

      3. Run that scenario, and verify that it gets skipped (rather than failing at the step And I should not see "deux".
      4. Now install filter_multilang2.
      5. Re-run the Behat scenario, and verify that it now passes.
      Show
      Install qtype_wordselect , but without having filter_multilang2 installed. Edit question/type/wordselect/tests/behat/filter_test.feature and add Given the filter_multilang2 plugin is installed at the start of the scenario. Run that scenario, and verify that it gets skipped (rather than failing at the step And I should not see "deux" . Now install filter_multilang2 . Re-run the Behat scenario, and verify that it now passes.

    Description

      Consider this Behat scenario in a plugin: https://github.com/marcusgreen/moodle-qtype_wordselect/blob/6183f72a45f9ad1d38742d4caed2c5e1d7d51883/tests/behat/filter_test.feature

      if you don't have filter_mlang2 installed, then it fails.

      It needs a step like

      Given the filter_mlang2 plugin is installed

      so that the test is skipped if it is not relevant. And, this is clearly a generic step, so should be done in core. (Note, we already have 'Given database family used is one of the following:' in lib/tests/behat/behat_general.php.)

      Attachments

        1. MDL-74636_master_with filter_multilang2.png
          55 kB
          Angelia Dela Cruz
        2. MDL-74636_master_without filter_multilang2.png
          52 kB
          Angelia Dela Cruz
        3. MDL-74636_v311_with filter_multilang2.png
          54 kB
          Angelia Dela Cruz
        4. MDL-74636_v311_without filter_multilang2.png
          56 kB
          Angelia Dela Cruz
        5. MDL-74636_v39_with filter_multilang2.png
          49 kB
          Angelia Dela Cruz
        6. MDL-74636_v39_without filter_multilang2.png
          55 kB
          Angelia Dela Cruz
        7. MDL-74636_v400_with filter_multilang2.png
          56 kB
          Angelia Dela Cruz
        8. MDL-74636_v400_without filter_multilang2.png
          59 kB
          Angelia Dela Cruz

        Activity

          People

            timhunt Tim Hunt
            timhunt Tim Hunt
            Andrew Lyons Andrew Lyons
            Jun Pataleta Jun Pataleta
            Angelia Dela Cruz Angelia Dela Cruz
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 3 hours, 10 minutes
                3h 10m

                Clockify

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