Commit 9cceca21e1c9df24694e8880ce10c61060244cdb

Authored by Antonio Terceiro
1 parent 089ad9e1

Making the remaining acceptance tests pass with the new default layout

app/views/layouts/application-ng.rhtml
@@ -67,10 +67,12 @@ @@ -67,10 +67,12 @@
67 <% end %> 67 <% end %>
68 <%= link_to('<i class="icon-menu-logout"></i><strong>' + _('Logout') + '</strong>', { :controller => 'account', :action => 'logout'} , :id => "logout", :title => _("Leave the system")) %> 68 <%= link_to('<i class="icon-menu-logout"></i><strong>' + _('Logout') + '</strong>', { :controller => 'account', :action => 'logout'} , :id => "logout", :title => _("Leave the system")) %>
69 <% else %> 69 <% else %>
70 - <%= _('%s or %s') % [thickbox_inline_popup_link('<i class="icon-menu-login"></i><strong>' + _('Login') + '</strong>', login_url, 'inlineLoginBox', :id => 'link_login'), link_to('<strong>' + _('Register') + '</strong>', :controller => 'account', :action => 'signup') ] %>  
71 - <div id='inlineLoginBox' style='display: none;'>  
72 - <%= render :file => 'account/login', :locals => { :is_thickbox => true } %>  
73 - </div> 70 + <% if params[:controller] != 'account' || params[:action] != 'signup' %>
  71 + <%= _('%s or %s') % [thickbox_inline_popup_link('<i class="icon-menu-login"></i><strong>' + _('Login') + '</strong>', login_url, 'inlineLoginBox', :id => 'link_login'), link_to('<strong>' + _('Register') + '</strong>', :controller => 'account', :action => 'signup') ] %>
  72 + <div id='inlineLoginBox' style='display: none;'>
  73 + <%= render :file => 'account/login', :locals => { :is_thickbox => true } %>
  74 + </div>
  75 + <% end %>
74 <% end %> 76 <% end %>
75 77
76 <form action="/search" class="search_form" method="get" class="clean"> 78 <form action="/search" class="search_form" method="get" class="clean">
features/join_community.feature
@@ -47,7 +47,7 @@ Feature: join a community @@ -47,7 +47,7 @@ Feature: join a community
47 And I am not logged in 47 And I am not logged in
48 And I go to Sample Community's homepage 48 And I go to Sample Community's homepage
49 And I press "Yes" 49 And I press "Yes"
50 - And I follow "I want to participate" 50 + And I follow "New user"
51 And I fill in the following: 51 And I fill in the following:
52 | e-mail | jose@domain.br | 52 | e-mail | jose@domain.br |
53 | Username | joseoliveira | 53 | Username | joseoliveira |
features/search.feature
@@ -4,36 +4,33 @@ Feature: search @@ -4,36 +4,33 @@ Feature: search
4 In order to find stuff 4 In order to find stuff
5 5
6 Scenario: simple search for person 6 Scenario: simple search for person
7 - Given I am on the homepage  
8 - And the following users 7 + Given the following users
9 | login | name | 8 | login | name |
10 | joaosilva | Joao Silva | 9 | joaosilva | Joao Silva |
11 | josearaujo | Jose Araujo | 10 | josearaujo | Jose Araujo |
12 - When I follow "Search" 11 + When I go to the search page
13 And I fill in "query" with "Silva" 12 And I fill in "query" with "Silva"
14 And I press "Search" 13 And I press "Search"
15 Then I should see "Joao Silva" 14 Then I should see "Joao Silva"
16 And I should not see "Jose Araujo" 15 And I should not see "Jose Araujo"
17 16
18 Scenario: simple search for community 17 Scenario: simple search for community
19 - Given I am on the homepage  
20 - And the following communities 18 + Given the following communities
21 | identifier | name | 19 | identifier | name |
22 | boring-community | Boring community | 20 | boring-community | Boring community |
23 | fancy-community | Fancy community | 21 | fancy-community | Fancy community |
24 - And I follow "Search" 22 + And I go to the search page
25 And I fill in "query" with "fancy" 23 And I fill in "query" with "fancy"
26 And I press "Search" 24 And I press "Search"
27 Then I should see "Fancy community" 25 Then I should see "Fancy community"
28 And I should not see "Boring community" 26 And I should not see "Boring community"
29 27
30 Scenario: simple search for enterprise 28 Scenario: simple search for enterprise
31 - Given I am on the homepage  
32 - And the following enterprises 29 + Given the following enterprises
33 | identifier | name | 30 | identifier | name |
34 | products-factory | Products factory | 31 | products-factory | Products factory |
35 | services-provider | Services Provider | 32 | services-provider | Services Provider |
36 - And I follow "Search" 33 + And I go to the search page
37 And I fill in "query" with "services" 34 And I fill in "query" with "services"
38 And I press "Search" 35 And I press "Search"
39 Then I should see "Services Provider" 36 Then I should see "Services Provider"
@@ -47,8 +44,7 @@ Feature: search @@ -47,8 +44,7 @@ Feature: search
47 | owner | name | body | 44 | owner | name | body |
48 | joaosilva | bees and butterflies | this is an article about bees and butterflies | 45 | joaosilva | bees and butterflies | this is an article about bees and butterflies |
49 | joaosilva | whales and dolphins | this is an article about whales and dolphins | 46 | joaosilva | whales and dolphins | this is an article about whales and dolphins |
50 - And I am on the homepage  
51 - When I follow "Search" 47 + When I go to the search page
52 And I fill in "query" with "whales" 48 And I fill in "query" with "whales"
53 And I press "Search" 49 And I press "Search"
54 Then I should see "whales and dolphins" 50 Then I should see "whales and dolphins"
@@ -63,8 +59,7 @@ Feature: search @@ -63,8 +59,7 @@ Feature: search
63 | owner | name | 59 | owner | name |
64 | colivre-ent | social networks consultancy | 60 | colivre-ent | social networks consultancy |
65 | colivre-ent | wikis consultancy | 61 | colivre-ent | wikis consultancy |
66 - And I am on the homepage  
67 - When I follow "Search" 62 + When I go to the search page
68 And I fill in "query" with "wikis" 63 And I fill in "query" with "wikis"
69 And I press "Search" 64 And I press "Search"
70 Then I should see "wikis consultancy" 65 Then I should see "wikis consultancy"
@@ -79,8 +74,7 @@ Feature: search @@ -79,8 +74,7 @@ Feature: search
79 | owner | name | start_date | 74 | owner | name | start_date |
80 | nice-people | Group meeting | 2009-10-01 | 75 | nice-people | Group meeting | 2009-10-01 |
81 | nice-people | John Doe's birthday | 2009-09-01 | 76 | nice-people | John Doe's birthday | 2009-09-01 |
82 - And I am on the homepage  
83 - When I follow "Search" 77 + When I go to the search page
84 And I fill in "query" with "birthday" 78 And I fill in "query" with "birthday"
85 And I press "Search" 79 And I press "Search"
86 Then I should see "John Doe's birthday" 80 Then I should see "John Doe's birthday"
features/signup.feature
@@ -6,7 +6,7 @@ Feature: signup @@ -6,7 +6,7 @@ Feature: signup
6 Scenario: successfull registration 6 Scenario: successfull registration
7 Given I am on the homepage 7 Given I am on the homepage
8 When I follow "Login" 8 When I follow "Login"
9 - And I follow "I want to participate" 9 + And I follow "New user"
10 And I fill in "e-Mail" with "josesilva@example.com" 10 And I fill in "e-Mail" with "josesilva@example.com"
11 And I fill in "Username" with "josesilva" 11 And I fill in "Username" with "josesilva"
12 And I fill in "Password" with "secret" 12 And I fill in "Password" with "secret"
@@ -26,7 +26,7 @@ Feature: signup @@ -26,7 +26,7 @@ Feature: signup
26 Scenario: user cannot register without a name 26 Scenario: user cannot register without a name
27 Given I am on the homepage 27 Given I am on the homepage
28 And I follow "Login" 28 And I follow "Login"
29 - And I follow "I want to participate" 29 + And I follow "New user"
30 And I fill in "e-Mail" with "josesilva@example.com" 30 And I fill in "e-Mail" with "josesilva@example.com"
31 And I fill in "Username" with "josesilva" 31 And I fill in "Username" with "josesilva"
32 And I fill in "Password" with "secret" 32 And I fill in "Password" with "secret"
features/support/paths.rb
@@ -38,6 +38,9 @@ module NavigationHelpers @@ -38,6 +38,9 @@ module NavigationHelpers
38 when /^(.*)'s control panel$/ 38 when /^(.*)'s control panel$/
39 '/myprofile/%s' % Profile.find_by_name($1).identifier 39 '/myprofile/%s' % Profile.find_by_name($1).identifier
40 40
  41 + when /^the search page$/
  42 + '/search'
  43 +
41 # Add more mappings here. 44 # Add more mappings here.
42 # Here is a more fancy example: 45 # Here is a more fancy example:
43 # 46 #