Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

94 lines (87 sloc) 3.789 kB
@works @search
@no-txn
Feature: Locking works to archive users only
In order to keep my works under the radar
As a registered archive user
I should be able to make my works visible only to other registered users
Scenario: Posting locked work
Given I am logged in as "fandomer" with password "password"
And basic tags
And I go to the new work page
And I select "Not Rated" from "Rating"
And I check "No Archive Warnings Apply"
And I fill in "Fandoms" with "Supernatural"
And I fill in "Characters" with "Sammy"
And I fill in "Work Title" with "Awesomeness"
And I fill in "content" with "The story of how they met and how they got into trouble"
And I check "work_restricted"
When I press "Preview"
# shows as restricted
Then I should see the "title" text "Restricted" within "h2.title"
When I press "Post"
Then I should see the "alt" text "(Restricted)" within "h2.title"
When I go to the works page
Then I should see "Awesomeness" within "h4"
And I should see the "alt" text "(Restricted)" within "h4"
Given the work indexes are updated
When I fill in "site_search" with "Awesomeness"
And I press "search"
Then I should see "1 Found"
And I should see "fandomer" within "#main"
# doesn't show when logged out
When I am logged out
And I go to the works page
Then I should not see "Awesomeness"
And I should not see the "alt" text "(Restricted)"
When I am on fandomer's works page
Then I should not see "Awesomeness"
When I fill in "site_search" with "Awesomeness"
And I press "search"
Then I should see "0 Found"
And I should not see "fandomer"
# shows again if you log in as another user
When I am logged in as "testuser" with password "password"
And I am on fandomer's works page
Then I should see "Awesomeness"
Scenario: Editing posted work
Given I am logged in as "fandomer" with password "password"
And I post the work "Sad generic work"
When I am logged out
And I go to fandomer's works page
Then I should see "Sad generic work"
When I am logged in as "fandomer" with password "password"
And I edit the work "Sad generic work"
And I check "work_restricted"
When I press "Preview"
Then I should see the "title" text "Restricted" within "h2.title"
When I press "Update"
Then I should see the "alt" text "(Restricted)" within "h2.title"
When I go to the works page
Then I should see "Sad generic work" within "h4"
And I should see the "alt" text "(Restricted)" within "h4"
When I am logged out
And I go to the works page
Then I should not see "Sad generic work"
And I should not see the "alt" text "(Restricted)"
When I am logged in as "testuser" with password "password"
And I go to the works page
Then I should see "Sad generic work"
When I am logged out
And I am logged in as "fandomer" with password "password"
And I edit the work "Sad generic work"
And I fill in "Notes" with "Random blather"
And I press "Preview"
Then I should see the "alt" text "(Restricted)" within "h2.title"
When I press "Update"
Then I should see "Work was successfully updated."
And I should see the "alt" text "(Restricted)" within "h2.title"
When I edit the work "Sad generic work"
And I uncheck "work_restricted"
And I press "Preview"
Then I should not see the "alt" text "(Restricted)"
When I press "Update"
Then I should see "Work was successfully updated."
And I should not see the "alt" text "(Restricted)"
When I am logged out
And I go to the works page
Then I should see "Sad generic work"
Jump to Line
Something went wrong with that request. Please try again.