Commit 5cd956a4505ef6817a0de773394cab19e8e1022b

Authored by Rodrigo Souto
1 parent 448366be

Fixed test: features/send_email_to_environment_members.feature

Also removing the :url param on 2 admin view forms that were breaking
the tests. They were originally include to avoid linking to the wrong
page on profiles with own domain.  But this pages will not be visualized
if they are not using the environment domain, therefore there is no need
to used this params.
app/views/admin_panel/site_info.rhtml
... ... @@ -4,7 +4,7 @@
4 4  
5 5 <%= render :file => 'shared/tiny_mce' %>
6 6  
7   -<% labelled_form_for :environment, @environment, :url => {:host => @environment.default_hostname, :port => request.port} do |f| %>
  7 +<% labelled_form_for :environment, @environment do |f| %>
8 8 <% tabs = [] %>
9 9 <% tabs << {:title => _('Site info'), :id => 'site-info',
10 10 :content => (render :partial => 'site_info', :locals => {:f => f})} %>
... ...
app/views/users/send_mail.rhtml
... ... @@ -4,7 +4,7 @@
4 4  
5 5 <%= render :file => 'shared/tiny_mce' %>
6 6  
7   -<% form_for :mailing, :url => {:action => 'send_mail', :host => @environment.default_hostname} do |f| %>
  7 +<% form_for :mailing do |f| %>
8 8 <%= labelled_form_field(_('Subject:'), f.text_field(:subject)) %>
9 9 <%= labelled_form_field(_('Body:'), f.text_area(:body, :class => 'mceEditor')) %>
10 10 <%= submit_button(:send, _('Send')) %>
... ...
features/send_email_to_environment_members.feature
... ... @@ -15,43 +15,31 @@ Feature: send emails to environment members users
15 15 When I go to /admin/users/send_mail
16 16 Then I should see "Access denied"
17 17  
18   - @selenium-fixme
19 18 Scenario: Send e-mail to members
20 19 Given I am logged in as admin
21   - When I follow "Administration"
22   - And I follow "Users"
23   - And I follow "Send e-mail to users"
  20 + And I go to /admin/users/send_mail
24 21 And I fill in "Subject" with "Hello, user!"
25 22 And I fill in "Body" with "We have some news"
26 23 When I press "Send"
27 24 Then I should be on /admin/users
28 25  
29   - @selenium-fixme
30 26 Scenario: Not send e-mail to members if subject is blank
31 27 Given I am logged in as admin
32   - When I follow "Administration"
33   - And I follow "Users"
34   - And I follow "Send e-mail to users"
  28 + And I go to /admin/users/send_mail
35 29 And I fill in "Body" with "We have some news"
36 30 When I press "Send"
37 31 Then I should be on /admin/users/send_mail
38 32  
39   - @selenium
40 33 Scenario: Not send e-mail to members if body is blank
41 34 Given I am logged in as admin
42   - When I follow "Administration"
43   - And I follow "Users"
44   - And I follow "Send e-mail to users"
  35 + And I go to /admin/users/send_mail
45 36 And I fill in "Subject" with "Hello, user!"
46 37 When I press "Send"
47 38 Then I should be on /admin/users/send_mail
48 39  
49   - @selenium
50 40 Scenario: Cancel creation of mailing
51 41 Given I am logged in as admin
52   - When I follow "Administration"
53   - And I follow "Users"
54   - And I follow "Send e-mail to users"
  42 + And I go to /admin/users/send_mail
55 43 Then I should be on /admin/users/send_mail
56 44 When I follow "Cancel e-mail"
57 45 Then I should be on /admin/users
... ...