Línea 7... |
Línea 7... |
7 |
| fullname | shortname | category |
|
7 |
| fullname | shortname | category |
|
8 |
| Course 1 | C1 | 0 |
|
8 |
| Course 1 | C1 | 0 |
|
9 |
And the following "activities" exist:
|
9 |
And the following "activities" exist:
|
10 |
| activity | name | course | idnumber |
|
10 |
| activity | name | course | idnumber |
|
11 |
| quiz | Test quiz | C1 | quiz1 |
|
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:
|
12 |
And the following "questions" exist:
|
16 |
| questioncategory | qtype | name | questiontext |
|
13 |
| questioncategory | qtype | name | questiontext |
|
17 |
| Test questions | truefalse | First question | Answer the first question |
|
14 |
| Default for Test quiz | truefalse | First question | Answer the first question |
|
- |
|
15 |
And I change window size to "large"
|
Línea 18... |
Línea 16... |
18 |
|
16 |
|
19 |
Scenario: Enable/disable question usage column from the base view
|
17 |
Scenario: Enable/disable question usage column from the base view
|
20 |
Given I log in as "admin"
|
18 |
Given I log in as "admin"
|
21 |
And I navigate to "Plugins > Question bank plugins > Manage question bank plugins" in site administration
|
19 |
And I navigate to "Plugins > Question bank plugins > Manage question bank plugins" in site administration
|
Línea 29... |
Línea 27... |
29 |
And I should see "Usage"
|
27 |
And I should see "Usage"
|
Línea 30... |
Línea 28... |
30 |
|
28 |
|
31 |
@javascript
|
29 |
@javascript
|
32 |
Scenario: Question usage modal should work without any usage data
|
30 |
Scenario: Question usage modal should work without any usage data
|
33 |
And I am on the "Test quiz" "mod_quiz > question bank" page logged in as "admin"
|
- |
|
34 |
And I apply question bank filter "Category" with value "Test questions"
|
31 |
And I am on the "Test quiz" "mod_quiz > question bank" page logged in as "admin"
|
35 |
And I should see "Test questions"
|
32 |
And I should see "Default for Test quiz"
|
36 |
And I should see "0" on the usage column
|
33 |
And I should see "0" on the usage column
|
37 |
When I click "0" on the usage column
|
34 |
When I click "0" on the usage column
|
38 |
Then I should see "Version 1"
|
35 |
Then I should see "Version 1"
|
39 |
And I should see "v1 (latest)" in the "Question 1" "question"
|
36 |
And I should see "v1 (latest)" in the "Question 1" "question"
|
Línea 44... |
Línea 41... |
44 |
Scenario: Question usage modal should work with usage data
|
41 |
Scenario: Question usage modal should work with usage data
|
45 |
Given quiz "Test quiz" contains the following questions:
|
42 |
Given quiz "Test quiz" contains the following questions:
|
46 |
| question | page |
|
43 |
| question | page |
|
47 |
| First question | 1 |
|
44 |
| First question | 1 |
|
48 |
And I am on the "Test quiz" "mod_quiz > question bank" page logged in as "admin"
|
45 |
And I am on the "Test quiz" "mod_quiz > question bank" page logged in as "admin"
|
49 |
And I apply question bank filter "Category" with value "Test questions"
|
- |
|
50 |
And I should see "Test questions"
|
46 |
And I should see "Default for Test quiz"
|
51 |
And I should see "1" on the usage column
|
47 |
And I should see "1" on the usage column
|
52 |
When I click "1" on the usage column
|
48 |
When I click "1" on the usage column
|
53 |
Then "Test quiz" "table_row" should exist in the "question-usage_table" "region"
|
49 |
Then "Test quiz" "table_row" should exist in the "question-usage_table" "region"
|