diff --git a/features/profile_photos.feature b/features/profile_photos.feature new file mode 100644 index 0000000000000000000000000000000000000000..435cb704e2d800ebe5df0d0c7fd95864d6ec0dcd --- /dev/null +++ b/features/profile_photos.feature @@ -0,0 +1,27 @@ +@javascript +Feature: show photos + + Background: + Given following users exist: + | username | email | + | Bob Jones | bob@bob.bob | + | Alice Smith | alice@alice.alice | + | Robert Grimm | robert@grimm.grimm | + And I sign in as "robert@grimm.grimm" + + Given I expand the publisher + And I have turned off jQuery effects + And I attach the file "spec/fixtures/button.png" to hidden "file" within "#file-upload" + And I press "Share" + + Scenario: see my own photos + And I am on "robert@grimm.grimm"'s page + When I follow "View all" + Then I should be on person_photos page + + Scenario: I cannot see photos of people who don't share with me + When I sign in as "alice@alice.alice" + And I am on "robert@grimm.grimm"'s page + Then I should not see "photos" within "div#profile" + + diff --git a/features/support/paths.rb b/features/support/paths.rb index b3553e14109d3c0c42b8de086ed92fda5e76300d..fd18b67bec3dedfde3f4a6853e48fa9d7f6a3a89 100644 --- a/features/support/paths.rb +++ b/features/support/paths.rb @@ -1,6 +1,8 @@ module NavigationHelpers def path_to(page_name) case page_name + when /^person_photos page$/ + person_photos_path(@me.person) when /^the home(?: )?page$/ stream_path when /^step (\d)$/