Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecated Behat step: I add a "Questionnaire" to section "1" and I fill the form with: #585

Closed
leonstr opened this issue Jul 26, 2024 · 1 comment

Comments

@leonstr
Copy link
Contributor

leonstr commented Jul 26, 2024

With Moodle 4.4 when running the Behat tests you get the following failures:

001 Scenario: Public questionnaire instances have responses visible in their respective courses # /var/www/moodle/mod/questionnaire/tests/behat/public_questionnaire.feature:28
      And I add a "Questionnaire" to section "1" and I fill the form with:                      # /var/www/moodle/mod/questionnaire/tests/behat/public_questionnaire.feature:42
        Deprecated step, rather than using this step you can:
        - behat_course::i_add_to_course_section_and_i_fill_the_form_with
        - Set $CFG->behat_usedeprecated in config.php to allow the use of deprecated steps
                            if you don't have any other option (Exception)

002 Scenario: Teacher should not see responses for a questionnaire using a public instance # /var/www/moodle/mod/questionnaire/tests/behat/public_questionnaire_teacher.feature:80
      And I add a "Questionnaire" to section "1" and I fill the form with:                 # /var/www/moodle/mod/questionnaire/tests/behat/public_questionnaire_teacher.feature:45
        Deprecated step, rather than using this step you can:
        - behat_course::i_add_to_course_section_and_i_fill_the_form_with
        - Set $CFG->behat_usedeprecated in config.php to allow the use of deprecated steps
                            if you don't have any other option (Exception)

003 Scenario: Add a questionnaire from a public questionnaire # /var/www/moodle/mod/questionnaire/tests/behat/view_questionnaire.feature:32
      And I add a "Questionnaire" to section "1"              # /var/www/moodle/mod/questionnaire/tests/behat/view_questionnaire.feature:74
        Deprecated step, rather than using this step you can:
        - behat_course::i_add_to_course_section
        - behat_course::i_add_to_section_using_the_activity_chooser
        - Set $CFG->behat_usedeprecated in config.php to allow the use of deprecated steps
                            if you don't have any other option (Exception)

It looks like this is because i_add_to_course_section() and i_add_to_section_and_i_fill_the_form_with() was deprecated in 4.1.9, 4.2.6 and 4.3.3 by MDL-79029.

Environment: Moodle 4.4.1+ (Build: 20240712), PHP 8.1.19, mod_questionnaire 2022121600.02.

@mchurchward
Copy link
Contributor

Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants