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: Users can search wikis
3
  In order to find information in wiki
4
  As a user
5
  I need to be able to search individual and collaborative wikis
6
 
7
  Background:
8
    Given the following "users" exist:
9
      | username | firstname | lastname | email |
10
      | teacher1 | Teacher | 1 | teacher1@example.com |
11
      | student1 | Student | 1 | student1@example.com |
12
      | student2 | Student | 2 | student2@example.com |
13
    And the following "courses" exist:
14
      | fullname | shortname | category |
15
      | Course 1 | C1 | 0 |
16
    And the following "course enrolments" exist:
17
      | user | course | role |
18
      | teacher1 | C1 | editingteacher |
19
      | student1 | C1 | student |
20
      | student2 | C1 | student |
21
 
22
  @javascript
23
  Scenario: Searching collaborative wiki
24
    Given the following "activity" exists:
25
      | activity       | wiki                    |
26
      | course         | C1                      |
27
      | name           | Collaborative wiki name |
28
      | wikimode       | collaborative           |
29
      | firstpagetitle | First page              |
30
    And I am on the "Collaborative wiki name" "wiki activity" page logged in as teacher1
31
    And I press "Create page"
32
    And I set the following fields to these values:
33
      | HTML format | Collaborative teacher1 page [[new page]] |
34
    And I press "Save"
35
    And I am on the "Collaborative wiki name" "wiki activity" page logged in as student1
36
    And I follow "new page"
37
    And I press "Create page"
38
    And I set the following fields to these values:
39
      | HTML format | New page created by student1 |
40
    And I press "Save"
41
    When I set the field "searchstring" to "page"
42
    And I press "Search wikis"
43
    Then I should see "New page created by student1"
44
    And I should see "Collaborative teacher1 page"
45
    And I set the field "searchstring" to "teacher1"
46
    And I press "Search wikis"
47
    And I should not see "New page created by student1"
48
    And I should see "Collaborative teacher1 page"
49
    And I set the field "searchstring" to "teacher1 page"
50
    And I press "Search wikis"
51
    And I should not see "New page created by student1"
52
    And I should see "Collaborative teacher1 page"
53
 
54
  @javascript
55
  Scenario: Searching individual wiki
56
    Given the following "activity" exists:
57
      | activity       | wiki                 |
58
      | course         | C1                   |
59
      | name           | Individual wiki name |
60
      | wikimode       | individual           |
61
      | firstpagetitle | First page           |
62
    And I am on the "Individual wiki name" "wiki activity" page logged in as teacher1
63
    And I press "Create page"
64
    And I set the following fields to these values:
65
      | HTML format | Individual teacher1 page |
66
    And I press "Save"
67
    And I am on the "Individual wiki name" "wiki activity" page logged in as student1
68
    And I press "Create page"
69
    And I set the following fields to these values:
70
      | HTML format | Individual student1 page |
71
    And I press "Save"
72
    When I set the field "searchstring" to "page"
73
    And I press "Search wikis"
74
    Then I should see "Individual student1 page"
75
    And I should not see "Individual teacher1 page"
76
    And I am on the "Individual wiki name" "wiki activity" page logged in as student2
77
    And I press "Create page"
78
    And I set the following fields to these values:
79
      | HTML format | Individual student2 page |
80
    And I press "Save"
81
    And I set the field "searchstring" to "page"
82
    And I press "Search wikis"
83
    And I should see "Individual student2 page"
84
    And I should not see "Individual student1 page"
85
    And I should not see "Individual teacher1 page"
86
    And I am on the "Individual wiki name" "wiki activity" page logged in as teacher1
87
    And I set the field "searchstring" to "page"
88
    And I press "Search wikis"
89
    And I should see "Individual teacher1 page"
90
    And I should not see "Individual student1 page"
91
    And I should not see "Individual student2 page"
92
    And I set the field "uid" to "Student 1"
93
    And I should not see "Individual teacher1 page"
94
    And I should see "Individual student1 page"
95
    And I should not see "Individual student2 page"
96
    And I set the field "uid" to "Student 2"
97
    And I should not see "Individual teacher1 page"
98
    And I should not see "Individual student1 page"
99
    And I should see "Individual student2 page"
100
 
101
  @javascript
102
  Scenario: Searching group wiki
103
    Given the following "groups" exist:
104
      | name   | course | idnumber |
105
      | Group1 | C1     | G1       |
106
      | Group2 | C1     | G2       |
107
    And the following "group members" exist:
108
      | user     | group |
109
      | student1 | G1    |
110
      | student2 | G2    |
111
    Given the following "activity" exists:
112
      | activity       | wiki            |
113
      | course         | C1              |
114
      | name           | Group wiki name |
115
      | wikimode       | collaborative   |
116
      | firstpagetitle | Groups pag      |
117
      | groupmode      | 1               |
118
    And I am on the "Group wiki name" "wiki activity" page logged in as teacher1
119
    And I set the field "Group" to "All participants"
120
    And I press "Create page"
121
    And I set the following fields to these values:
122
      | HTML format | All participants teacher1 page |
123
    And I press "Save"
124
    And I set the field "group" to "Group1"
125
    And I press "Create page"
126
    And I set the following fields to these values:
127
      | HTML format | Group1 teacher1 page [[new page1]] |
128
    And I press "Save"
129
    And I set the field "group" to "Group2"
130
    And I press "Create page"
131
    And I set the following fields to these values:
132
      | HTML format | Group2 teacher1 page [[new page2]] |
133
    And I press "Save"
134
    And I am on the "Group wiki name" "wiki activity" page logged in as student1
135
    And I follow "new page1"
136
    And I press "Create page"
137
    And I set the following fields to these values:
138
      | HTML format | Group1 student1 new page |
139
    And I press "Save"
140
    When I set the field "searchstring" to "page"
141
    And I press "Search wikis"
142
    Then I should see "Group1 teacher1 page"
143
    And I should not see "Group2 teacher1 page"
144
    And I should see "Group1 student1 new page"
145
    And I should not see "All participants teacher1 page"
146
    And I am on the "Group wiki name" "wiki activity" page logged in as student2
147
    And I follow "new page2"
148
    And I press "Create page"
149
    And I set the following fields to these values:
150
      | HTML format | Group2 student2 new page |
151
    And I press "Save"
152
    And I set the field "searchstring" to "page"
153
    And I press "Search wikis"
154
    And I should not see "Group1 teacher1 page"
155
    And I should see "Group2 teacher1 page"
156
    And I should not see "Group1 student1 new page"
157
    And I should not see "All participants teacher1 page"
158
    And I should see "Group2 student2 new page"