From cb1dfa462b5dd7a3f4a9223b91f10b5cffb18e08 Mon Sep 17 00:00:00 2001 From: techlingyi <166869872+techlingyi@users.noreply.github.com> Date: Sat, 25 Apr 2026 03:35:55 +0000 Subject: [PATCH 1/4] AO3-5539 Fix show_hidden warnings/freeforms for requests & external works --- app/controllers/tags_controller.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/app/controllers/tags_controller.rb b/app/controllers/tags_controller.rb index 3bd9829fe40..fb5dac64979 100644 --- a/app/controllers/tags_controller.rb +++ b/app/controllers/tags_controller.rb @@ -104,6 +104,10 @@ def show_hidden Work when "chapter" Chapter + when "request" + Request + when "externalwork" + ExternalWork end @display_creation = model.find(params[:creation_id]) if model.is_a? Class @@ -114,6 +118,13 @@ def show_hidden else @display_tags = @display_creation.works.visible.collect(&:freeforms).flatten.compact.uniq.sort end + # Requests don't have the methods Taggables have, so we have to access their tags like this + elsif params[:creation_type] == 'Request' + if params[:tag_type] == 'warnings' + @display_tags = @display_creation.tag_groups["ArchiveWarning"] + else + @display_tags = @display_creation.tag_groups["Freeform"] + end else @display_tags = case params[:tag_type] when 'warnings' From f63f6e5bc90511db8fbd44293071d90d152a08ba Mon Sep 17 00:00:00 2001 From: techlingyi <166869872+techlingyi@users.noreply.github.com> Date: Tue, 5 May 2026 23:14:45 +0000 Subject: [PATCH 2/4] AO3-5539 Simplify tags controller show_hidden logic --- app/controllers/tags_controller.rb | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/app/controllers/tags_controller.rb b/app/controllers/tags_controller.rb index 9306a0cffad..f148b15d9a5 100644 --- a/app/controllers/tags_controller.rb +++ b/app/controllers/tags_controller.rb @@ -115,19 +115,12 @@ def show_hidden else @display_tags = @display_creation.works.visible.collect(&:freeforms).flatten.compact.uniq.sort end - # Requests don't have the methods Taggables have, so we have to access their tags like this - elsif params[:creation_type] == 'Request' - if params[:tag_type] == 'warnings' - @display_tags = @display_creation.tag_groups["ArchiveWarning"] - else - @display_tags = @display_creation.tag_groups["Freeform"] - end else @display_tags = case params[:tag_type] when 'warnings' - @display_creation.archive_warnings + @display_creation.tag_groups["ArchiveWarning"] when 'freeforms' - @display_creation.freeforms + @display_creation.tag_groups["Freeform"] end end From 77cf1ae4e410fefc5bf7c0348c02ab0cad3d3b4c Mon Sep 17 00:00:00 2001 From: techlingyi <166869872+techlingyi@users.noreply.github.com> Date: Mon, 3 Aug 2026 03:07:42 +0000 Subject: [PATCH 3/4] AO3-5539 Add tests for hidden tags on prompts --- .../challenge_promptmeme_setup.feature | 36 +++++++++++++++++++ .../challenge_promptmeme_steps.rb | 9 +++++ 2 files changed, 45 insertions(+) diff --git a/features/prompt_memes_a/challenge_promptmeme_setup.feature b/features/prompt_memes_a/challenge_promptmeme_setup.feature index e9791823435..f0a804b0ae7 100644 --- a/features/prompt_memes_a/challenge_promptmeme_setup.feature +++ b/features/prompt_memes_a/challenge_promptmeme_setup.feature @@ -3,6 +3,42 @@ Feature: Prompt Meme Challenge In order to have an archive full of works As a humble user I want to create a prompt meme and post to it + + @javascript + Scenario: Can hide and show warnings on a prompt + + Given I have Battle 12 prompt meme fully set up + Given I am logged in as "myname1" + And I sign up for Battle 12 with combination F + When I am logged in as "myname2" + And I follow "My Preferences" + And I check "Hide warnings" + And I press "Update" + And I go to "Battle 12" collection's page + And I follow "Prompts (2)" + Then I should see "Show warnings" + And I should not see "Alternate Universe - Historical" + When I follow "Show warnings" + Then I should not see "Show warnings" + And I should see "Alternate Universe - Historical" + + @javascript + Scenario: Can hide and show additional tags on a prompt + + Given I have Battle 12 prompt meme fully set up + Given I am logged in as "myname1" + And I sign up for Battle 12 with combination A + When I am logged in as "myname2" + And I follow "My Preferences" + And I check "Hide additional tags" + And I press "Update" + And I go to "Battle 12" collection's page + And I follow "Prompts (2)" + Then I should see "Show additional tags" + And I should not see "Alternate Universe - Historical" + When I follow "Show additional tags" + Then I should not see "Show additional tags" + And I should see "Alternate Universe - Historical" Scenario: Can create a collection to house a prompt meme diff --git a/features/step_definitions/challenge_promptmeme_steps.rb b/features/step_definitions/challenge_promptmeme_steps.rb index b4582c23294..9aa331d8d68 100644 --- a/features/step_definitions/challenge_promptmeme_steps.rb +++ b/features/step_definitions/challenge_promptmeme_steps.rb @@ -251,6 +251,15 @@ click_button "Submit" end +When /^I sign up for Battle 12 with combination F$/ do + step %{I start signing up for "Battle 12"} + step %{I check the 1st checkbox with the value "Stargate Atlantis"} + step %{I check the 2nd checkbox with the value "Stargate Atlantis"} + step %{I fill in the 1st field with id matching "freeform_tagnames" with "Alternate Universe - Historical"} + step %{I check the 1st checkbox with the value "Major Character Death"} + click_button "Submit" +end + When /^I sign up for Battle 12 with combination E$/ do step "I go to the collections page" step "I follow \"Battle 12\"" From 7dc666f707348f050eeafeffb792532c2f6066c5 Mon Sep 17 00:00:00 2001 From: techlingyi <166869872+techlingyi@users.noreply.github.com> Date: Mon, 3 Aug 2026 03:37:22 +0000 Subject: [PATCH 4/4] AO3-5539 Remove nonfunctional test --- .../challenge_promptmeme_setup.feature | 18 ------------------ .../challenge_promptmeme_steps.rb | 9 --------- 2 files changed, 27 deletions(-) diff --git a/features/prompt_memes_a/challenge_promptmeme_setup.feature b/features/prompt_memes_a/challenge_promptmeme_setup.feature index 94cc55a7476..1532fe04c83 100644 --- a/features/prompt_memes_a/challenge_promptmeme_setup.feature +++ b/features/prompt_memes_a/challenge_promptmeme_setup.feature @@ -4,24 +4,6 @@ Feature: Prompt Meme Challenge As a humble user I want to create a prompt meme and post to it - @javascript - Scenario: Can hide and show warnings on a prompt - - Given I have Battle 12 prompt meme fully set up - Given I am logged in as "myname1" - And I sign up for Battle 12 with combination F - When I am logged in as "myname2" - And I follow "My Preferences" - And I check "Hide warnings" - And I press "Update" - And I go to "Battle 12" collection's page - And I follow "Prompts (2)" - Then I should see "Show warnings" - And I should not see "Alternate Universe - Historical" - When I follow "Show warnings" - Then I should not see "Show warnings" - And I should see "Alternate Universe - Historical" - @javascript Scenario: Can hide and show additional tags on a prompt diff --git a/features/step_definitions/challenge_promptmeme_steps.rb b/features/step_definitions/challenge_promptmeme_steps.rb index 93b36823ada..eb699f495db 100644 --- a/features/step_definitions/challenge_promptmeme_steps.rb +++ b/features/step_definitions/challenge_promptmeme_steps.rb @@ -251,15 +251,6 @@ click_button "Submit" end -When /^I sign up for Battle 12 with combination F$/ do - step %{I start signing up for "Battle 12"} - step %{I check the 1st checkbox with the value "Stargate Atlantis"} - step %{I check the 2nd checkbox with the value "Stargate Atlantis"} - step %{I fill in the 1st field with id matching "freeform_tagnames" with "Alternate Universe - Historical"} - step %{I check the 1st checkbox with the value "Major Character Death"} - click_button "Submit" -end - When /^I sign up for Battle 12 with combination E$/ do step "I go to the collections page" step "I follow \"Battle 12\""