From f484548b94d02442e998c9b3bd4409768f92a33a Mon Sep 17 00:00:00 2001 From: Rodrigo Souto Date: Wed, 27 Mar 2013 19:08:16 +0000 Subject: [PATCH] Fixing selenium broken tests --- features/comment_reply.feature | 2 +- features/gallery_navigation.feature | 10 ++++++++-- features/manage_product_price_details.feature | 2 +- features/support/paths.rb | 2 +- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/features/comment_reply.feature b/features/comment_reply.feature index 06c153b..bb2cdfa 100644 --- a/features/comment_reply.feature +++ b/features/comment_reply.feature @@ -51,7 +51,7 @@ Feature: comment Given I am on /booking/article-to-comment When I follow "Reply" within ".comment-balloon" And I follow "Cancel" within ".comment-balloon" - Then I should see "Enter your comment" within "div.comment_reply.closed" + Then I should not see "Enter your comment" within "div.comment_reply.closed" @selenium-fixme Scenario: not render same reply form twice diff --git a/features/gallery_navigation.feature b/features/gallery_navigation.feature index 42108e9..3b22e31 100644 --- a/features/gallery_navigation.feature +++ b/features/gallery_navigation.feature @@ -68,13 +68,19 @@ Feature: gallery_navigation When I follow "Go back to my-gallery" Then I should be on /marciopunk/my-gallery + # Looking for page title is problematic on selenium since it considers the + # title to be invibible. Checkout some information about this: + # * https://github.com/jnicklas/capybara/issues/863 + # * https://github.com/jnicklas/capybara/pull/953 @selenium Scenario: image title in window title Given I am logged in as "marciopunk" When I go to /marciopunk/other-gallery/rails.png?view=true - And the page title should be "rails.png" + Then I should see "rails.png" within any "h1" +# And the page title should be "rails.png" And I follow "Edit" And I fill in "Title" with "Rails is cool" And I press "Save" When I go to /marciopunk/other-gallery/rails.png?view=true - Then the page title should be "Rails is cool" + Then I should see "Rails is cool" within any "h1" + #Then the page title should be "Rails is cool" diff --git a/features/manage_product_price_details.feature b/features/manage_product_price_details.feature index 53ac95f..32265cf 100644 --- a/features/manage_product_price_details.feature +++ b/features/manage_product_price_details.feature @@ -131,7 +131,7 @@ Feature: manage product price details And I follow "New cost" And I select "Other cost" from "price_details__production_cost_id" within "#display-product-price-details" And I want to add "Energy" as cost - Then I should see "Energy" within "#new-cost-fields" + Then I should see "Energy" within "#display-product-price-details" @selenium Scenario: remove price detail diff --git a/features/support/paths.rb b/features/support/paths.rb index c71c05a..12fb4c2 100644 --- a/features/support/paths.rb +++ b/features/support/paths.rb @@ -92,7 +92,7 @@ module NavigationHelpers '/myprofile/%s/manage_products/new' % profile_identifier($1) when /^(.+)'s page of product (.*)$/ - enterprise = profile_identifier($1) + enterprise = Profile.find_by_name($1) product = enterprise.products.find_by_name($2) '/myprofile/%s/manage_products/show/%s' % [enterprise.identifier, product.id] -- libgit2 0.21.2