Commit 146786cb029924476bbff5cb30d62a72e02b86e3
1 parent
5034abbb
Exists in
master
and in
23 other branches
Fixing cucumber tests
Showing
5 changed files
with
20 additions
and
3 deletions
Show diff stats
app/views/catalog/index.rhtml
| @@ -7,13 +7,15 @@ | @@ -7,13 +7,15 @@ | ||
| 7 | 7 | ||
| 8 | <div class='l-sidebar-left-bar'> | 8 | <div class='l-sidebar-left-bar'> |
| 9 | <ul> | 9 | <ul> |
| 10 | - <% if @categories.size > 0 %> | 10 | + <% if @categories.present? %> |
| 11 | <% @categories.each do |category| %> | 11 | <% @categories.each do |category| %> |
| 12 | <%= category_link(category) %> | 12 | <%= category_link(category) %> |
| 13 | <%= category_sub_links(category) %> | 13 | <%= category_sub_links(category) %> |
| 14 | <% end %> | 14 | <% end %> |
| 15 | + <% elsif @category.present? %> | ||
| 16 | + <%= content_tag('li', _('There are no sub-categories for %s') % @category.name, :id => 'catalog-categories-notice') %> | ||
| 15 | <% else %> | 17 | <% else %> |
| 16 | - <%= content_tag('li', _('There are no sub-categories for %s') % @category.name, :style => 'color: #555753; padding-bottom: 0.5em;') %> | 18 | + <%= content_tag('li', _('There are no categories available.'), :id => 'catalog-categories-notice') %> |
| 17 | <% end %> | 19 | <% end %> |
| 18 | </ul> | 20 | </ul> |
| 19 | </div> | 21 | </div> |
features/browse_catalogs.feature
| @@ -18,7 +18,7 @@ Feature: browse catalogs | @@ -18,7 +18,7 @@ Feature: browse catalogs | ||
| 18 | 18 | ||
| 19 | Scenario: display titles | 19 | Scenario: display titles |
| 20 | Then I should see "Associação de Artesanato de Bonito" | 20 | Then I should see "Associação de Artesanato de Bonito" |
| 21 | - And I should see "Products/Services" within "#product-list" | 21 | + And I should see "Products/Services" |
| 22 | 22 | ||
| 23 | Scenario: display the simplest possible product | 23 | Scenario: display the simplest possible product |
| 24 | Given the following products | 24 | Given the following products |
features/signup.feature
| @@ -3,6 +3,7 @@ Feature: signup | @@ -3,6 +3,7 @@ Feature: signup | ||
| 3 | I want to sign up to the site | 3 | I want to sign up to the site |
| 4 | So I can have fun using its features | 4 | So I can have fun using its features |
| 5 | 5 | ||
| 6 | +@selenium | ||
| 6 | Scenario: successfull registration | 7 | Scenario: successfull registration |
| 7 | Given I am on the homepage | 8 | Given I am on the homepage |
| 8 | When I follow "Login" | 9 | When I follow "Login" |
| @@ -13,6 +14,7 @@ Feature: signup | @@ -13,6 +14,7 @@ Feature: signup | ||
| 13 | | Password | secret | | 14 | | Password | secret | |
| 14 | | Password confirmation | secret | | 15 | | Password confirmation | secret | |
| 15 | | Full name | José da Silva | | 16 | | Full name | José da Silva | |
| 17 | + And wait for the captcha signup time | ||
| 16 | And I press "Create my account" | 18 | And I press "Create my account" |
| 17 | Then I should not be logged in | 19 | Then I should not be logged in |
| 18 | And I should receive an e-mail on josesilva@example.com | 20 | And I should receive an e-mail on josesilva@example.com |
| @@ -36,6 +38,7 @@ Feature: signup | @@ -36,6 +38,7 @@ Feature: signup | ||
| 36 | And I go to signup page | 38 | And I go to signup page |
| 37 | Then I should be on Joao Silva's control panel | 39 | Then I should be on Joao Silva's control panel |
| 38 | 40 | ||
| 41 | + @selenium | ||
| 39 | Scenario: user cannot register without a name | 42 | Scenario: user cannot register without a name |
| 40 | Given I am on the homepage | 43 | Given I am on the homepage |
| 41 | And I follow "Login" | 44 | And I follow "Login" |
| @@ -44,6 +47,7 @@ Feature: signup | @@ -44,6 +47,7 @@ Feature: signup | ||
| 44 | And I fill in "Username" with "josesilva" | 47 | And I fill in "Username" with "josesilva" |
| 45 | And I fill in "Password" with "secret" | 48 | And I fill in "Password" with "secret" |
| 46 | And I fill in "Password confirmation" with "secret" | 49 | And I fill in "Password confirmation" with "secret" |
| 50 | + And wait for the captcha signup time | ||
| 47 | And I press "Create my account" | 51 | And I press "Create my account" |
| 48 | Then I should see "Name can't be blank" | 52 | Then I should see "Name can't be blank" |
| 49 | 53 |
features/step_definitions/noosfero_steps.rb
| @@ -538,6 +538,7 @@ end | @@ -538,6 +538,7 @@ end | ||
| 538 | 538 | ||
| 539 | Then /^I should receive an e-mail on (.*)$/ do |address| | 539 | Then /^I should receive an e-mail on (.*)$/ do |address| |
| 540 | last_mail = ActionMailer::Base.deliveries.last | 540 | last_mail = ActionMailer::Base.deliveries.last |
| 541 | + last_mail.nil?.should be_false | ||
| 541 | last_mail['to'].to_s.should == address | 542 | last_mail['to'].to_s.should == address |
| 542 | end | 543 | end |
| 543 | 544 | ||
| @@ -748,3 +749,8 @@ Given /^the profile (.*) is configured to (.*) after login$/ do |profile, option | @@ -748,3 +749,8 @@ Given /^the profile (.*) is configured to (.*) after login$/ do |profile, option | ||
| 748 | profile.redirection_after_login = redirection | 749 | profile.redirection_after_login = redirection |
| 749 | profile.save | 750 | profile.save |
| 750 | end | 751 | end |
| 752 | + | ||
| 753 | +When /^wait for the captcha signup time$/ do | ||
| 754 | + environment = Environment.default | ||
| 755 | + sleep environment.min_signup_delay + 1 | ||
| 756 | +end |
public/stylesheets/application.css
| @@ -2715,6 +2715,11 @@ div#activation_enterprise label, div#activation_enterprise input, div#activation | @@ -2715,6 +2715,11 @@ div#activation_enterprise label, div#activation_enterprise input, div#activation | ||
| 2715 | padding: 0; | 2715 | padding: 0; |
| 2716 | } | 2716 | } |
| 2717 | 2717 | ||
| 2718 | +#catalog-categories-notice { | ||
| 2719 | + color: #555753; | ||
| 2720 | + padding-bottom: 0.5em; | ||
| 2721 | +} | ||
| 2722 | + | ||
| 2718 | /* * * Show Product * * * * * * * * * * * * */ | 2723 | /* * * Show Product * * * * * * * * * * * * */ |
| 2719 | 2724 | ||
| 2720 | .controller-catalog #show_product .product-pic { | 2725 | .controller-catalog #show_product .product-pic { |