Commit 8115e611af1479f144ad95d71009b15d6723b362
1 parent
a3cf9ea4
Exists in
follow_step_fix
Fixes some selenium tests failing on "Follow" step
Signed-off-by: Tallys Martins <tallysmartins@yahoo.com.br>
Showing
2 changed files
with
10 additions
and
2 deletions
Show diff stats
features/edit_article.feature
@@ -90,7 +90,7 @@ Feature: edit article | @@ -90,7 +90,7 @@ Feature: edit article | ||
90 | And I fill in "Title" with "My Folder" | 90 | And I fill in "Title" with "My Folder" |
91 | And I choose "article_published_false" | 91 | And I choose "article_published_false" |
92 | And I uncheck "article_show_to_followers" | 92 | And I uncheck "article_show_to_followers" |
93 | - Then I should see "Fill in the search field to add the exception users to see this content" | 93 | + Then I should see "Allow only community members entered below to view this content" |
94 | 94 | ||
95 | @selenium | 95 | @selenium |
96 | Scenario: allowed user should see the content of a folder | 96 | Scenario: allowed user should see the content of a folder |
features/step_definitions/web_steps.rb
@@ -39,7 +39,15 @@ end | @@ -39,7 +39,15 @@ end | ||
39 | 39 | ||
40 | When /^(?:|I )follow "([^"]*)"(?: within "([^"]*)")?$/ do |link, selector| | 40 | When /^(?:|I )follow "([^"]*)"(?: within "([^"]*)")?$/ do |link, selector| |
41 | with_scope(selector) do | 41 | with_scope(selector) do |
42 | - click_link(link, :match => :prefer_exact) | 42 | + |
43 | + obj = find_link(link, :match => :prefer_exact) | ||
44 | + | ||
45 | + #FIXME need to investigate why selenium click is not working proprerly with | ||
46 | + if page.driver.class.name.include? "Selenium" | ||
47 | + page.driver.execute_script("document.evaluate('#{obj.path}', document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue.click();") | ||
48 | + else | ||
49 | + obj.click | ||
50 | + end | ||
43 | end | 51 | end |
44 | end | 52 | end |
45 | 53 |