Commit 4983bc747cf933aaaac93624dabfd4ab3aa028de

Authored by Daniela Feitosa
Committed by Antonio Terceiro
1 parent 74f01823

Back button on events links to profile's homepage

(ActionItem1751)
app/views/events/events.rhtml
1 1 <h1 id='agenda-title'>
2 2 <div id='agenda-toolbar'>
3   - <%= button :back, _('Back to %s') % profile.name, profile.public_profile_url %>
  3 + <%= button :back, _('Back to %s') % profile.name, profile.url %>
4 4 <% if user && user.has_permission?('post_content', profile) %>
5 5 <%= button :new, _('New event'), myprofile_url(:controller => 'cms', :action => 'new', :type => 'Event') %>
6 6 <% end %>
... ...
features/events.feature
... ... @@ -142,9 +142,10 @@ Feature: events
142 142 When I follow "31"
143 143 Then I should see "YAPC::Brasil 2010"
144 144  
145   - Scenario: provide button to back from profile
146   - When I am on /profile/josesilva/events
147   - Then I should see "Back to josesilva" link
  145 + Scenario: provide button to go back to profile homepage
  146 + Given I am on /profile/josesilva/events
  147 + When I follow "Back to josesilva"
  148 + Then I should be on josesilva's homepage
148 149  
149 150 Scenario: warn when there is no events
150 151 When I am on /profile/josesilva/events/2020/12/1
... ...