Contents

Public skins

@set-default-skin

Scenario: A user's initial skin should be set to default

  • Given basic skins
  • And I am logged in as "skinner"
  • When I am on skinner's preferences page
  • Then "Default" should be selected within "preference_skin_id"

Scenario: User can set a skin for a session and then unset it

  • Given basic skins
  • And the approved public skin "public skin" with css "#title { text-decoration: blink;}"
  • And the skin "public skin" is cached
  • And the skin "public skin" is in the chooser
  • When I am logged in as "skinner"
  • And I press "public skin"
  • Then I should see "You're now using the public skin skin. This will last for 2 weeks"
  • And the page should have the cached skin "public skin"
  • When I press "Default"
  • Then I should see "You are now using the default site skin again!"
  • And the page should not have the cached skin "public skin"

Scenario: Only public skins should be on the main skins page

  • Given basic skins
  • And I am logged in as "skinner"
  • And I create the skin "my skin"
  • When I am on the skins page
  • Then I should not see "my skin"
  • And I should see "Default"

Scenario: Newly created public skins should not appear on the main skins page until

approved and should be marked as not-yet-approved

  • Given I am logged in as "skinner"
  • And the unapproved public skin "public skin"
  • When I am on the skins page
  • Then I should not see "public skin"
  • When I am on skinner's skins page
  • Then I should see "public skin"
  • And I should see "(Not yet reviewed)"
  • And I should not see "(Approved)"

Scenario: Public skins should not be viewable by users until approved

  • Given the unapproved public skin "public skin"
  • And I log out
  • When I go to "public skin" skin page
  • Then I should see "Sorry, you don't have permission"
  • When I go to "public skin" edit skin page
  • Then I should see "Sorry, you don't have permission"
  • When I go to admin's skins page
  • Then I should see "I'm sorry, only an admin can"

Scenario: Users should not be able to edit their public approved skins

  • Given the approved public skin "public skin"
  • And I am logged in as "skinner"
  • When I go to "public skin" edit skin page
  • Then I should see "Sorry, you don't have permission"
  • When I am on the skins page
  • Then I should see "public skin"
  • When I follow "Site Skins"
  • Then I should see "public skin"
  • And I should see "(Approved)"
  • And I should not see "Edit"

Scenario: Users should be able to use public approved skins created by others

  • Given the approved public skin "public skin" with css "#title { text-decoration: blink;}"
  • And I am logged in as "skinuser"
  • And I am on skinuser's preferences page
  • When I select "public skin" from "preference_skin_id"
  • And I submit
  • Then I should see "Your preferences were successfully updated."
  • When I am on skinuser's preferences page
  • And "public skin" should be selected within "preference_skin_id"
  • And I should see "#title {" in the page style
  • And I should see "text-decoration: blink;" in the page style

Scenario: Toggle between public site skins and public work skins

  • Given I am logged in as "skinner"
  • And I am on skinner's skins page
  • When I follow "Public Work Skins"
  • Then I should see "Public Work Skins" within "h2"
  • When I follow "Public Site Skins"
  • Then I should see "Public Site Skins" within "h2"

Scenario: Reverting to default skin when a custom skin is selected

  • Given the approved public skin "public skin" with css "#title { text-decoration: blink;}"
  • And I am logged in as "skinner"
  • And I am on skinner's preferences page
  • And I select "public skin" from "preference_skin_id"
  • And I submit
  • When I am on skinner's preferences page
  • Then "public skin" should be selected within "preference_skin_id"
  • When I go to skinner's skins page
  • And I press "Revert to Default Skin"
  • When I am on skinner's preferences page
  • Then "Default" should be selected within "preference_skin_id"

Scenario: A logged out user only sees cached skins on the public skins page

  • Given the approved public skin "Uncached skin"
  • And the approved public skin "Cached skin"
  • And the skin "Cached skin" is cached
  • When I go to the public skins page
  • Then I should see "Cached skin"
  • And I should not see "Uncached skin"

Scenario: A user can preview a cached public site skin, and it will take the

user to the configured page for skin previews

  • Given the approved public skin "Usable Skin"
  • And the user "OTW_Translation" exists and is activated
  • And the skin "Usable Skin" is cached
  • And I am logged in as "skinner"
  • When I go to the public skins page
  • And I follow "Preview"
  • Then I should be on OTW_Translation's works page
  • And I should see "You are previewing the skin Usable Skin."
  • And I should see "Go back or follow any link to remove the skin"
  • And I should see 'Tip: You can preview any archive page you want by adding "?site_skin='
  • And I should see '" to the end of the URL'
  • When I follow "Return to Skin to Use"
  • Then I should be on "Usable Skin" skin page

Scenario: Setting a skin from the footer maintains the same page

  • Given basic skins
  • And the approved public skin "unique skin"
  • And the skin "unique skin" is cached
  • And the skin "unique skin" is in the chooser
  • And I am logged in
  • When I go to the works page
  • And I press "unique skin"
  • Then the page should have the cached skin "unique skin"
  • And I should be on the works page

Scenario: A regular user can't apply to make a skin public

  • Given I am logged in
  • When I go to the new skin page
  • Then I should not see "Apply to make public"

Scenario: A user with the official role can apply to make a skin public

  • Given the user "SkinTeam" exists and has the role "official"
  • And I am logged in as "SkinTeam"
  • When I set up the skin "Skin We're Gonna Add"
  • And I attach a preview for the skin
  • And I check "Apply to make public"
  • And I submit
  • Then I should see "Skin was successfully created"

Scenario: Admins can't see the "Apply to make public" checkbox

  • Given the approved public skin "Usable Skin"
  • And I am logged in as a "superadmin" admin
  • When I edit the skin "Usable Skin"
  • Then I should not see "Apply to make public"

Source: features/other_b/skin_public.feature at commit f09caa86, Otwarchive (GPL license).