Skip to content

Commit

Permalink
Added Enable/disable bulk export xml questions Behat test.
Browse files Browse the repository at this point in the history
  • Loading branch information
lucaboesch committed Sep 4, 2024
1 parent 13ae132 commit d7b5a08
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion tests/behat/bulk_xml_export_action.feature
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,22 @@ Feature: Use the plugin to export several question at once in the qbank manager.
| Test Q1 | truefalse | First question | Answer the first question |
| Sub Q1.2 | essay | Essay Foo Bar | Write about whatever you want |

Scenario: Enable/disable bulk export xml questions bulk action from the base view
Given I log in as "admin"
When I navigate to "Plugins > Question bank plugins > Manage question bank plugins" in site administration
And I should see "Bulk XML Export"
And I click on "Disable" "link" in the "Bulk move questions" "table_row"
And I am on the "Test quiz" "mod_quiz > question bank" page
And I click on "First question" "checkbox"
And I click on "With selected" "button"
Then I should not see question bulk action "Export as Moodle XML"
And I navigate to "Plugins > Question bank plugins > Manage question bank plugins" in site administration
And I click on "Enable" "link" in the "Bulk XML Export" "table_row"
And I am on the "Test quiz" "mod_quiz > question bank" page
And I click on "First question" "checkbox"
And I click on "With selected" "button"
And I should see question bulk action "Export as Moodle XML"

@javascript
Scenario: Export questions as Moodle XML
When I am on the "Course 1" "core_question > course question bank" page logged in as "teacher1"
Expand All @@ -32,4 +48,4 @@ Feature: Use the plugin to export several question at once in the qbank manager.
And I click on "First question" "checkbox"
And I click on "Essay Foo Bar" "checkbox"
And I click on question bulk action "bulkxmlexport"
Then following "Download" should download between "1" and "180000" bytes
Then following "Download" should download between "1" and "180000" bytes

0 comments on commit d7b5a08

Please sign in to comment.