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

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

XMLWordPrintable

    • 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.

      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.)

            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

              Created:
              Updated:
              Resolved:

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

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