Commit f484548b94d02442e998c9b3bd4409768f92a33a

Authored by Rodrigo Souto
1 parent b16bd6b2

Fixing selenium broken tests

features/comment_reply.feature
... ... @@ -51,7 +51,7 @@ Feature: comment
51 51 Given I am on /booking/article-to-comment
52 52 When I follow "Reply" within ".comment-balloon"
53 53 And I follow "Cancel" within ".comment-balloon"
54   - Then I should see "Enter your comment" within "div.comment_reply.closed"
  54 + Then I should not see "Enter your comment" within "div.comment_reply.closed"
55 55  
56 56 @selenium-fixme
57 57 Scenario: not render same reply form twice
... ...
features/gallery_navigation.feature
... ... @@ -68,13 +68,19 @@ Feature: gallery_navigation
68 68 When I follow "Go back to my-gallery"
69 69 Then I should be on /marciopunk/my-gallery
70 70  
  71 + # Looking for page title is problematic on selenium since it considers the
  72 + # title to be invibible. Checkout some information about this:
  73 + # * https://github.com/jnicklas/capybara/issues/863
  74 + # * https://github.com/jnicklas/capybara/pull/953
71 75 @selenium
72 76 Scenario: image title in window title
73 77 Given I am logged in as "marciopunk"
74 78 When I go to /marciopunk/other-gallery/rails.png?view=true
75   - And the page title should be "rails.png"
  79 + Then I should see "rails.png" within any "h1"
  80 +# And the page title should be "rails.png"
76 81 And I follow "Edit"
77 82 And I fill in "Title" with "Rails is cool"
78 83 And I press "Save"
79 84 When I go to /marciopunk/other-gallery/rails.png?view=true
80   - Then the page title should be "Rails is cool"
  85 + Then I should see "Rails is cool" within any "h1"
  86 + #Then the page title should be "Rails is cool"
... ...
features/manage_product_price_details.feature
... ... @@ -131,7 +131,7 @@ Feature: manage product price details
131 131 And I follow "New cost"
132 132 And I select "Other cost" from "price_details__production_cost_id" within "#display-product-price-details"
133 133 And I want to add "Energy" as cost
134   - Then I should see "Energy" within "#new-cost-fields"
  134 + Then I should see "Energy" within "#display-product-price-details"
135 135  
136 136 @selenium
137 137 Scenario: remove price detail
... ...
features/support/paths.rb
... ... @@ -92,7 +92,7 @@ module NavigationHelpers
92 92 '/myprofile/%s/manage_products/new' % profile_identifier($1)
93 93  
94 94 when /^(.+)'s page of product (.*)$/
95   - enterprise = profile_identifier($1)
  95 + enterprise = Profile.find_by_name($1)
96 96 product = enterprise.products.find_by_name($2)
97 97 '/myprofile/%s/manage_products/show/%s' % [enterprise.identifier, product.id]
98 98  
... ...