Commit f484548b94d02442e998c9b3bd4409768f92a33a
1 parent
b16bd6b2
Exists in
master
and in
29 other branches
Fixing selenium broken tests
Showing
4 changed files
with
11 additions
and
5 deletions
Show diff stats
features/comment_reply.feature
@@ -51,7 +51,7 @@ Feature: comment | @@ -51,7 +51,7 @@ Feature: comment | ||
51 | Given I am on /booking/article-to-comment | 51 | Given I am on /booking/article-to-comment |
52 | When I follow "Reply" within ".comment-balloon" | 52 | When I follow "Reply" within ".comment-balloon" |
53 | And I follow "Cancel" within ".comment-balloon" | 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 | @selenium-fixme | 56 | @selenium-fixme |
57 | Scenario: not render same reply form twice | 57 | Scenario: not render same reply form twice |
features/gallery_navigation.feature
@@ -68,13 +68,19 @@ Feature: gallery_navigation | @@ -68,13 +68,19 @@ Feature: gallery_navigation | ||
68 | When I follow "Go back to my-gallery" | 68 | When I follow "Go back to my-gallery" |
69 | Then I should be on /marciopunk/my-gallery | 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 | @selenium | 75 | @selenium |
72 | Scenario: image title in window title | 76 | Scenario: image title in window title |
73 | Given I am logged in as "marciopunk" | 77 | Given I am logged in as "marciopunk" |
74 | When I go to /marciopunk/other-gallery/rails.png?view=true | 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 | And I follow "Edit" | 81 | And I follow "Edit" |
77 | And I fill in "Title" with "Rails is cool" | 82 | And I fill in "Title" with "Rails is cool" |
78 | And I press "Save" | 83 | And I press "Save" |
79 | When I go to /marciopunk/other-gallery/rails.png?view=true | 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,7 +131,7 @@ Feature: manage product price details | ||
131 | And I follow "New cost" | 131 | And I follow "New cost" |
132 | And I select "Other cost" from "price_details__production_cost_id" within "#display-product-price-details" | 132 | And I select "Other cost" from "price_details__production_cost_id" within "#display-product-price-details" |
133 | And I want to add "Energy" as cost | 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 | @selenium | 136 | @selenium |
137 | Scenario: remove price detail | 137 | Scenario: remove price detail |
features/support/paths.rb
@@ -92,7 +92,7 @@ module NavigationHelpers | @@ -92,7 +92,7 @@ module NavigationHelpers | ||
92 | '/myprofile/%s/manage_products/new' % profile_identifier($1) | 92 | '/myprofile/%s/manage_products/new' % profile_identifier($1) |
93 | 93 | ||
94 | when /^(.+)'s page of product (.*)$/ | 94 | when /^(.+)'s page of product (.*)$/ |
95 | - enterprise = profile_identifier($1) | 95 | + enterprise = Profile.find_by_name($1) |
96 | product = enterprise.products.find_by_name($2) | 96 | product = enterprise.products.find_by_name($2) |
97 | '/myprofile/%s/manage_products/show/%s' % [enterprise.identifier, product.id] | 97 | '/myprofile/%s/manage_products/show/%s' % [enterprise.identifier, product.id] |
98 | 98 |