Proyectos de Subversion Moodle

Rev

Rev 1 | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@core @core_question
2
Feature: Questions in the question bank have versions
3
  In order to see modified questions
4
  As a teacher
5
  I want to view them as different versions
6
 
7
  Background:
8
    Given the following "courses" exist:
9
      | fullname | shortname | category | groupmode |
10
      | Course 1 | C1 | 0 | 1 |
11
    And the following "users" exist:
12
      | username | firstname | lastname | email |
13
      | teacher1 | Teacher | 1 | teacher1@example.com |
14
    And the following "course enrolments" exist:
15
      | user | course | role |
16
      | teacher1 | C1 | editingteacher |
17
    And the following "activities" exist:
18
      | activity   | name   | course | idnumber |
19
      | quiz       | Quiz 1 | C1     | quiz1    |
1441 ariadna 20
    And the following "question categories" exist:
21
      | contextlevel    | reference | name           |
22
      | Activity module | quiz1     | Test questions |
1 efrain 23
    And the following "questions" exist:
24
      | questioncategory | qtype     | name           | questiontext              | answer 1 |
25
      | Test questions   | truefalse | First question | Answer the first question | True     |
26
    And quiz "Quiz 1" contains the following questions:
27
      | question       | page |
28
      | First question | 1    |
1441 ariadna 29
    And I am on the "Quiz 1" "mod_quiz > question bank" page logged in as "teacher1"
30
    And I apply question bank filter "Category" with value "Test questions"
1 efrain 31
 
32
  @javascript
33
  Scenario: Question version is displayed
34
    When I choose "Edit question" action for "First question" in the question bank
1441 ariadna 35
    Then I should see "v1 (latest)"
1 efrain 36
 
37
  @javascript
38
  Scenario: Question version change when question is altered
39
    When I choose "Edit question" action for "First question" in the question bank
1441 ariadna 40
    And I should see "v1 (latest)"
1 efrain 41
    When I set the field "id_name" to "Renamed question v2"
42
    And I set the field "id_questiontext" to "edited question"
43
    And I press "id_submitbutton"
44
    Then I should not see "First question"
45
    And I should see "Renamed question v2"
46
    When I choose "Edit question" action for "Renamed question v2" in the question bank
1441 ariadna 47
    Then I should see "v2 (latest)"
48
    And I should not see "v1 (latest)"