1 |
efrain |
1 |
@core @core_question
|
|
|
2 |
Feature: The questions in the question bank can be selected in various ways
|
|
|
3 |
In selected to do something for questions
|
|
|
4 |
As a teacher
|
|
|
5 |
I want to choose them to move, delete it.
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given the following "users" exist:
|
|
|
9 |
| username | firstname | lastname | email |
|
|
|
10 |
| teacher1 | Teacher | 1 | teacher1@example.com |
|
|
|
11 |
And the following "courses" exist:
|
|
|
12 |
| fullname | shortname | format |
|
|
|
13 |
| Course 1 | C1 | weeks |
|
|
|
14 |
And the following "course enrolments" exist:
|
|
|
15 |
| user | course | role |
|
|
|
16 |
| teacher1 | C1 | editingteacher |
|
1441 |
ariadna |
17 |
And the following "activities" exist:
|
|
|
18 |
| activity | name | intro | course | idnumber |
|
|
|
19 |
| qbank | Qbank 1 | Question bank 1 | C1 | qbank1 |
|
1 |
efrain |
20 |
And the following "question categories" exist:
|
1441 |
ariadna |
21 |
| contextlevel | reference | name |
|
|
|
22 |
| Activity module | qbank1 | Test questions |
|
1 |
efrain |
23 |
And the following "questions" exist:
|
|
|
24 |
| questioncategory | qtype | name | user | questiontext |
|
|
|
25 |
| Test questions | essay | A question 1 name | admin | Question 1 text |
|
|
|
26 |
| Test questions | essay | B question 2 name | teacher1 | Question 2 text |
|
|
|
27 |
| Test questions | numerical | C question 3 name | teacher1 | Question 3 text |
|
1441 |
ariadna |
28 |
And I am on the "Qbank 1" "core_question > question bank" page logged in as "teacher1"
|
|
|
29 |
And I apply question bank filter "Category" with value "Test questions"
|
1 |
efrain |
30 |
|
|
|
31 |
@javascript
|
|
|
32 |
Scenario: The question text can be chosen all in the list of questions
|
|
|
33 |
Given the field "Select all" matches value ""
|
|
|
34 |
When I click on "Select all" "checkbox"
|
|
|
35 |
And the field "A question 1 name" matches value "1"
|
|
|
36 |
And the field "B question 2 name" matches value "1"
|
|
|
37 |
And the field "C question 3 name" matches value "1"
|
|
|
38 |
Then I click on "Deselect all" "checkbox"
|
|
|
39 |
And the field "A question 1 name" matches value ""
|
|
|
40 |
And the field "B question 2 name" matches value ""
|
|
|
41 |
And the field "C question 3 name" matches value ""
|
|
|
42 |
|
|
|
43 |
@javascript
|
|
|
44 |
Scenario: The question text can be chosen in the list of questions
|
|
|
45 |
Given the field "Select all" matches value ""
|
|
|
46 |
When I click on "A question 1 name" "checkbox"
|
|
|
47 |
Then the field "Select all" matches value ""
|
|
|
48 |
And I click on "B question 2 name" "checkbox"
|
|
|
49 |
And I click on "C question 3 name" "checkbox"
|
|
|
50 |
And the field "Deselect all" matches value "1"
|
|
|
51 |
|
|
|
52 |
@javascript
|
|
|
53 |
Scenario: The action button can be disabled when the question not be chosen in the list of questions
|
|
|
54 |
Given the field "Select all" matches value ""
|
|
|
55 |
When I click on "With selected" "button"
|
|
|
56 |
And I should not see "Delete"
|
|
|
57 |
And I should not see "Move to..."
|
|
|
58 |
And I click on "Select all" "checkbox"
|
|
|
59 |
And I click on "With selected" "button"
|
|
|
60 |
Then I should see question bulk action "move"
|
|
|
61 |
And I should see question bulk action "deleteselected"
|