Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@mod @mod_wiki
2
Feature: A history of each wiki page is available
3
  In order to know how a wiki page evolved over the time and how changed what
4
  As a user
5
  I need to check the history of a wiki page
6
 
7
  @javascript
8
  Scenario: Wiki page edition history changes list
9
    Given the following "users" exist:
10
      | username | firstname | lastname | email |
11
      | teacher1 | Teacher | 1 | teacher1@example.com |
12
      | student1 | Student | 1 | student1@example.com |
13
      | student2 | Student | 2 | student2@example.com |
14
    And the following "courses" exist:
15
      | fullname | shortname | category |
16
      | Course 1 | C1 | 0 |
17
    And the following "course enrolments" exist:
18
      | user | course | role |
19
      | teacher1 | C1 | editingteacher |
20
      | student1 | C1 | student |
21
      | student2 | C1 | student |
22
    And the following "activity" exists:
23
      | course         | C1             |
24
      | activity       | wiki           |
25
      | name           | Test wiki name |
26
      | firstpagetitle | First page     |
27
      | wikimode       | collaborative  |
28
    And I am on the "Test wiki name" "wiki activity" page logged in as teacher1
29
    And I press "Create page"
30
    And I set the following fields to these values:
31
      | HTML format | First edition |
32
    And I press "Save"
33
    When I am on the "Test wiki name" "wiki activity" page logged in as student1
34
    And I select "Edit" from the "jump" singleselect
35
    And I set the following fields to these values:
36
      | HTML format | Second edition |
37
    And I press "Save"
38
    When I am on the "Test wiki name" "wiki activity" page logged in as student2
39
    And I select "Edit" from the "jump" singleselect
40
    And I set the following fields to these values:
41
      | HTML format | Third edition |
42
    And I press "Save"
43
    And I select "History" from the "jump" singleselect
44
    # Checking that there are 3 history items (the first one is are th)
45
    And "//*[@id='region-main']/descendant::table/descendant::tr[4]" "xpath_element" should exist
46
    And I click on "1" "link" in the "Teacher 1" "table_row"
47
    And I should see "First edition"
48
    And I should see "Teacher 1"
49
    And I follow "Back"
50
    And I click on "2" "link" in the "Student 1" "table_row"
51
    And I should see "Second edition"
52
    And I should see "Student 1"
53
    And I follow "Back"
54
    And I click on "3" "link" in the "Student 2" "table_row"
55
    And I should see "Third edition"
56
    And I should see "Student 2" in the "region-main" "region"
57
    And I follow "Back"
58
    And I click on "comparewith" "radio" in the "Student 1" "table_row"
59
    And I click on "compare" "radio" in the "Teacher 1" "table_row"
60
    And I press "Compare selected"
61
    And I should see "Comparing version 1 with version 3"
62
    And I follow "Next"
63
    And I should see "Comparing version 2 with version 3"