Adapt some cukes for the new aspect nav refactor

This commit is contained in:
Gonzalo Rodriguez 2011-10-01 04:49:05 -03:00
parent d3a5bc1fb8
commit dee0c06896
4 changed files with 18 additions and 15 deletions

View file

@ -62,8 +62,7 @@ Feature: commenting
When I focus the comment field
Then the first comment field should be open
When I follow "Besties"
And I wait for the ajax to finish
When I select "Besties" aspect
Then I should see "Look at this dog"
Then the first comment field should be closed
When I focus the comment field

View file

@ -26,21 +26,18 @@ Feature: posting from the main page
Then I should see "I am eating a yogurt" within ".stream_element"
Scenario: post a text-only message to just one aspect
When I follow "PostingTo"
And I wait for the ajax to finish
When I select "PostingTo" aspect
And I expand the publisher
And I fill in "status_message_fake_text" with "I am eating a yogurt"
And I press "Share"
And I wait for the ajax to finish
When I am on the aspects page
And I follow "PostingTo" within "#aspect_nav"
And I wait for the ajax to finish
And I select "PostingTo" aspect
Then I should see "I am eating a yogurt"
When I am on the aspects page
And I follow "NotPostingThingsHere" within "#aspect_nav"
And I wait for the ajax to finish
And I select "NotPostingThingsHere" aspect
Then I should not see "I am eating a yogurt"
Scenario: post a photo with text

View file

@ -0,0 +1,14 @@
When /^I click on "([^"]*)" aspect edit icon$/ do |aspect_name|
When %{I hover over the "ul.sub_nav > li:contains('#{aspect_name}')"}
within("#aspect_nav") do
find(:xpath, "//a[@rel='facebox'][.//img[@title='Edit #{aspect_name}']]").click
end
end
When /^I select "([^"]*)" aspect$/ do |aspect_name|
within('#aspect_nav') do
click_link 'Deselect all'
click_link aspect_name
end
And %{I wait for the ajax to finish}
end

View file

@ -189,13 +189,6 @@ When /^I resize my window to 800x600$/ do
JS
end
When /^I click on "([^"]*)" aspect edit icon$/ do |aspect_name|
When %{I hover over the "ul.sub_nav > li:contains('#{aspect_name}')"}
within("#aspect_nav") do
find(:xpath, "//a[@rel='facebox'][.//img[@title='Edit #{aspect_name}']]").click
end
end
Then /^I follow Edit Profile in the same window$/ do
page.execute_script("$('a[href=\"#{edit_profile_path}\"]').removeAttr('target')")