diff --git a/features/step_definitions/work_related_steps.rb b/features/step_definitions/work_related_steps.rb index 028504265f6..876ff602867 100644 --- a/features/step_definitions/work_related_steps.rb +++ b/features/step_definitions/work_related_steps.rb @@ -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 diff --git a/features/works/work_related.feature b/features/works/work_related.feature index b68699c495c..8c35f7ec953 100644 --- a/features/works/work_related.feature +++ b/features/works/work_related.feature @@ -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