Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@core @core_question
2
Feature: A bank view with questions can be managed
3
  In order to manage a question bank from the course
4
  As a teacher
5
  I need to be able to view and manage questions
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 |
17
    And the following "question categories" exist:
18
      | contextlevel | reference | name           |
19
      | Course       | C1        | Test questions |
20
 
21
  @javascript
22
  Scenario: Viewing question bank should not load individual questions
23
    When the following "questions" exist:
24
    | questioncategory | qtype       | name                    | questiontext                  | idnumber |
25
    | Test questions   | essay       | Essay test question     | Write about whatever you want | qid      |
26
    | Test questions   | numerical   | Numerical test question | Write about whatever you want | qid      |
27
    And I am on the "C1" "Course" page logged in as "teacher1"
28
    And I navigate to "Question bank" in current page administration
29
    And I should see "Essay test question"
30
    And I should see "Numerical test question"
31
    And I choose "Delete" action for "Essay test question" in the question bank
32
    And I press "Delete"
33
    And I should not see "Essay test question"
34
    And I choose "Delete" action for "Numerical test question" in the question bank
35
    And I press "Delete"
36
 
37
  @javascript
38
  Scenario: Unknown qtype does not break the view
39
    When the following "questions" exist:
40
    | questioncategory | qtype         | name                    | questiontext                  |
41
    | Test questions   | missingtype   | Unknown type question   | Write about whatever you want |
42
    | Test questions   | truefalse     | Truefalse type question | Write about whatever you want |
43
    | Test questions   | essay         | Essay type question     | Write about whatever you want |
44
    And I am on the "C1" "Course" page logged in as "teacher1"
45
    And I navigate to "Question bank" in current page administration
46
    And I should see "Unknown type question"
47
    And I should see "Truefalse type question"
48
    And I should see "Essay type question"