otwcode / Otwarchive / Docs / Other a
Edit preferences
In order to have an archive full of users As a humble user I want to fill out my preferences
Scenario: Ensure all Preference options are available
- Given the following activated user exists
login password scott password - When I am logged in as "
scott" with password "password" - And I go to scott's user page
- And I follow "
Preferences" - Then I should see the page title "
scott - Preferences" - Then I should see "
Set My Preferences" - And I should see "
Hide my work from search engines when possible." - And I should see "
Hide the share buttons on my work." - And I should see "
Show me adult content without checking." - And I should see "
Show the whole work by default." - And I should see "
Hide warnings (you can still choose to show them)." - And I should see "
Hide additional tags (you can still choose to show them)." - And I should see "
Hide work skins (you can still choose to show them)." - And I should see "
Your site skin" - And I should see "
Your time zone" - And I should see "
Browser page title format" - And I should see "
Turn off emails about comments." - And I should see "
Turn off messages to your inbox about comments." - And I should see "
Turn off copies of your own comments." - And I should see "
Turn off emails about kudos." - And I should see "
Do not allow guests to reply to my comments on news posts or other users' works (you can still control the comment settings for your works separately)." - And I should see "
Allow others to invite my works to collections." - And I should see "
Turn off emails from collections." - And I should see "
Turn off inbox messages from collections." - And I should see "
Turn off emails about gift works." - And I should see "
Turn on History." - And I should see "
Turn the new user help banner back on." - And I should see "
Turn off the banner showing on every page."
Scenario: View and edit preferences for history, view entire work
- Given the following activated user exists
login password editname password - When I go to editname's user page
- And I follow "
Profile" - Then I should not see "
My email address" - And I should not see "
My birthday" - When I am logged in as "
editname" with password "password" - And I post the 2 chapter work "
This has two chapters" - Then I should be on the 2nd chapter of the work "
This has two chapters" - And I follow "
Previous Chapter" - Then I should be on the 1st chapter of the work "
This has two chapters" - When I follow "
editname" - Then I should see "
Dashboard" within "div#dashboard" - And I should see "
History" within "div#dashboard" - And I should see "
Preferences" within "div#dashboard" - And I should see "
Profile" within "div#dashboard" - When I follow "
Preferences" within "div#dashboard" - Then I should see "
Set My Preferences" - When I follow "
Edit My Profile" - Then I should see "
Password" - When I follow "
Dashboard" - And I follow "
Profile" - Then I should see "
Set My Preferences" - When I follow "
Set My Preferences" - Then I should see "
Edit My Profile" - When I uncheck "
Turn on History" - And I check "
Show the whole work by default." - And I press "
Update" - Then I should see "
Your preferences were successfully updated" - And I should not see "
History" within "div#dashboard" - When I go to the works page
- And I follow "
This has two chapters" - Then I should not see "
Next Chapter"
Scenario: User can hide warning and freeform tags and reveal them on a case-
by-case basis.
- Given a canonical freeform "
Scary tag" - And I am logged in as "
someone_else" - And I post the work "
Someone Else's Work" as part of a series "A Series" - And I am logged in as "
tester" - And I post the work "
My Work" - And I bookmark the work "
Someone Else's Work" - When I set my preferences to hide warnings
- Then I should see "
Your preferences were successfully updated" - When I view the work "
Someone Else's Work" - Then I should not see "
No Archive Warnings Apply" within "dl.work.meta" - And I should see "
Show warnings" - And I should see "
Scary tag" within "dl.work.meta" - And I should not see "
Show additional tags" - When I follow "
Show warnings" - Then I should see "
No Archive Warnings Apply" within "dl.work.meta" - When I follow "
No Archive Warnings Apply" within "dl.work.meta" - Then I should be on the works tagged "
No Archive Warnings Apply" - When I view the work "
My Work" - Then I should see "
No Archive Warnings Apply" within "dl.work.meta" - And I should not see "
Show warnings" - And I should see "
Scary tag" within "dl.work.meta" - And I should not see "
Show additional tags" - When I go to someone_else's works page
- Then I should see "
Someone Else's Work" - And I should not see "
No Archive Warnings Apply" within "li.warnings" - And I should see "
Show warnings" - And I should see "
Scary tag" within "li.freeforms" - And I should not see "
Show additional tags" - When I follow "
Show warnings" - Then I should see "
No Archive Warnings Apply" within "li.warnings" - When I follow "
No Archive Warnings Apply" within "li.warnings" - Then I should be on the works tagged "
No Archive Warnings Apply" - When I go to tester's works page
- Then I should see "
My Work" - And I should see "
No Archive Warnings Apply" within "li.warnings" - And I should not see "
Show warnings" - And I should see "
Scary tag" within "li.freeforms" - And I should not see "
Show additional tags" - When I go to someone_else's series page
- Then I should see "
A Series" - And I should not see "
No Archive Warnings Apply" within "li.warnings" - And I should see "
Show warnings" - And I should see "
Scary tag" within "li.freeforms" - And I should not see "
Show additional tags" - When I follow "
Show warnings" - Then I should see "
No Archive Warnings Apply" within "li.warnings" - When I follow "
No Archive Warnings Apply" within "li.warnings" - Then I should be on the works tagged "
No Archive Warnings Apply" - When I go to tester's bookmarks page
- Then I should see "
Someone Else's Work" - And I should not see "
No Archive Warnings Apply" within "li.warnings" - And I should see "
Show warnings" - And I should see "
Scary tag" within "li.freeforms" - And I should not see "
Show additional tags" - When I follow "
Show warnings" - Then I should see "
No Archive Warnings Apply" within "li.warnings" - When I follow "
No Archive Warnings Apply" within "li.warnings" - Then I should be on the works tagged "
No Archive Warnings Apply" - When I follow "
My Preferences" - And I check "
Hide additional tags" - And I press "
Update" - Then I should see "
Your preferences were successfully updated" - When I view the work "
Someone Else's Work" - Then I should not see "
No Archive Warnings Apply" within "dl.work.meta" - And I should see "
Show warnings" - And I should not see "
Scary tag" within "dl.work.meta" - And I should see "
Show additional tags" - When I follow "
Show warnings" - Then I should see "
No Archive Warnings Apply" within "dl.work.meta" - And I should not see "
Scary tag" within "dl.work.meta" - When I follow "
Show additional tags" - Then I should see "
Scary tag" within "dl.work.meta" - When I view the work "
My Work" - Then I should see "
No Archive Warnings Apply" within "dl.work.meta" - And I should not see "
Show warnings" - And I should see "
Scary tag" within "dl.work.meta" - And I should not see "
Show additional tags" - When I go to someone_else's works page
- Then I should see "
Someone Else's Work" - And I should not see "
No Archive Warnings Apply" within "li.warnings" - And I should see "
Show warnings" - And I should not see "
Scary tag" within "li.freeforms" - And I should see "
Show additional tags" - When I follow "
Show warnings" - Then I should see "
No Archive Warnings Apply" within "li.warnings" - And I should not see "
Scary tag" within "li.freeforms" - When I follow "
Show additional tags" - Then I should see "
Scary tag" within "li.freeforms" - When I go to tester's works page
- Then I should see "
My Work" - And I should see "
No Archive Warnings Apply" within "li.warnings" - And I should not see "
Show warnings" - And I should see "
Scary tag" within "li.freeforms" - And I should not see "
Show additional tags" - When I go to someone_else's series page
- Then I should see "
A Series" - And I should not see "
No Archive Warnings Apply" within "li.warnings" - And I should see "
Show warnings" - And I should not see "
Scary tag" within "li.freeforms" - And I should see "
Show additional tags" - When I follow "
Show warnings" - Then I should see "
No Archive Warnings Apply" within "li.warnings" - And I should not see "
Scary tag" within "li.freeforms" - When I follow "
Show additional tags" - Then I should see "
Scary tag" within "li.freeforms" - When I go to tester's bookmarks page
- Then I should see "
Someone Else's Work" - And I should not see "
No Archive Warnings Apply" within "li.warnings" - And I should see "
Show warnings" - And I should not see "
Scary tag" within "li.freeforms" - And I should see "
Show additional tags" - When I follow "
Show warnings" - Then I should see "
No Archive Warnings Apply" within "li.warnings" - And I should not see "
Scary tag" within "li.freeforms" - When I follow "
Show additional tags" - Then I should see "
Scary tag" within "li.freeforms" - When I follow "
My Preferences" - And I uncheck "
Hide warnings" - And I press "
Update" - Then I should see "
Your preferences were successfully updated" - When I view the work "
Someone Else's Work" - Then I should see "
No Archive Warnings Apply" within "dl.work.meta" - And I should not see "
Show warnings" - And I should see "
Show additional tags" - And I should not see "
Scary tag" within "dl.work.meta" - When I follow "
Show additional tags" - Then I should see "
Scary tag" within "dl.work.meta" - When I follow "
Scary tag" within "dl.work.meta" - Then I should be on the works tagged "
Scary tag" - When I view the work "
My Work" - Then I should see "
No Archive Warnings Apply" within "dl.work.meta" - And I should not see "
Show warnings" - And I should see "
Scary tag" within "dl.work.meta" - And I should not see "
Show additional tags" - When I go to someone_else's works page
- Then I should see "
Someone Else's Work" - And I should see "
No Archive Warnings Apply" within "li.warnings" - And I should not see "
Show warnings" - And I should not see "
Scary tag" within "li.freeforms" - And I should see "
Show additional tags" - When I follow "
Show additional tags" - Then I should see "
Scary tag" within "li.freeforms" - When I follow "
Scary tag" within "li.freeforms" - Then I should be on the works tagged "
Scary tag" - When I go to tester's works page
- Then I should see "
My Work" - And I should see "
No Archive Warnings Apply" within "li.warnings" - And I should not see "
Show warnings" - And I should see "
Scary tag" within "li.freeforms" - And I should not see "
Show additional tags" - When I go to someone_else's series page
- Then I should see "
A Series" - And I should see "
No Archive Warnings Apply" within "li.warnings" - And I should not see "
Show warnings" - And I should not see "
Scary tag" within "li.freeforms" - And I should see "
Show additional tags" - When I follow "
Show additional tags" - Then I should see "
Scary tag" within "li.freeforms" - When I follow "
Scary tag" within "li.freeforms" - Then I should be on the works tagged "
Scary tag" - When I go to tester's bookmarks page
- Then I should see "
Someone Else's Work" - And I should see "
No Archive Warnings Apply" within "li.warnings" - And I should not see "
Show warnings" - And I should not see "
Scary tag" within "li.freeforms" - And I should see "
Show additional tags" - When I follow "
Show additional tags" - Then I should see "
Scary tag" within "li.freeforms" - When I follow "
Scary tag" within "li.freeforms" - Then I should be on the works tagged "
Scary tag"
Scenario: User can hide warning and freeform tags on work blurbs and meta with
JavaScript disabled, but gets an error if they attempt to reveal them.
- Given I am logged in as "
first_user" - And I post the work "
Asteroid Blues" with fandom "Cowboy Bebop" with freeform "Ed is a sweetie" - When I am logged in
- And I set my preferences to hide both warnings and freeforms
- And I go to first_user's works page
- Then I should see "
Asteroid Blues" - And I should not see "
No Archive Warnings Apply" within "li.warnings" - And I should not see "
Ed is a sweetie" - When I follow "
Show additional tags" - Then I should see "
Sorry, you need to have JavaScript enabled for this." - And I should see "
Show additional tags" - When I follow "
Show warnings" - Then I should see "
Sorry, you need to have JavaScript enabled for this." - And I should see "
Show warnings" - When I view the work "
Asteroid Blues" - And I follow "
Show additional tags" - Then I should see "
Sorry, you need to have JavaScript enabled for this." - And I should see "
Show additional tags" - When I follow "
Show warnings" - Then I should see "
Sorry, you need to have JavaScript enabled for this." - And I should see "
Show warnings"
Scenario: User can hide warning and freeform tags on series blurbs with
JavaScript disabled, but gets an error if they attempt to reveal them.
- Given I am logged in as "
first_user" - And I post the work "
Asteroid Blues" with fandom "Cowboy Bebop" with freeform "Ed is a sweetie" as part of a series "Cowboy Bebop Blues" - And I post the work "
Wild Horses" with fandom "Cowboy Bebop" with freeform "Faye Valentine is a sweetie" as part of a series "Cowboy Bebop Blues" - When I am logged in
- And I set my preferences to hide both warnings and freeforms
- And I go to first_user's series page
- Then I should see "
Cowboy Bebop Blues" - And I should not see "
No Archive Warnings Apply" within "li.warnings" - And I should not see "
Ed is a sweetie" - And I should not see "
Faye Valentine is a sweetie" - When I follow "
Show additional tags" - Then I should see "
Sorry, you need to have JavaScript enabled for this." - And I should see "
Show additional tags" - When I follow "
Show warnings" - Then I should see "
Sorry, you need to have JavaScript enabled for this." - And I should see "
Show warnings"
Scenario Outline: Authorized admins can see the user's preferences page
- Given a user exists with login: "
scott" - And I am logged in as a "
<role>" admin - When I go to scott's user page
- And I follow "
Preferences" - Then I should see "
Set My Preferences"
Examples:
| role |
|---|
| superadmin |
| policy_and_abuse |
| support |
Scenario Outline: Authorized admins can view user preferences when locale preferences are enabled
- Given the following activated user exists
login password testuser password - And a locale with translated emails
- And the user "
testuser" enables translated emails - And I am logged in as a "
<role>" admin - When I go to testuser's preferences page
- Then I should see "
Set My Preferences" - And I should see "
Your locale"
Examples:
| role |
|---|
| superadmin |
| policy_and_abuse |
| support |
Scenario Outline: Unauthorized admins cannot see the user's preferences page or the link to it
- Given a user exists with login: "
scott" - And I am logged in as a "
<role>" admin - When I go to scott's user page
- Then I should not see "
Set My Preferences" - When I go to scott's preferences page
- Then I should see "
Sorry, only an authorized admin can access the page you were trying to reach."
Examples:
| role |
|---|
| board |
| board_assistants_team |
| communications |
| development_and_membership |
| docs |
| elections |
| legal |
| translation |
| tag_wrangling |
| open_doors |
Source: features/other_a/preferences_edit.feature at commit f09caa86, Otwarchive (GPL license).