events.feature
6.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
Feature: events
  As a noosfero visitor
  I want to see some events
  Background:
    Given the following users
      | login      |
      | josesilva  |
    And the following events
      | owner     | name               | start_date |
      | josesilva | Another Conference | 2009-10-24 |
  Scenario: go to next month
    Given I am on /profile/josesilva/events/2009/10
    When I follow "next »"
    Then I should see "November 2009" within ".current-month"
  Scenario: go to next month in global agenda
    Given I am on /assets/events?year=2009&month=11
    When I follow "next »"
    Then I should see "December 2009" within ".current-month"
  Scenario: go to previous month
    Given I am on /profile/josesilva/events/2009/10
    When I follow "« previous"
    Then I should see "September 2009" within ".current-month"
  Scenario: go to previous month in global agenda
    Given I am on /assets/events?year=2009&month=11
    When I follow "« previous"
    Then I should see "October 2009" within ".current-month"
  Scenario: go to next month by clicking in month name
    Given I am on /profile/josesilva/events/2009/10
    When I follow "November 2009"
    Then I should see "November 2009" within ".current-month"
  Scenario: go to previous month by clicking in month name
    Given I am on /profile/josesilva/events/2009/10
    When I follow "September 2009"
    Then I should see "September 2009" within ".current-month"
  Scenario: go to specific day
    Given I am on the homepage
    When I am on /profile/josesilva/events/2009/01/20
    Then I should see "Events for January 20, 2009"
  Scenario: go to specific day in global agenda
    Given I am on the homepage
    When I am on /assets/events?year=2009&month=11&day=12
    Then I should see "Events for November 12, 2009"
  Scenario: list events for specific day
    Given I am on /profile/josesilva/events/2009/10
    And the following events
      | owner     | name         | start_date |
      | josesilva | WikiSym 2009 | 2009-10-25 |
    When I am on /profile/josesilva/events/2009/10/25
    Then I should see "WikiSym 2009"
  Scenario: dont list events for non-selected day
    Given I am on /profile/josesilva/events/2009/10
    And the following events
      | owner     | name         | start_date |
      | josesilva | WikiSym 2009 | 2009-10-25 |
    When I am on /profile/josesilva/events/2009/10/20
    Then I should not see "WikiSym 2009"
  Scenario: list event between a range
    Given I am on /profile/josesilva/events/2009/10
    And the following events
      | owner     | name         | start_date | end_date   |
      | josesilva | WikiSym 2009 | 2009-10-25 | 2009-10-27 |
    When I am on /profile/josesilva/events/2009/10/26
    Then I should see "WikiSym 2009"
  Scenario: dont list events from other profiles
    Given the following users
      | login      |
      | josemanuel |
    And the following events
      | owner      | name            | start_date |
      | josemanuel | Manuel Birthday | 2009-10-24 |
    When I am on /profile/josesilva/events/2009/10/24
    Then I should see "Another Conference"
    And I should not see "Manuel Birthday"
  Scenario: list all events in global agenda
    Given the following users
      | login      |
      | josemanuel |
    And the following events
      | owner      | name            | start_date |
      | josemanuel | Manuel Birthday | 2009-10-24 |
    When I am on /assets/events?year=2009&month=10&day=24
    Then I should see "Another Conference"
    And I should see "Manuel Birthday"
  Scenario: ask for a day when no inform complete date
    When I am on /profile/josesilva/events/2009/5
    Then I should see "Select a day on the left to display it's events here"
  Scenario: ask for a day when no inform complete date in global agenda
    When I am on /assets/events?year=2009&month=5
    Then I should see "Select a day on the left to display it's events here"
  Scenario: provide links to days with events
    Given I am on /profile/josesilva/events/2009/10
    Then I should see "24" link
    When I follow "next »"
    Then I should see "24" link
    When I follow "next »"
    Then I should not see "24" link
  Scenario: provide links to all days between start and end date
    Given the following users
      | login    |
      | fudencio |
    And the following events
      | owner    | name              | start_date | end_date   |
      | fudencio | YAPC::Brasil 2009 | 2010-10-30 | 2010-11-01 |
    And I am on /profile/fudencio/events/2010/10
    Then I should not see "29" link
    And I should see "30" link
    And I should see "31" link
    And I should see "1" link
  @selenium
  Scenario: show events when i follow a specific day
    Given I am on /profile/josesilva/events/2009/10
    And I should not see "Another Conference"
    When I follow "24"
    Then I should see "Another Conference"
  @selenium
  Scenario: show events in a range when i follow a specific day
    Given the following events
      | owner     | name              | start_date | end_date   |
      | josesilva | YAPC::Brasil 2010 | 2010-10-30 | 2010-11-01 |
    And I am on /profile/josesilva/events/2010/10
    And I should not see "YAPC::Brasil 2010"
    When I follow "31"
    Then I should see "YAPC::Brasil 2010"
  Scenario: provide button to back from profile
    When I am on /profile/josesilva/events
    Then I should see "Back to josesilva" link
  Scenario: warn when there is no events
    When I am on /profile/josesilva/events/2020/12/1
    Then I should see "No events for this date"
  Scenario: provide button to create new event
    Given I am logged in as "josesilva"
    When I am on /profile/josesilva/events/2020/12/1
    Then I should see "New event" link
  Scenario: not provide button to create new event if I am not logged
    When I am on /profile/josesilva/events/2020/12/1
    Then I should not see "New event" link
  Scenario: not provide button to create new event if I haven't permission
    Given the following users
      | login    |
      | fudencio |
    Given I am logged in as "josesilva"
    When I am on /profile/fudencio/events/2020/12/1
    Then I should not see "New events" link
  Scenario: display environment name in global agenda
    When I am on /assets/events
    Then I should see "Colivre.net's events"
  Scenario: published events should be listed in the agenda too
    Given the following community
      | identifier | name |
      | sample-community | Sample Community |
    And I am logged in as "josesilva"
    And "josesilva" is a member of "Sample Community"
    And I am on josesilva's control panel
    And I follow "Manage content"
    And I follow "Another Conference"
    And I follow "Spread"
    And I check "Sample Community"
    And I press "Spread this"
    And I am on /profile/sample-community/events/2009/10/24
    Then I should see "Another Conference"