From d0f6fe441f47b11586748d9d14f92bf4a8ff5b1d Mon Sep 17 00:00:00 2001 From: Sarah Mei Date: Tue, 6 Sep 2011 06:35:08 -0700 Subject: [PATCH] Try a different method of toggling aspects within cucumber features. --- features/mentions_from_profile_page.feature | 25 +++++++++++---------- features/posts_from_main_page.feature | 16 ++++++------- 2 files changed, 21 insertions(+), 20 deletions(-) diff --git a/features/mentions_from_profile_page.feature b/features/mentions_from_profile_page.feature index fb9bb3b12..b207f5bdc 100644 --- a/features/mentions_from_profile_page.feature +++ b/features/mentions_from_profile_page.feature @@ -2,7 +2,7 @@ Feature: mentioning a contact from their profile page In order to enlighten humanity for the good of society As a rock star - I want to mention someone I think is cool + I want to mention someone more cool than the average bear Background: Given I am on the home page @@ -11,10 +11,10 @@ Feature: mentioning a contact from their profile page When I sign in as "bob@bob.bob" And a user with username "bob" is connected with "alice" - And I have an aspect called "PostTo" - And I have an aspect called "DidntPostTo" - And I have user with username "alice" in an aspect called "PostTo" - And I have user with username "alice" in an aspect called "DidntPostTo" + And I have an aspect called "PostingTo" + And I have an aspect called "NotPostingTo" + And I have user with username "alice" in an aspect called "PostingTo" + And I have user with username "alice" in an aspect called "NotPostingTo" And I am on the home page @@ -27,12 +27,12 @@ Feature: mentioning a contact from their profile page And I press "Share" in the modal window When I am on the aspects page - And I follow "PostTo" within "#aspect_nav" + And I follow "PostingTo" within "#aspect_nav" And I wait for the ajax to finish Then I should see "I am eating a yogurt" - When I am on the aspects page - And I follow "DidntPostTo" within "#aspect_nav" + When I follow "Your Aspects" within "#aspect_nav" + And I follow "NotPostingTo" within "#aspect_nav" And I wait for the ajax to finish Then I should see "I am eating a yogurt" @@ -40,18 +40,19 @@ Feature: mentioning a contact from their profile page Given I am on "alice@alice.alice"'s page And I have turned off jQuery effects And I click "Mention" button + And I wait for the ajax to finish And I expand the publisher in the modal window And I append "I am eating a yogurt" to the publisher And I press the aspect dropdown in the modal window - And I toggle the aspect "DidntPostTo" in the modal window + And I toggle the aspect "NotPostingTo" in the modal window And I press "Share" in the modal window When I am on the aspects page - And I follow "PostTo" within "#aspect_nav" + And I follow "PostingTo" within "#aspect_nav" And I wait for the ajax to finish Then I should see "I am eating a yogurt" - When I am on the aspects page - And I follow "DidntPostTo" within "#aspect_nav" + When I follow "Your Aspects" within "#aspect_nav" + And I follow "NotPostingTo" within "#aspect_nav" And I wait for the ajax to finish Then I should not see "I am eating a yogurt" diff --git a/features/posts_from_main_page.feature b/features/posts_from_main_page.feature index 5950a5f75..10489a3fc 100644 --- a/features/posts_from_main_page.feature +++ b/features/posts_from_main_page.feature @@ -11,10 +11,10 @@ Feature: posting from the main page When I sign in as "bob@bob.bob" And a user with username "bob" is connected with "alice" - And I have an aspect called "PostTo" - And I have an aspect called "DidntPostTo" - And I have user with username "alice" in an aspect called "PostTo" - And I have user with username "alice" in an aspect called "DidntPostTo" + And I have an aspect called "PostingTo" + And I have an aspect called "NotPostingTo" + And I have user with username "alice" in an aspect called "PostingTo" + And I have user with username "alice" in an aspect called "NotPostingTo" And I am on the home page @@ -26,7 +26,7 @@ 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 "PostTo" + When I follow "PostingTo" And I wait for the ajax to finish And I expand the publisher And I fill in "status_message_fake_text" with "I am eating a yogurt" @@ -34,12 +34,12 @@ Feature: posting from the main page And I wait for the ajax to finish When I am on the aspects page - And I follow "PostTo" within "#aspect_nav" + And I follow "PostingTo" within "#aspect_nav" And I wait for the ajax to finish Then I should see "I am eating a yogurt" - When I am on the aspects page - And I follow "DidntPostTo" within "#aspect_nav" + When I follow "Your Aspects" within "#aspect_nav" + And I follow "NotPostingTo" within "#aspect_nav" And I wait for the ajax to finish Then I should not see "I am eating a yogurt"