Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@qtype @qtype_essay
2
Feature: Test editing an Essay question
3
  As a teacher
4
  In order to be able to update my Essay question
5
  I need to edit them
6
 
7
  Background:
8
    Given the following "users" exist:
9
      | username |
10
      | teacher  |
11
    And the following "courses" exist:
12
      | fullname | shortname | category |
13
      | Course 1 | C1        | 0        |
14
    And the following "course enrolments" exist:
15
      | user    | course | role           |
16
      | teacher | 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      | template         |
22
      | Test questions   | essay | essay-001 | editor           |
23
      | Test questions   | essay | essay-002 | editorfilepicker |
24
      | Test questions   | essay | essay-003 | plain            |
25
 
26
  Scenario: Edit an Essay question
27
    When I am on the "Course 1" "core_question > course question bank" page logged in as teacher
28
    And I choose "Edit question" action for "essay-001" in the question bank
29
    And I set the following fields to these values:
30
      | Question name | |
31
    And I press "id_submitbutton"
32
    And I should see "You must supply a value here."
33
    And I set the following fields to these values:
34
      | Question name   | Edited essay-001 name |
35
      | Response format | No online text        |
36
    And I press "id_submitbutton"
37
    And I should see "When \"No online text\" is selected, or responses are optional, you must allow at least one attachment."
38
    And I set the following fields to these values:
39
      | Response format | Plain text |
40
    And I press "id_submitbutton"
41
    Then I should see "Edited essay-001 name"