Skip to content

Commit

Permalink
AO3-5566 Add tests for previewing when adding work to collection (#3466)
Browse files Browse the repository at this point in the history
* Test adding collections with preview behavior

* AO3-5566 Add final newline
  • Loading branch information
sarken authored and zz9pzza committed Nov 13, 2018
1 parent 4debb5d commit 6645ac4
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions features/collections/collection_anonymity.feature
Original file line number Diff line number Diff line change
Expand Up @@ -334,3 +334,44 @@ Feature: Collection
Then I should see "Reply from the author."
And I should see "Anonymous Creator"
And I should not see "shy_author"

Scenario: When a creator adds a work to an anonymous collection and previews the change, it should save correctly

Given I have the anonymous collection "Anonymous Collection"
And I am logged in as "creator"
And I post the work "My Work"

When I edit the work "My Work"
And I fill in "Post to Collections / Challenges" with "anonymous_collection"
And I press "Preview"

Then I should see "Anonymous Collection"
And I should see "Anonymous [creator]"

When I press "Update"

Then I should see "Anonymous Collection"
And I should see "Anonymous [creator]"

Scenario: When a creator adds a work to an anonymous collection and previews the change, it should cancel correctly

Given I have the anonymous collection "Anonymous Collection"
And I am logged in as "creator"
And I post the work "My Work"

When I edit the work "My Work"
And I fill in "Post to Collections / Challenges" with "anonymous_collection"
And I press "Preview"

Then I should see "Anonymous Collection"
And I should see "Anonymous [creator]"

When I press "Cancel"

Then I should see "The work was not updated."

When I view the work "My Work"

# This is not the desired behavior (AO3-5556), but we want to make sure it doesn't get broken worse
Then I should see "Anonymous Collection"
And I should see "Anonymous [creator]"

0 comments on commit 6645ac4

Please sign in to comment.