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,7 +4,7 @@
4 4
5 <%= render :file => 'shared/tiny_mce' %> 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 <% tabs = [] %> 8 <% tabs = [] %>
9 <% tabs << {:title => _('Site info'), :id => 'site-info', 9 <% tabs << {:title => _('Site info'), :id => 'site-info',
10 :content => (render :partial => 'site_info', :locals => {:f => f})} %> 10 :content => (render :partial => 'site_info', :locals => {:f => f})} %>
app/views/users/send_mail.rhtml
@@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
4 4
5 <%= render :file => 'shared/tiny_mce' %> 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 <%= labelled_form_field(_('Subject:'), f.text_field(:subject)) %> 8 <%= labelled_form_field(_('Subject:'), f.text_field(:subject)) %>
9 <%= labelled_form_field(_('Body:'), f.text_area(:body, :class => 'mceEditor')) %> 9 <%= labelled_form_field(_('Body:'), f.text_area(:body, :class => 'mceEditor')) %>
10 <%= submit_button(:send, _('Send')) %> 10 <%= submit_button(:send, _('Send')) %>
features/send_email_to_environment_members.feature
@@ -15,43 +15,31 @@ Feature: send emails to environment members users @@ -15,43 +15,31 @@ Feature: send emails to environment members users
15 When I go to /admin/users/send_mail 15 When I go to /admin/users/send_mail
16 Then I should see "Access denied" 16 Then I should see "Access denied"
17 17
18 - @selenium-fixme  
19 Scenario: Send e-mail to members 18 Scenario: Send e-mail to members
20 Given I am logged in as admin 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 And I fill in "Subject" with "Hello, user!" 21 And I fill in "Subject" with "Hello, user!"
25 And I fill in "Body" with "We have some news" 22 And I fill in "Body" with "We have some news"
26 When I press "Send" 23 When I press "Send"
27 Then I should be on /admin/users 24 Then I should be on /admin/users
28 25
29 - @selenium-fixme  
30 Scenario: Not send e-mail to members if subject is blank 26 Scenario: Not send e-mail to members if subject is blank
31 Given I am logged in as admin 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 And I fill in "Body" with "We have some news" 29 And I fill in "Body" with "We have some news"
36 When I press "Send" 30 When I press "Send"
37 Then I should be on /admin/users/send_mail 31 Then I should be on /admin/users/send_mail
38 32
39 - @selenium  
40 Scenario: Not send e-mail to members if body is blank 33 Scenario: Not send e-mail to members if body is blank
41 Given I am logged in as admin 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 And I fill in "Subject" with "Hello, user!" 36 And I fill in "Subject" with "Hello, user!"
46 When I press "Send" 37 When I press "Send"
47 Then I should be on /admin/users/send_mail 38 Then I should be on /admin/users/send_mail
48 39
49 - @selenium  
50 Scenario: Cancel creation of mailing 40 Scenario: Cancel creation of mailing
51 Given I am logged in as admin 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 Then I should be on /admin/users/send_mail 43 Then I should be on /admin/users/send_mail
56 When I follow "Cancel e-mail" 44 When I follow "Cancel e-mail"
57 Then I should be on /admin/users 45 Then I should be on /admin/users