1 |
efrain |
1 |
@qbank @qbank_editquestion
|
|
|
2 |
Feature: Use the qbank base view to test the status change using
|
|
|
3 |
the pop up
|
|
|
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 |
| Test questions | truefalse | Second question | Answer the first question |
|
|
|
19 |
|
|
|
20 |
@javascript
|
|
|
21 |
Scenario: Question status dropdown should change the status of the question
|
|
|
22 |
Given I am on the "Test quiz" "mod_quiz > question bank" page logged in as "admin"
|
|
|
23 |
And I apply question bank filter "Category" with value "Test questions"
|
|
|
24 |
And I should see "Test questions"
|
|
|
25 |
And the field "question_status_dropdown" in the "First question" "table_row" matches value "Ready"
|
|
|
26 |
And the field "question_status_dropdown" in the "Second question" "table_row" matches value "Ready"
|
|
|
27 |
And I set the field "question_status_dropdown" to "Draft"
|
|
|
28 |
And I reload the page
|
|
|
29 |
And the field "question_status_dropdown" in the "First question" "table_row" matches value "Draft"
|
|
|
30 |
And the field "question_status_dropdown" in the "Second question" "table_row" matches value "Ready"
|
|
|
31 |
And I set the field "question_status_dropdown" in the "Second question" "table_row" to "Draft"
|
|
|
32 |
And I set the field "question_status_dropdown" in the "First question" "table_row" to "Ready"
|
|
|
33 |
And I reload the page
|
|
|
34 |
And the field "question_status_dropdown" in the "First question" "table_row" matches value "Ready"
|
|
|
35 |
And the field "question_status_dropdown" in the "Second question" "table_row" matches value "Draft"
|