From 9cceca21e1c9df24694e8880ce10c61060244cdb Mon Sep 17 00:00:00 2001 From: Antonio Terceiro Date: Wed, 20 Jan 2010 14:44:36 -0300 Subject: [PATCH] Making the remaining acceptance tests pass with the new default layout --- app/views/layouts/application-ng.rhtml | 10 ++++++---- features/join_community.feature | 2 +- features/search.feature | 24 +++++++++--------------- features/signup.feature | 4 ++-- features/support/paths.rb | 3 +++ 5 files changed, 21 insertions(+), 22 deletions(-) diff --git a/app/views/layouts/application-ng.rhtml b/app/views/layouts/application-ng.rhtml index 3e1e747..fff6664 100644 --- a/app/views/layouts/application-ng.rhtml +++ b/app/views/layouts/application-ng.rhtml @@ -67,10 +67,12 @@ <% end %> <%= link_to('' + _('Logout') + '', { :controller => 'account', :action => 'logout'} , :id => "logout", :title => _("Leave the system")) %> <% else %> - <%= _('%s or %s') % [thickbox_inline_popup_link('' + _('Login') + '', login_url, 'inlineLoginBox', :id => 'link_login'), link_to('' + _('Register') + '', :controller => 'account', :action => 'signup') ] %> - + <% if params[:controller] != 'account' || params[:action] != 'signup' %> + <%= _('%s or %s') % [thickbox_inline_popup_link('' + _('Login') + '', login_url, 'inlineLoginBox', :id => 'link_login'), link_to('' + _('Register') + '', :controller => 'account', :action => 'signup') ] %> + + <% end %> <% end %>
diff --git a/features/join_community.feature b/features/join_community.feature index 7687292..53b1ec9 100644 --- a/features/join_community.feature +++ b/features/join_community.feature @@ -47,7 +47,7 @@ Feature: join a community And I am not logged in And I go to Sample Community's homepage And I press "Yes" - And I follow "I want to participate" + And I follow "New user" And I fill in the following: | e-mail | jose@domain.br | | Username | joseoliveira | diff --git a/features/search.feature b/features/search.feature index a6e1da4..f5d22df 100644 --- a/features/search.feature +++ b/features/search.feature @@ -4,36 +4,33 @@ Feature: search In order to find stuff Scenario: simple search for person - Given I am on the homepage - And the following users + Given the following users | login | name | | joaosilva | Joao Silva | | josearaujo | Jose Araujo | - When I follow "Search" + When I go to the search page And I fill in "query" with "Silva" And I press "Search" Then I should see "Joao Silva" And I should not see "Jose Araujo" Scenario: simple search for community - Given I am on the homepage - And the following communities + Given the following communities | identifier | name | | boring-community | Boring community | | fancy-community | Fancy community | - And I follow "Search" + And I go to the search page And I fill in "query" with "fancy" And I press "Search" Then I should see "Fancy community" And I should not see "Boring community" Scenario: simple search for enterprise - Given I am on the homepage - And the following enterprises + Given the following enterprises | identifier | name | | products-factory | Products factory | | services-provider | Services Provider | - And I follow "Search" + And I go to the search page And I fill in "query" with "services" And I press "Search" Then I should see "Services Provider" @@ -47,8 +44,7 @@ Feature: search | owner | name | body | | joaosilva | bees and butterflies | this is an article about bees and butterflies | | joaosilva | whales and dolphins | this is an article about whales and dolphins | - And I am on the homepage - When I follow "Search" + When I go to the search page And I fill in "query" with "whales" And I press "Search" Then I should see "whales and dolphins" @@ -63,8 +59,7 @@ Feature: search | owner | name | | colivre-ent | social networks consultancy | | colivre-ent | wikis consultancy | - And I am on the homepage - When I follow "Search" + When I go to the search page And I fill in "query" with "wikis" And I press "Search" Then I should see "wikis consultancy" @@ -79,8 +74,7 @@ Feature: search | owner | name | start_date | | nice-people | Group meeting | 2009-10-01 | | nice-people | John Doe's birthday | 2009-09-01 | - And I am on the homepage - When I follow "Search" + When I go to the search page And I fill in "query" with "birthday" And I press "Search" Then I should see "John Doe's birthday" diff --git a/features/signup.feature b/features/signup.feature index 9bac886..cb57856 100644 --- a/features/signup.feature +++ b/features/signup.feature @@ -6,7 +6,7 @@ Feature: signup Scenario: successfull registration Given I am on the homepage When I follow "Login" - And I follow "I want to participate" + And I follow "New user" And I fill in "e-Mail" with "josesilva@example.com" And I fill in "Username" with "josesilva" And I fill in "Password" with "secret" @@ -26,7 +26,7 @@ Feature: signup Scenario: user cannot register without a name Given I am on the homepage And I follow "Login" - And I follow "I want to participate" + And I follow "New user" And I fill in "e-Mail" with "josesilva@example.com" And I fill in "Username" with "josesilva" And I fill in "Password" with "secret" diff --git a/features/support/paths.rb b/features/support/paths.rb index e258b0e..c27f494 100644 --- a/features/support/paths.rb +++ b/features/support/paths.rb @@ -38,6 +38,9 @@ module NavigationHelpers when /^(.*)'s control panel$/ '/myprofile/%s' % Profile.find_by_name($1).identifier + when /^the search page$/ + '/search' + # Add more mappings here. # Here is a more fancy example: # -- libgit2 0.21.2