1 |
efrain |
1 |
@qbank @qbank_history
|
|
|
2 |
Feature: Use the qbank plugin manager page for question history
|
|
|
3 |
In order to check the plugin behaviour with enable and disable
|
|
|
4 |
|
|
|
5 |
Background:
|
|
|
6 |
Given the following "courses" exist:
|
|
|
7 |
| fullname | shortname | category |
|
|
|
8 |
| Course 1 | C1 | 0 |
|
|
|
9 |
And the following "activities" exist:
|
|
|
10 |
| activity | name | course | idnumber |
|
|
|
11 |
| quiz | Test quiz | C1 | quiz1 |
|
|
|
12 |
And the following "question categories" exist:
|
|
|
13 |
| contextlevel | reference | name |
|
|
|
14 |
| Course | C1 | Test questions |
|
|
|
15 |
And the following "questions" exist:
|
|
|
16 |
| questioncategory | qtype | name | questiontext |
|
|
|
17 |
| Test questions | truefalse | First question | Answer the first question |
|
|
|
18 |
|
|
|
19 |
Scenario: Enable/disable question history column from the base view
|
|
|
20 |
Given I log in as "admin"
|
|
|
21 |
When I navigate to "Plugins > Question bank plugins > Manage question bank plugins" in site administration
|
|
|
22 |
And I should see "Question history"
|
|
|
23 |
And I click on "Disable" "link" in the "Question history" "table_row"
|
|
|
24 |
And I am on the "Test quiz" "mod_quiz > question bank" page
|
|
|
25 |
Then the "History" action should not exist for the "First question" question in the question bank
|
|
|
26 |
And I navigate to "Plugins > Question bank plugins > Manage question bank plugins" in site administration
|
|
|
27 |
And I click on "Enable" "link" in the "Question history" "table_row"
|
|
|
28 |
And I am on the "Test quiz" "mod_quiz > question bank" page
|
|
|
29 |
Then the "History" action should exist for the "First question" question in the question bank
|
|
|
30 |
|
|
|
31 |
Scenario: History page shows only the specified features and questions
|
|
|
32 |
Given I am on the "Test quiz" "mod_quiz > question bank" page logged in as "admin"
|
|
|
33 |
And I choose "History" action for "First question" in the question bank
|
|
|
34 |
And I should see "Question"
|
|
|
35 |
And I should see "Actions"
|
|
|
36 |
And I should see "Status"
|
|
|
37 |
And I should see "Version"
|
|
|
38 |
And I should see "Created by"
|
|
|
39 |
And I should see "First question"
|
|
|
40 |
And the "History" action should not exist for the "First question" question in the question bank
|
|
|
41 |
|
|
|
42 |
@javascript
|
|
|
43 |
Scenario: Viewing history for a question in a non-default category
|
|
|
44 |
Given the following "question categories" exist:
|
|
|
45 |
| contextlevel | reference | name |
|
|
|
46 |
| Course | C1 | Test questions 2 |
|
|
|
47 |
And the following "questions" exist:
|
|
|
48 |
| questioncategory | qtype | name | questiontext |
|
|
|
49 |
| Test questions 2 | truefalse | Second question | Answer the second question |
|
|
|
50 |
And I am on the "Test quiz" "mod_quiz > question bank" page logged in as "admin"
|
|
|
51 |
And I apply question bank filter "Category" with value "Test questions 2"
|
|
|
52 |
And I choose "History" action for "Second question" in the question bank
|
|
|
53 |
Then I should see "Question history"
|
|
|
54 |
And "Filter 1" "fieldset" should not exist
|
|
|
55 |
And I should see "Second question"
|
|
|
56 |
And "Second question" "table_row" should exist
|
|
|
57 |
|
|
|
58 |
@javascript
|
|
|
59 |
Scenario: Delete question from the history using Edit question menu
|
|
|
60 |
Given I am on the "Test quiz" "mod_quiz > question bank" page logged in as "admin"
|
|
|
61 |
And I choose "History" action for "First question" in the question bank
|
|
|
62 |
When I choose "Delete" action for "First question" in the question bank
|
|
|
63 |
And I press "Delete"
|
|
|
64 |
And I should not see "First question"
|
|
|
65 |
Then I should see "All versions of this question have been deleted."
|
|
|
66 |
And I click on "Continue" "button"
|
|
|
67 |
And I should see "Question bank"
|
|
|
68 |
And I should not see "First question"
|