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 When I focus the comment field
Then the first comment field should be open Then the first comment field should be open
When I follow "Besties" When I select "Besties" aspect
And I wait for the ajax to finish
Then I should see "Look at this dog" Then I should see "Look at this dog"
Then the first comment field should be closed Then the first comment field should be closed
When I focus the comment field 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" Then I should see "I am eating a yogurt" within ".stream_element"
Scenario: post a text-only message to just one aspect Scenario: post a text-only message to just one aspect
When I follow "PostingTo" When I select "PostingTo" aspect
And I wait for the ajax to finish
And I expand the publisher And I expand the publisher
And I fill in "status_message_fake_text" with "I am eating a yogurt" And I fill in "status_message_fake_text" with "I am eating a yogurt"
And I press "Share" And I press "Share"
And I wait for the ajax to finish And I wait for the ajax to finish
When I am on the aspects page When I am on the aspects page
And I follow "PostingTo" within "#aspect_nav" And I select "PostingTo" aspect
And I wait for the ajax to finish
Then I should see "I am eating a yogurt" Then I should see "I am eating a yogurt"
When I am on the aspects page When I am on the aspects page
And I follow "NotPostingThingsHere" within "#aspect_nav" And I select "NotPostingThingsHere" aspect
And I wait for the ajax to finish
Then I should not see "I am eating a yogurt" Then I should not see "I am eating a yogurt"
Scenario: post a photo with text 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 JS
end 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 Then /^I follow Edit Profile in the same window$/ do
page.execute_script("$('a[href=\"#{edit_profile_path}\"]').removeAttr('target')") page.execute_script("$('a[href=\"#{edit_profile_path}\"]').removeAttr('target')")