Blame view

features/forum.feature 5.56 KB
f2b0ed69   Caio Almeida   Forum content typ...
1
2
3
4
5
6
7
8
9
10
11
12
Feature: forum
  As a noosfero user
  I want to have one or mutiple forums

  Background:
    Given I am on the homepage
    And the following users
      | login     | name       |
      | joaosilva | Joao Silva |
    And "joaosilva" has no articles
    And I am logged in as "joaosilva"

ceabbcd0   Daniel Cunha   forum.feature
13
  @selenium @ignore-hidden-elements
f2b0ed69   Caio Almeida   Forum content typ...
14
  Scenario: create a forum
ceabbcd0   Daniel Cunha   forum.feature
15
    Given I am on joaosilva's control panel
f2b0ed69   Caio Almeida   Forum content typ...
16
    And I follow "Manage Content"
aeb0f620   Rodrigo Souto   forum-feature: ad...
17
    And I should see "New content"
d6077c56   Daniela Feitosa   A lightbox is dis...
18
    And I follow "New content"
aeb0f620   Rodrigo Souto   forum-feature: ad...
19
    And I should see "Forum"
ceabbcd0   Daniel Cunha   forum.feature
20
    When I follow "Forum"
f2b0ed69   Caio Almeida   Forum content typ...
21
    And I fill in "Title" with "My Forum"
ceabbcd0   Daniel Cunha   forum.feature
22
    And I press "Save"
f2b0ed69   Caio Almeida   Forum content typ...
23
24
25
    Then I should see "Configure forum"

  Scenario: redirect to forum after create forum from cms
ceabbcd0   Daniel Cunha   forum.feature
26
    Given I go to joaosilva's control panel
f2b0ed69   Caio Almeida   Forum content typ...
27
    And I follow "Manage Content"
d6077c56   Daniela Feitosa   A lightbox is dis...
28
29
    And I follow "New content"
    When I follow "Forum"
f2b0ed69   Caio Almeida   Forum content typ...
30
31
32
33
34
    And I fill in "Title" with "Forum from cms"
    And I press "Save"
    Then I should be on /joaosilva/forum-from-cms

  Scenario: create multiple forums
ceabbcd0   Daniel Cunha   forum.feature
35
    Given I go to joaosilva's control panel
f2b0ed69   Caio Almeida   Forum content typ...
36
    And I follow "Manage Content"
d6077c56   Daniela Feitosa   A lightbox is dis...
37
38
    And I follow "New content"
    And I follow "Forum"
f2b0ed69   Caio Almeida   Forum content typ...
39
40
    And I fill in "Title" with "Forum One"
    And I press "Save"
ceabbcd0   Daniel Cunha   forum.feature
41
    Then I go to joaosilva's control panel
f2b0ed69   Caio Almeida   Forum content typ...
42
    And I follow "Manage Content"
d6077c56   Daniela Feitosa   A lightbox is dis...
43
44
    And I follow "New content"
    And I follow "Forum"
f2b0ed69   Caio Almeida   Forum content typ...
45
46
47
48
49
50
    And I fill in "Title" with "Forum Two"
    And I press "Save"
    Then I should not see "error"
    And I should be on /joaosilva/forum-two

  Scenario: cancel button back to cms
ceabbcd0   Daniel Cunha   forum.feature
51
    Given I go to joaosilva's control panel
f2b0ed69   Caio Almeida   Forum content typ...
52
    And I follow "Manage Content"
d6077c56   Daniela Feitosa   A lightbox is dis...
53
54
    And I follow "New content"
    And I follow "Forum"
f2b0ed69   Caio Almeida   Forum content typ...
55
56
57
58
    When I follow "Cancel" within ".main-block"
    Then I should be on /myprofile/joaosilva/cms

  Scenario: cancel button back to myprofile
ceabbcd0   Daniel Cunha   forum.feature
59
    Given I go to joaosilva's control panel
f2b0ed69   Caio Almeida   Forum content typ...
60
    And I follow "Manage Content"
d6077c56   Daniela Feitosa   A lightbox is dis...
61
62
    And I follow "New content"
    And I follow "Forum"
f2b0ed69   Caio Almeida   Forum content typ...
63
64
65
    When I follow "Cancel" within ".main-block"
    Then I should be on /myprofile/joaosilva/cms

82012975   Caio Almeida   Loading logged-in...
66
  @selenium
f2b0ed69   Caio Almeida   Forum content typ...
67
68
  Scenario: configure forum when viewing it
    Given the following forums
82012975   Caio Almeida   Loading logged-in...
69
       | owner     | name      |
f2b0ed69   Caio Almeida   Forum content typ...
70
       | joaosilva | Forum One |
ceabbcd0   Daniel Cunha   forum.feature
71
72
    And I go to /joaosilva/forum-one
    When I follow "Configure forum"
f2b0ed69   Caio Almeida   Forum content typ...
73
    Then I should be on edit "Forum One" by joaosilva
629998e7   Joenio Costa   Fixing crash on v...
74

b3fb1448   Arthur Del Esposte   forum_use_terms: ...
75
76
77
78
79
80
81
  @selenium
  Scenario: show forum with terms of use for owner
    Given the following forums
       | owner     | name      |
       | joaosilva | Forum One |
    And I go to /joaosilva/forum-one
    When I follow "Configure forum"
bbd28eeb   Rodrigo Souto   forum-feature: fi...
82
    And I fill in tinyMCE "article_body" with "My description"
b3fb1448   Arthur Del Esposte   forum_use_terms: ...
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
    And I check "Has terms of use:"
    And I press "Save"
    Then I should see "Forum One"
    And I should see "My description"

  @selenium
  Scenario: accept terms in topics page
    Given the following forums
       | owner     | name      |
       | joaosilva | Forum One |
    And the following users
       | login      | name        |
       | mariasilva | Maria Silva |
    And I go to /joaosilva/forum-one
    When I follow "Configure forum"
bbd28eeb   Rodrigo Souto   forum-feature: fi...
98
    And I fill in tinyMCE "article_body" with "My description"
b3fb1448   Arthur Del Esposte   forum_use_terms: ...
99
100
101
    And I check "Has terms of use:"
    And I press "Save"
    When I follow "New discussion topic"
6eb736e0   Leandro Santos   Remove TinyMce, R...
102
103
    And I should see "Text article"
    And I follow "Text article"
b3fb1448   Arthur Del Esposte   forum_use_terms: ...
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
    And I fill in "Title" with "Topic"
    And I press "Save"
    And I am logged in as "mariasilva"
    And I go to /joaosilva/forum-one/topic
    And I press "Accept"
    Then I should see "Topic"

  @selenium
  Scenario: accept terms of use of a forum for others users
    Given the following forums
       | owner     | name      |
       | joaosilva | Forum One |
    And the following users
       | login      | name        |
       | mariasilva | Maria Silva |
    And I go to /joaosilva/forum-one
    When I follow "Configure forum"
bbd28eeb   Rodrigo Souto   forum-feature: fi...
121
    And I fill in tinyMCE "article_body" with "My description"
b3fb1448   Arthur Del Esposte   forum_use_terms: ...
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
    And I check "Has terms of use:"
    And I press "Save"
    When I follow "Logout"
    And I am logged in as "mariasilva"
    And I go to /joaosilva/forum-one?terms=terms
    When I press "Accept"
    Then I should see "Forum One"
    And I should see "My description"

  @selenium
  Scenario: redirect user not logged
    Given the following forums
       | owner     | name      |
       | joaosilva | Forum One |
    And I go to /joaosilva/forum-one
    When I follow "Configure forum"
bbd28eeb   Rodrigo Souto   forum-feature: fi...
138
    And I fill in tinyMCE "article_body" with "My description"
b3fb1448   Arthur Del Esposte   forum_use_terms: ...
139
140
141
142
143
144
145
146
    And I check "Has terms of use:"
    And I press "Save"
    When I follow "Logout"
    And I go to /joaosilva/forum-one?terms=terms
    When I follow "Accept"
    Then I should see "Login" within ".login-box"

  @selenium
629998e7   Joenio Costa   Fixing crash on v...
147
148
  Scenario: last topic update by unautenticated user should not link
    Given the following forums
b3fb1448   Arthur Del Esposte   forum_use_terms: ...
149
       | owner     | name  |
629998e7   Joenio Costa   Fixing crash on v...
150
151
       | joaosilva | Forum |
    And the following articles
b3fb1448   Arthur Del Esposte   forum_use_terms: ...
152
153
       | owner     | name     | parent |
       | joaosilva | Post one | Forum  |
629998e7   Joenio Costa   Fixing crash on v...
154
    And the following comments
b3fb1448   Arthur Del Esposte   forum_use_terms: ...
155
       | article  | name | email            | title  | body   |
629998e7   Joenio Costa   Fixing crash on v...
156
157
158
159
160
161
       | Post one | Joao | joao@example.com | Hi all | Hi all |
   When I go to /joaosilva/forum
   Then I should not see "Joao" link

  Scenario: last topic update by autenticated user should link to profile url
    Given the following forums
b3fb1448   Arthur Del Esposte   forum_use_terms: ...
162
       | owner     | name  |
629998e7   Joenio Costa   Fixing crash on v...
163
164
       | joaosilva | Forum |
    And the following articles
b3fb1448   Arthur Del Esposte   forum_use_terms: ...
165
166
       | owner     | name     | parent |
       | joaosilva | Post one | Forum  |
629998e7   Joenio Costa   Fixing crash on v...
167
    And the following comments
b3fb1448   Arthur Del Esposte   forum_use_terms: ...
168
       | article  | author    | title  | body   |
629998e7   Joenio Costa   Fixing crash on v...
169
170
       | Post one | joaosilva | Hi all | Hi all |
   When I go to /joaosilva/forum
7729506e   Rodrigo Souto   forum: fix cucumb...
171
   Then I should see "Joao Silva" within ".forum-post-last-answer"