2 Feature: The questions in the question bank can be selected in various ways
3 In selected to do something for questions
5 I want to choose them to move, delete it.
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 |
17 And the following "question categories" exist:
18 | contextlevel | reference | name |
19 | Course | C1 | Test questions |
20 And the following "questions" exist:
21 | questioncategory | qtype | name | user | questiontext |
22 | Test questions | essay | A question 1 name | admin | Question 1 text |
23 | Test questions | essay | B question 2 name | teacher1 | Question 2 text |
24 | Test questions | numerical | C question 3 name | teacher1 | Question 3 text |
25 And I log in as "teacher1"
26 And I am on "Course 1" course homepage
27 And I navigate to "Question bank > Questions" in current page administration
30 Scenario: The question text can be chosen all in the list of questions
31 Given the field "Select all" matches value ""
32 When I click on "Select all" "checkbox"
33 And the field "A question 1 name" matches value "1"
34 And the field "B question 2 name" matches value "1"
35 And the field "C question 3 name" matches value "1"
36 Then I click on "Deselect all" "checkbox"
37 And the field "A question 1 name" matches value ""
38 And the field "B question 2 name" matches value ""
39 And the field "C question 3 name" matches value ""
42 Scenario: The question text can be chosen in the list of questions
43 Given the field "Select all" matches value ""
44 When I click on "A question 1 name" "checkbox"
45 Then the field "Select all" matches value ""
46 And I click on "B question 2 name" "checkbox"
47 And I click on "C question 3 name" "checkbox"
48 And the field "Deselect all" matches value "1"
51 Scenario: The action button can be disabled when the question not be chosen in the list of questions
52 Given the "Delete" "button" should be disabled
53 And the "Move to >>" "button" should be disabled
54 When I click on "Select all" "checkbox"
55 Then the "Delete" "button" should be enabled
56 And the "Move to >>" "button" should be enabled