Skip to content

Commit

Permalink
Merge pull request #7 from cesy/otwarchive
Browse files Browse the repository at this point in the history
---

Covers bookmarking as well, including newly-discovered issue.
  • Loading branch information
thecatwasnot committed Feb 8, 2011
2 parents 046aef1 + 53cf5ad commit 5100a1f
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 3 deletions.
42 changes: 40 additions & 2 deletions features/collection_anonymity.feature
Expand Up @@ -67,16 +67,34 @@ Feature: Collection
Then I should see "New Snippet by myname1"
And I should see "Old Snippet by myname1"
And I should see "Another Snippet by myname1"

# bookmark a hidden work
When I follow "Another Snippet"
And I follow "Bookmark"
And I fill in "bookmark_notes" with "I liked this story"
And I press "Create"
Then I should see "Bookmark was successfully created"

When I follow "Log out"
And I go to "Hidden Treasury" collection's page
Then I should see "Mystery Work"
And I should see "Part of Hidden Treasury"
When I go to the bookmarks page
Then I should see "List of Bookmarks"
And "Issue 2208" is fixed
# And I should see "Mystery Work"
# And I should not see "Another Snippet"
And I should see "Another Snippet"

When I am logged in as "myname2" with password "something"
And I go to the collections page
And I follow "Hidden Treasury"
Then I should see "Mystery Work"
And I should see "Part of Hidden Treasury"
And I should not see "Old Snippet"
And I should not see "Another Snippet"
And I should not see "New Snippet"
And I should not see "myname1"

# Reveal the collection
When I follow "Settings"
Expand Down Expand Up @@ -124,7 +142,11 @@ Feature: Collection
Then I should not see "This work is part of an ongoing challenge and will be revealed soon"
And I should see "This is another new snippet written for this hidden challenge"


# bookmark should now be revealed
When I go to the bookmarks page
Then I should see "List of Bookmarks"
And I should not see "Mystery Work"
And I should see "Another Snippet"

Scenario: Create an anonymous collection, add new and existing works to it, reveal authors

Expand Down Expand Up @@ -190,11 +212,22 @@ Feature: Collection
Then I should see "New Snippet by Anonymous"
And I should see "Old Snippet by Anonymous"
And I should see "Another Snippet by Anonymous"

# bookmark an anonymous work
When I follow "Another Snippet"
And I follow "Bookmark"
And I fill in "bookmark_notes" with "I liked this story"
And I press "Create"
Then I should see "Bookmark was successfully created"

When I follow "Log out"
And I go to "Anonymous Hugs" collection's page
Then I should see "New Snippet by Anonymous"
And I should see "Old Snippet by Anonymous"
And I should see "Another Snippet by Anonymous"
When I go to the bookmarks page
Then I should see "List of Bookmarks"
And I should see "Another Snippet by Anonymous"

When I am logged in as "myname2" with password "something"
And I go to the collections page
Expand Down Expand Up @@ -231,6 +264,11 @@ Feature: Collection
When I view the work "Another Snippet"
Then I should see "myname1" within ".byline"


# bookmark should now be revealed
When I go to the bookmarks page
Then I should see "List of Bookmarks"
And I should see "Another Snippet by myname1"
And I should not see "Another Snippet by Anonymous"

# Scenario: TODO Create a hidden and anonymous collection, add new and existing works to it, reveal works, then reveal authors
# Isn't this partially covered by challenge_yuletide? Probably better to expand that.
2 changes: 1 addition & 1 deletion features/support/paths.rb
Expand Up @@ -61,7 +61,7 @@ def path_to(page_name)
skin_path(Skin.find_by_title($1))
when /^"(.*)" edit skin page/
edit_skin_path(Skin.find_by_title($1))
when /^(.*) collection's page$/i
when /^"(.*)" collection's page$/i # e.g. when I go to "Collection name" collection's page
collection_path(Collection.find_by_title($1))
when /^"(.*)" collection's static page$/i
static_collection_path(Collection.find_by_title($1))
Expand Down

0 comments on commit 5100a1f

Please sign in to comment.