Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 67 additions & 10 deletions features/step_definitions/work_related_steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,17 +60,74 @@

# when for remixes / related works

When /^I post a related work as remixer$/ do
When "I post a related work as remixer" do
step %{I am logged in as "remixer"}
step %{I go to the new work page}
step %{I select "Not Rated" from "Rating"}
step %{I check "No Archive Warnings Apply"}
step %{I select "English" from "Choose a language"}
step %{I fill in "Fandoms" with "Stargate"}
step %{I fill in "Work Title" with "Followup"}
step %{I fill in "content" with "That could be an amusing crossover."}
step %{I list the work "Worldbuilding" as inspiration}
step %{I press "Preview"}
step %{I go to the new work page}
step %{I select "Not Rated" from "Rating"}
step %{I check "No Archive Warnings Apply"}
step %{I select "English" from "Choose a language"}
step %{I fill in "Fandoms" with "Stargate"}
step %{I fill in "Work Title" with "Followup"}
step %{I fill in "content" with "That could be an amusing crossover."}
step %{I list the work "Worldbuilding" as inspiration}
step %{I press "Preview"}
step %{I press "Post"}
end

When "I post a related work as remixer without previewing it" do
step %{I am logged in as "remixer"}
step %{I go to the new work page}
step %{I select "Not Rated" from "Rating"}
step %{I check "No Archive Warnings Apply"}
step %{I select "English" from "Choose a language"}
step %{I fill in "Fandoms" with "Stargate"}
step %{I fill in "Work Title" with "Followup"}
step %{I fill in "content" with "That could be an amusing crossover."}
step %{I list the work "Worldbuilding" as inspiration}
step %{I press "Post"}
end

When "I post a related work as remixer after saving it as a draft" do
step %{I am logged in as "remixer"}
step %{I go to the new work page}
step %{I select "Not Rated" from "Rating"}
step %{I check "No Archive Warnings Apply"}
step %{I select "English" from "Choose a language"}
step %{I fill in "Fandoms" with "Stargate"}
step %{I fill in "Work Title" with "Followup"}
step %{I fill in "content" with "That could be an amusing crossover."}
step %{I list the work "Worldbuilding" as inspiration}
step %{I press "Save Draft"}
step %{I press "Post"}
end

When "I post a related work as remixer after saving it as a draft and then editing it" do
step %{I am logged in as "remixer"}
step %{I go to the new work page}
step %{I select "Not Rated" from "Rating"}
step %{I check "No Archive Warnings Apply"}
step %{I select "English" from "Choose a language"}
step %{I fill in "Fandoms" with "Stargate"}
step %{I fill in "Work Title" with "Followup"}
step %{I fill in "content" with "That could be an amusing crossover."}
step %{I list the work "Worldbuilding" as inspiration}
step %{I press "Save Draft"}
step %{I press "Edit"}
step %{I press "Post"}
end

When "I post a related work as remixer after previewing it and then editing it" do
step %{I am logged in as "remixer"}
step %{I go to the new work page}
step %{I select "Not Rated" from "Rating"}
step %{I check "No Archive Warnings Apply"}
step %{I select "English" from "Choose a language"}
step %{I fill in "Fandoms" with "Stargate"}
step %{I fill in "Work Title" with "Followup"}
step %{I fill in "content" with "That could be an amusing crossover."}
step %{I list the work "Worldbuilding" as inspiration}
step %{I press "Preview"}
step %{I press "Edit"}
step %{I press "Post"}
end

Expand Down
23 changes: 23 additions & 0 deletions features/works/work_related.feature
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,29 @@ Scenario: Posting a remix / related work emails the creator of the original work
Then a parent related work should be seen
And the original author should be emailed

Scenario: Posting a remix in a variatey of ways should always send related work emails the creator of the original work and list the parent work in the proper location on the remix / related work

Given I have related works setup
And all emails have been delivered
When I post a related work as remixer without previewing it
Then a parent related work should be seen
And the original author should be emailed

Given all emails have been delivered
When I post a related work as remixer after saving it as a draft
Then a parent related work should be seen
And the original author should be emailed

Given all emails have been delivered
When I post a related work as remixer after saving it as a draft and then editing it
Then a parent related work should be seen
And the original author should be emailed

Given all emails have been delivered
When I post a related work as remixer after previewing it and then editing it
Then a parent related work should be seen
And the original author should be emailed

Scenario: Remixer can see their remix / related work on their related works page

Given I have related works setup
Expand Down
Loading