From 146786cb029924476bbff5cb30d62a72e02b86e3 Mon Sep 17 00:00:00 2001 From: Rodrigo Souto Date: Mon, 18 Mar 2013 22:58:14 +0000 Subject: [PATCH] Fixing cucumber tests --- app/views/catalog/index.rhtml | 6 ++++-- features/browse_catalogs.feature | 2 +- features/signup.feature | 4 ++++ features/step_definitions/noosfero_steps.rb | 6 ++++++ public/stylesheets/application.css | 5 +++++ 5 files changed, 20 insertions(+), 3 deletions(-) diff --git a/app/views/catalog/index.rhtml b/app/views/catalog/index.rhtml index bdfec1c..a0e35df 100644 --- a/app/views/catalog/index.rhtml +++ b/app/views/catalog/index.rhtml @@ -7,13 +7,15 @@ diff --git a/features/browse_catalogs.feature b/features/browse_catalogs.feature index 4c1d254..24a3124 100644 --- a/features/browse_catalogs.feature +++ b/features/browse_catalogs.feature @@ -18,7 +18,7 @@ Feature: browse catalogs Scenario: display titles Then I should see "Associação de Artesanato de Bonito" - And I should see "Products/Services" within "#product-list" + And I should see "Products/Services" Scenario: display the simplest possible product Given the following products diff --git a/features/signup.feature b/features/signup.feature index 08f930e..457ef78 100644 --- a/features/signup.feature +++ b/features/signup.feature @@ -3,6 +3,7 @@ Feature: signup I want to sign up to the site So I can have fun using its features +@selenium Scenario: successfull registration Given I am on the homepage When I follow "Login" @@ -13,6 +14,7 @@ Feature: signup | Password | secret | | Password confirmation | secret | | Full name | José da Silva | + And wait for the captcha signup time And I press "Create my account" Then I should not be logged in And I should receive an e-mail on josesilva@example.com @@ -36,6 +38,7 @@ Feature: signup And I go to signup page Then I should be on Joao Silva's control panel + @selenium Scenario: user cannot register without a name Given I am on the homepage And I follow "Login" @@ -44,6 +47,7 @@ Feature: signup And I fill in "Username" with "josesilva" And I fill in "Password" with "secret" And I fill in "Password confirmation" with "secret" + And wait for the captcha signup time And I press "Create my account" Then I should see "Name can't be blank" diff --git a/features/step_definitions/noosfero_steps.rb b/features/step_definitions/noosfero_steps.rb index ef647a7..49e0638 100644 --- a/features/step_definitions/noosfero_steps.rb +++ b/features/step_definitions/noosfero_steps.rb @@ -538,6 +538,7 @@ end Then /^I should receive an e-mail on (.*)$/ do |address| last_mail = ActionMailer::Base.deliveries.last + last_mail.nil?.should be_false last_mail['to'].to_s.should == address end @@ -748,3 +749,8 @@ Given /^the profile (.*) is configured to (.*) after login$/ do |profile, option profile.redirection_after_login = redirection profile.save end + +When /^wait for the captcha signup time$/ do + environment = Environment.default + sleep environment.min_signup_delay + 1 +end diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index e8c733d..a65d9d4 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -2715,6 +2715,11 @@ div#activation_enterprise label, div#activation_enterprise input, div#activation padding: 0; } +#catalog-categories-notice { + color: #555753; + padding-bottom: 0.5em; +} + /* * * Show Product * * * * * * * * * * * * */ .controller-catalog #show_product .product-pic { -- libgit2 0.21.2