Logo: Relish

  1. Sign in

Project: Otwarchive

Edit Works

  • @works
  • @tags

In order to have an archive full of works
As an author
I want to edit existing works

Scenarios
You can't edit a work unless you're logged in and it's your work
Given
I have loaded the fixtures
When
I view the work "First work"
Then
I should not see "Edit"
Given
I am logged in as "testuser" with password "testuser"
When
I view the work "fourth"
Then
I should not see "Edit"
When
I am on testuser's works page
Then
I should see "Edit"
When
I follow "First work"
Then
I should see "first fandom"
And
I should see "Edit"
And
I should not see "new tag"
When
I follow "Edit"
Then
I should see "Edit Work"
When
I fill in "work_freeform" with "new tag"
And
I fill in "content" with "first chapter content"
And
I press "Preview"
Then
I should see "Preview"
And
I should see "Fandom: first fandom"
And
I should see "Additional Tags: new tag"
And
I should see "first chapter content"
When
I press "Update"
Then
I should see "Work was successfully updated."
When
I go to testuser's works page
Then
I should see "First work"
And
I should see "first fandom"
And
I should see "new tag"
When
I edit the work "First work"
And
I follow "Add Chapter"
And
I fill in "content" with "second chapter content"
And
I press "Preview"
Then
I should see "This is a draft showing what this chapter will look like when it's posted to the Archive."
And
I should see "second chapter content"
When
I press "Post"
Then
I should see "Chapter was successfully updated."
And
I should not see "first chapter content"
And
I should see "second chapter content"
When
I edit the work "First work"
Then
I should not see "chapter content"
When
I follow "1"
And
I fill in "content" with "first chapter new content"
And
I press "Preview"
Then
I should see "first chapter new content"
When
I press "Update"
Then
I should see "Chapter was successfully updated."
And
I should see "first chapter new content"
And
I should not see "second chapter content"
When
I edit the work "First Work"
And
I follow "2"
And
I fill in "content" with "second chapter new content"
And
I press "Preview"
And
I press "Cancel"
Then
I should see "second chapter content"
When
I go to testuser's works page
And
I follow "Edit"
And
I select "testy" from "work_author_attributes_ids_"
And
I unselect "testuser" from "work_author_attributes_ids_"
And
I press "Post Without Preview"
Then
I should see "testy"
And
I should not see "testuser,"

Last published about 7 years ago by otwcode.