Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@qtype @qtype_ordering
2
Feature: Test editing an Ordering question
3
  As a teacher
4
  In order to be able to update my Ordering question
5
  I need to edit them
6
 
7
  Background:
8
    Given the following "users" exist:
9
      | username | firstname | lastname | email                |
10
      | teacher1 | T1        | Teacher1 | teacher1@example.com |
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
      | 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                 | template |
22
      | Test questions   | ordering | Ordering for editing | moodle   |
23
 
24
  @javascript
25
  Scenario: Edit an Ordering question
26
    When I am on the "Ordering for editing" "core_question > edit" page logged in as teacher1
27
    And I set the following fields to these values:
28
      | Question name | |
29
    And I press "id_submitbutton"
30
    Then I should see "You must supply a value here."
31
    When I set the following fields to these values:
32
      | Question name         | Edited Ordering |
33
      | hintoptions[0]        | 1               |
34
      | hintoptions[1]        | 0               |
35
      | hintshownumcorrect[0] | 0               |
36
      | hintshownumcorrect[1] | 1               |
37
      | shownumcorrect        | 1               |
38
    And I press "id_submitbutton"
39
    Then I should see "Edited Ordering"
40
    And I choose "Edit question" action for "Edited Ordering" in the question bank
41
    And the following fields match these values:
42
      | id_shownumcorrect       | 1 |
43
      | id_hintshownumcorrect_0 | 0 |
44
      | id_hintoptions_0        | 1 |
45
      | id_hintshownumcorrect_1 | 1 |
46
      | id_hintoptions_1        | 0 |
47
 
48
  @javascript
49
  Scenario: Editing an ordering question and making sure the form does not allow duplication of draggables
50
    When I am on the "Ordering for editing" "core_question > edit" page logged in as teacher1
51
    And I set the following fields to these values:
52
      | Draggable item 4 | Object |
53
    And I press "id_submitbutton"
54
    Then  I should see "Duplication of draggable items is not allowed. The string \"Object\" is already used in Draggable item 2."
55
    Given I set the following fields to these values:
56
      | Draggable item 4 | Dynamic |
57
    And I press "id_submitbutton"
58
    Then I should see "Ordering for editing"