From 6f04948804244e2d9716b8ec98ba22f6a9aa0513 Mon Sep 17 00:00:00 2001 From: Slava <53832230+slavalamp@users.noreply.github.com> Date: Thu, 18 Dec 2025 00:24:42 +0000 Subject: [PATCH 1/6] AO3-6227 track if match generation failed, added page and mailer and some tests --- .../challenge/gift_exchange_controller.rb | 6 ++- .../potential_matches_controller.rb | 2 + app/mailers/user_mailer.rb | 9 ++++ app/models/challenge_assignment.rb | 21 +++++++- .../potential_matches/_in_progress.html.erb | 11 ++-- app/views/potential_matches/index.html.erb | 26 ++++++--- ...no_potential_matches_notification.html.erb | 13 +++++ ...no_potential_matches_notification.text.erb | 11 ++++ config/locales/mailers/en.yml | 9 ++++ config/locales/views/en.yml | 21 ++++++++ ...tential_matches_found_to_gift_exchanges.rb | 5 ++ .../challenge_giftexchange.feature | 32 +++++++++++ spec/mailers/user_mailer_spec.rb | 53 +++++++++++++++++++ test/mailers/previews/user_mailer_preview.rb | 15 ++++++ 14 files changed, 216 insertions(+), 18 deletions(-) create mode 100644 app/views/user_mailer/no_potential_matches_notification.html.erb create mode 100644 app/views/user_mailer/no_potential_matches_notification.text.erb create mode 100644 db/migrate/20251217222100_add_no_potential_matches_found_to_gift_exchanges.rb diff --git a/app/controllers/challenge/gift_exchange_controller.rb b/app/controllers/challenge/gift_exchange_controller.rb index dccf8e0a77f..d19d12ce64a 100644 --- a/app/controllers/challenge/gift_exchange_controller.rb +++ b/app/controllers/challenge/gift_exchange_controller.rb @@ -42,6 +42,10 @@ def update # expire the cache on the signup form ActionController::Base.new.expire_fragment('challenge_signups/new') + # allow regenerating matches if none were found previously + @challenge.no_potential_matches_found = false + @challenge.save + # see if we initialized the tag set redirect_to collection_profile_path(@collection) else @@ -65,7 +69,7 @@ def gift_exchange_params :signup_instructions_general, :signup_instructions_requests, :signup_instructions_offers, :request_url_label, :offer_url_label, :offer_description_label, :request_description_label, :works_reveal_at_string, - :authors_reveal_at_string, + :authors_reveal_at_string, :no_potential_matches_found, request_restriction_attributes: [ :id, :optional_tags_allowed, :title_required, :title_allowed, :description_required, :description_allowed, :url_required, :url_allowed, :fandom_num_required, diff --git a/app/controllers/potential_matches_controller.rb b/app/controllers/potential_matches_controller.rb index 8b19c74cb5c..d0b19d40633 100644 --- a/app/controllers/potential_matches_controller.rb +++ b/app/controllers/potential_matches_controller.rb @@ -65,6 +65,8 @@ def index @assignment_in_progress = true elsif @collection.potential_matches.count > 0 && @collection.assignments.count == 0 flash[:error] = ts("There has been an error in the potential matching. Please first try regenerating assignments, and if that doesn't work, all potential matches. If the problem persists, please contact Support.") + elsif @collection.challenge.no_potential_matches_found? + @no_potential_matches_found = true elsif @collection.potential_matches.count > 0 # we have potential_matches and assignments diff --git a/app/mailers/user_mailer.rb b/app/mailers/user_mailer.rb index ed24269f1a0..7cdfdcd3e8e 100644 --- a/app/mailers/user_mailer.rb +++ b/app/mailers/user_mailer.rb @@ -204,6 +204,15 @@ def potential_match_generation_notification(collection_id, email) ) end + def no_potential_matches_notification(collection_id, email) + @collection = Collection.find(collection_id) + @is_collection_email = (email == @collection.collection_email) + mail( + to: email, + subject: default_i18n_subject(app_name: ArchiveConfig.APP_SHORT_NAME, collection_title: @collection.title) + ) + end + def challenge_assignment_notification(collection_id, assigned_user_id, assignment_id) @collection = Collection.find(collection_id) @assigned_user = User.find(assigned_user_id) diff --git a/app/models/challenge_assignment.rb b/app/models/challenge_assignment.rb index 347473b8b06..6eeff82825b 100755 --- a/app/models/challenge_assignment.rb +++ b/app/models/challenge_assignment.rb @@ -369,6 +369,23 @@ def self.delayed_generate(collection_id) end REDIS_GENERAL.del(progress_key(collection)) + no_potential_matches_found = collection.potential_matches.empty? + collection.challenge.no_potential_matches_found = no_potential_matches_found + collection.challenge.save! + + if no_potential_matches_found? + if collection.collection_email.present? + UserMailer.no_potential_matches_notification(collection.id, collection.collection_email).deliver_later + else + collection.maintainers_list.each do |user| + I18n.with_locale(user.preference.locale_for_mails) do + UserMailer.no_potential_matches_notification(collection.id, user.email).deliver_later + end + end + end + return + end + if collection.collection_email.present? UserMailer.potential_match_generation_notification(collection.id, collection.collection_email).deliver_later else @@ -376,8 +393,8 @@ def self.delayed_generate(collection_id) I18n.with_locale(user.preference.locale_for_mails) do UserMailer.potential_match_generation_notification(collection.id, user.email).deliver_later end - end - end + end + end end # go through the request's potential matches in order from best to worst and try and assign diff --git a/app/views/potential_matches/_in_progress.html.erb b/app/views/potential_matches/_in_progress.html.erb index d6b97a677ba..8759e974be6 100644 --- a/app/views/potential_matches/_in_progress.html.erb +++ b/app/views/potential_matches/_in_progress.html.erb @@ -1,16 +1,13 @@

- <%= ts("The archive is generating potential matches for this challenge. This can take a long time, - especially for a large challenge! We'll send an email to the collection maintainers when - all potential matches have been generated. ") %> + <%= t(".generating_matches") %>

- <%= ts("If the progress value below doesn't change when you reload the page - after about 10 minutes, there may have been a problem. Please check again after an hour, and then contact archive support.") %> + <%= t(".if_progress_doesnt_change") %>

- <%= ts("Potential match generation progress:") %> <%= @progress %>% + <%= t(".generation_progress") %> <%= @progress %>%

-<%= button_to ts("Cancel Potential Match Generation"), cancel_generate_collection_potential_matches_path(@collection), method: :post %> +<%= button_to t(".cancel"), cancel_generate_collection_potential_matches_path(@collection), method: :post %> diff --git a/app/views/potential_matches/index.html.erb b/app/views/potential_matches/index.html.erb index f0ef1e1eda2..4d2d5d5197d 100644 --- a/app/views/potential_matches/index.html.erb +++ b/app/views/potential_matches/index.html.erb @@ -1,5 +1,5 @@ -

<%= ts('Matching for %{collection_title}', :collection_title => @collection.title) %>

+

<%= t(".page_heading", collection_title: @collection.title) %>

@@ -8,26 +8,36 @@ <% if @challenge.signup_open %>

- <%= ts("You can't generate matches while sign-up is still open. After you have closed sign-ups in Challenge Settings, - you will be able to generate potential matches here.") %> + <%= t(".cant_generate_matches") %>

<% elsif @collection.signups.count < 2 %>

- <%= ts("You need at least two people to sign up before you can make assignments.") %> + <%= t(".need_two_people") %>

<% elsif @in_progress %> <%= render "in_progress"%> <% elsif @assignment_in_progress %> -

<%= ts("Assignments Generating") %> <%= link_to_help "challenge-matching" %>

+

<%= t(".assignments_generating.heading") %> <%= link_to_help "challenge-matching" %>

- <%= ts("We're now in the process of generating assignments. This should take less time than potential matching.") %> + <%= t(".assignments_generating.in_the_process") %>

+<% elsif @no_potential_matches_found %> +

<%= t(".no_potential_matches.heading") %> <%= link_to_help "challenge-matching" %>

+ +

+ <%= t(".no_potential_matches.no_matches_found") %> +

+ +

+ <%= t(".no_potential_matches.please_try_again_html", match_settings_link: link_to(t(".no_potential_matches.match_settings"), edit_collection_gift_exchange_path(@collection, anchor: "match_settings"))) %> +

+ <% elsif @collection.potential_matches.empty? %> -

<%= ts("Potential Match Generation") %> <%= link_to_help "challenge-matching" %>

+

<%= t(".no_matches_yet.heading") %> <%= link_to_help "challenge-matching" %>

<%= render "match_navigation" %>

- <%= ts("No potential matches yet!") %> + <%= t(".no_matches_yet.no_matches_yet") %>

<% if !@settings || @settings.no_match_required? %> diff --git a/app/views/user_mailer/no_potential_matches_notification.html.erb b/app/views/user_mailer/no_potential_matches_notification.html.erb new file mode 100644 index 00000000000..4c28a4fe78f --- /dev/null +++ b/app/views/user_mailer/no_potential_matches_notification.html.erb @@ -0,0 +1,13 @@ +<% content_for :message do %> +

<%= t(".generation_finished.html", collection_link: style_link(@collection.title, collection_url(@collection))) %>

+ +

<%= t(".please_try_again.html", match_settings_link: style_link(t(".please_try_again.match_settings"), edit_collection_gift_exchange_url(@collection, anchor: "match_settings"))) %>

+<% end %> + +<% content_for :footer_note do %> + <%= collection_footer_note_html(@is_collection_email, @collection) %> +<% end %> + +<% content_for :sent_at do %> + <%= l(Time.current) %> +<% end %> diff --git a/app/views/user_mailer/no_potential_matches_notification.text.erb b/app/views/user_mailer/no_potential_matches_notification.text.erb new file mode 100644 index 00000000000..32ae8c9de0f --- /dev/null +++ b/app/views/user_mailer/no_potential_matches_notification.text.erb @@ -0,0 +1,11 @@ +<% content_for :message do %> +<%= t(".generation_finished.text", collection_title: @collection.title, collection_url: collection_url(@collection)) %> + +<%= t(".please_try_again.text", match_settings_url: edit_collection_gift_exchange_url(@collection, anchor: "match_settings")) %> +<% end %> + +<% content_for :footer_note do %> +<%= collection_footer_note_text(@is_collection_email, @collection) -%> +<% end %> + +<% content_for :sent_at do %><%= l(Time.current) %><% end %> diff --git a/config/locales/mailers/en.yml b/config/locales/mailers/en.yml index d9c65649f0b..ad0d63f646a 100644 --- a/config/locales/mailers/en.yml +++ b/config/locales/mailers/en.yml @@ -745,6 +745,15 @@ en: would_like_to_include: html: The collection maintainers of %{collection_link} would like to include your work %{work_link} in their collection! text: The collection maintainers of "%{collection_title}" (%{collection_url}) would like to include your work "%{work_title}" (%{work_url}) in their collection! + no_potential_matches_notification: + generation_finished: + html: Potential match generation for %{collection_link} has finished. Unfortunately, there were no potential matches found. + text: Potential match generation for "%{collection_title}" (%{collection_url}) has finished. Unfortunately, there were no potential matches found. + please_try_again: + html: Please update your gift exchange's %{match_settings_link} and try generating potential matches again. + match_settings: Minimum Number to Match settings + text: Please update your gift exchange's Minimum Number to Match settings (%{match_settings_url}) and try generating potential matches again. + subject: "[%{app_name}][%{collection_title}] No potential matches found" potential_match_generation_notification: finished_generating: html: We have finished generating potential assignments for your gift exchange %{collection_link}. diff --git a/config/locales/views/en.yml b/config/locales/views/en.yml index 12b3e8d85da..3d6118f993e 100644 --- a/config/locales/views/en.yml +++ b/config/locales/views/en.yml @@ -2100,6 +2100,27 @@ en: nav: Pagination next: Next → prev: "← Previous" + potential_matches: + in_progress: + cancel: Cancel Potential Match Generation + generating_matches: The archive is generating potential matches for this challenge. This can take a long time, especially for a large challenge! We'll send an email to the collection maintainers when all potential matches have been generated. + generation_progress: 'Potential match generation progress:' + if_progress_doesnt_change: If the progress value below doesn't change when you reload the page after about 10 minutes, there may have been a problem. Please check again after an hour, and then contact archive support. + index: + assignments_generating: + heading: Assignments Generating + in_the_process: We're now in the process of generating assignments. This should take less time than potential matching. + cant_generate_matches: You can't generate matches while sign-up is still open. After you have closed sign-ups in Challenge Settings, you will be able to generate potential matches here. + need_two_people: You need at least two people to sign up before you can make assignments. + no_matches_yet: + heading: Potential Match Generation + no_matches_yet: No potential matches yet! + no_potential_matches: + heading: No Potential Matches + match_settings: Minimum Number to Match settings + no_matches_found: No potential matches were found. + please_try_again_html: Please update your challenge's %{match_settings_link} and try generating potential matches again. + page_heading: Matching for %{collection_title} preferences: index: browser_page_title_format: Browser page title format diff --git a/db/migrate/20251217222100_add_no_potential_matches_found_to_gift_exchanges.rb b/db/migrate/20251217222100_add_no_potential_matches_found_to_gift_exchanges.rb new file mode 100644 index 00000000000..121aec13537 --- /dev/null +++ b/db/migrate/20251217222100_add_no_potential_matches_found_to_gift_exchanges.rb @@ -0,0 +1,5 @@ +class AddNoPotentialMatchesFoundToGiftExchanges < ActiveRecord::Migration[7.2] + def change + add_column :gift_exchanges, :no_potential_matches_found, :boolean + end +end diff --git a/features/gift_exchanges/challenge_giftexchange.feature b/features/gift_exchanges/challenge_giftexchange.feature index 1c1fd631010..028e69e1bb1 100644 --- a/features/gift_exchanges/challenge_giftexchange.feature +++ b/features/gift_exchanges/challenge_giftexchange.feature @@ -212,6 +212,38 @@ Feature: Gift Exchange Challenge Then I should see "Reviewing Assignments" And I should see "Complete" + Scenario: When no potential matches can be generated, the Matching page and notification emails reflect that + Given a locale with translated emails + And I create the gift exchange "NoMatches" with the following options + | value | minimum | maximum | match | + | prompts | 1 | 1 | 1 | + | fandoms | 1 | 1 | 1 | + And the user "moderator" enables translated emails + And I have added a co-moderator "mod2" to collection "NoMatches" + When the user "badgirlsdoitwell" signs up for "NoMatches" with the following prompts + | type | characters | fandoms | freeforms | ratings | categories | + | request | | the show | | | | + | offer | | the show | | | | + And the user "sweetiepie" signs up for "NoMatches" with the following prompts + | type | characters | fandoms | freeforms | ratings | categories | + | request | | the book | | | | + | offer | | the book | | | | + When I close signups for "NoMatches" + And I follow "Matching" + And I press "Generate Potential Matches" + Then I should see "Beginning generation of potential matches." + And 1 email should be delivered to "moderator" + And the email to "moderator" should be translated + And the email should contain "there were no potential matches found" + And the email should contain "you are an owner or moderator of the collection" + And 1 email should be delivered to "mod2" + And the email to "mod2" should be non-translated + And the email should contain "there were no potential matches found" + And the email should contain "you are an owner or moderator of the collection" + When I reload the page + Then I should see "No Potential Matches" + And I should see "No potential matches were found." + Scenario: Invalid signups are caught before generation and a translated email is sent Given the gift exchange "Awesome Gift Exchange" is ready for matching And I create an invalid signup in the gift exchange "Awesome Gift Exchange" diff --git a/spec/mailers/user_mailer_spec.rb b/spec/mailers/user_mailer_spec.rb index a7c0e5af694..689b695d810 100644 --- a/spec/mailers/user_mailer_spec.rb +++ b/spec/mailers/user_mailer_spec.rb @@ -1176,6 +1176,59 @@ def queue_adapter_for_test end end + describe "#no_potential_matches_notification" do + subject(:email) { UserMailer.no_potential_matches_notification(collection.id, "test@example.com") } + + let(:collection) { create(:collection) } + + # Test the headers + it_behaves_like "an email with a valid sender" + + it "has the correct subject line" do + subject = "[#{ArchiveConfig.APP_SHORT_NAME}][#{collection.title}] No potential matches found" + expect(email.subject).to eq(subject) + end + + # Test both body contents + it_behaves_like "a multipart email" + + it_behaves_like "a translated email" + + describe "HTML version" do + it "has the correct content" do + expect(email).to have_html_part_content("Potential match generation for <") + expect(email).to have_html_part_content("your gift exchange's <") + end + end + + describe "text version" do + it "has the correct content" do + expect(email).to have_text_part_content("Potential match generation for \"#{collection.title}\"") + expect(email).to have_text_part_content("your gift exchange's Minimum Number to Match settings") + end + end + end + + describe "#no_potential_matches_notification sent to collection_email" do + subject(:email) { UserMailer.no_potential_matches_notification(collection.id, collection.collection_email) } + + let(:collection) { create(:collection) } + + it_behaves_like "an email with a valid sender" + + describe "HTML version" do + it "has the correct footer content" do + expect(email).to have_html_part_content("your email address has been listed as the collection email") + end + end + + describe "text version" do + it "has the correct footer content" do + expect(email).to have_text_part_content("your email address has been listed as the collection email") + end + end + end + describe "#invalid_signup_notification" do subject(:email) { UserMailer.invalid_signup_notification(collection.id, [signup.id], "test@example.com") } diff --git a/test/mailers/previews/user_mailer_preview.rb b/test/mailers/previews/user_mailer_preview.rb index 003c314ff4e..0e6a24a784a 100644 --- a/test/mailers/previews/user_mailer_preview.rb +++ b/test/mailers/previews/user_mailer_preview.rb @@ -316,6 +316,21 @@ def potential_match_generation_notification_maintainer UserMailer.potential_match_generation_notification(collection.id, email) end + # URL: /rails/mailers/user_mailer/no_potential_matches_notification_collection_email + def no_potential_matches_notification_collection_email + collection = create(:collection, email: "collection@example.com") + email = collection.collection_email + UserMailer.no_potential_matches_notification(collection.id, email) + end + + # URL: /rails/mailers/user_mailer/no_potential_matches_notification_maintainer + def no_potential_matches_notification_notification_maintainer + user = create(:user, :for_mailer_preview) + collection = create(:collection, owners: [user.default_pseud]) + email = user.email + UserMailer.no_potential_matches_notification(collection.id, email) + end + # URL: /rails/mailers/user_mailer/invalid_signup_notification_collection_email?signup_count=2 def invalid_signup_notification_collection_email signup_count = params[:signup_count] ? params[:signup_count].to_i : 1 From 5ff8ffb735fcea7a90b1963b6c67ad8c2543b608 Mon Sep 17 00:00:00 2001 From: Slava <53832230+slavalamp@users.noreply.github.com> Date: Thu, 18 Dec 2025 02:58:01 +0100 Subject: [PATCH 2/6] AO3-6277 make tests work (the previous message had a typo in the ticket number btw) --- app/models/challenge_assignment.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/challenge_assignment.rb b/app/models/challenge_assignment.rb index 6eeff82825b..c5bc1c3a408 100755 --- a/app/models/challenge_assignment.rb +++ b/app/models/challenge_assignment.rb @@ -373,7 +373,7 @@ def self.delayed_generate(collection_id) collection.challenge.no_potential_matches_found = no_potential_matches_found collection.challenge.save! - if no_potential_matches_found? + if no_potential_matches_found if collection.collection_email.present? UserMailer.no_potential_matches_notification(collection.id, collection.collection_email).deliver_later else From c2f28595ac73935c008383ce7f53229ac29fa7d1 Mon Sep 17 00:00:00 2001 From: Slava <53832230+slavalamp@users.noreply.github.com> Date: Thu, 18 Dec 2025 19:50:12 +0000 Subject: [PATCH 3/6] AO3-6277 make sign-up requests work again --- app/controllers/challenge/gift_exchange_controller.rb | 6 ++++-- ...2100_add_no_potential_matches_found_to_gift_exchanges.rb | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/controllers/challenge/gift_exchange_controller.rb b/app/controllers/challenge/gift_exchange_controller.rb index d19d12ce64a..fb359db288d 100644 --- a/app/controllers/challenge/gift_exchange_controller.rb +++ b/app/controllers/challenge/gift_exchange_controller.rb @@ -43,8 +43,10 @@ def update ActionController::Base.new.expire_fragment('challenge_signups/new') # allow regenerating matches if none were found previously - @challenge.no_potential_matches_found = false - @challenge.save + if (@challenge.no_potential_matches_found?) + @challenge.no_potential_matches_found = false + @challenge.save! + end # see if we initialized the tag set redirect_to collection_profile_path(@collection) diff --git a/db/migrate/20251217222100_add_no_potential_matches_found_to_gift_exchanges.rb b/db/migrate/20251217222100_add_no_potential_matches_found_to_gift_exchanges.rb index 121aec13537..3acc2be899f 100644 --- a/db/migrate/20251217222100_add_no_potential_matches_found_to_gift_exchanges.rb +++ b/db/migrate/20251217222100_add_no_potential_matches_found_to_gift_exchanges.rb @@ -1,5 +1,5 @@ class AddNoPotentialMatchesFoundToGiftExchanges < ActiveRecord::Migration[7.2] def change - add_column :gift_exchanges, :no_potential_matches_found, :boolean + add_column :gift_exchanges, :no_potential_matches_found, :boolean, default: false, null: false end end From f77137859993bb48e8606b72f247634aee3269fe Mon Sep 17 00:00:00 2001 From: Slava <53832230+slavalamp@users.noreply.github.com> Date: Thu, 18 Dec 2025 20:53:21 +0100 Subject: [PATCH 4/6] AO3-6277 rubocop --- app/controllers/challenge/gift_exchange_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/challenge/gift_exchange_controller.rb b/app/controllers/challenge/gift_exchange_controller.rb index fb359db288d..2871c137d23 100644 --- a/app/controllers/challenge/gift_exchange_controller.rb +++ b/app/controllers/challenge/gift_exchange_controller.rb @@ -43,7 +43,7 @@ def update ActionController::Base.new.expire_fragment('challenge_signups/new') # allow regenerating matches if none were found previously - if (@challenge.no_potential_matches_found?) + if @challenge.no_potential_matches_found? @challenge.no_potential_matches_found = false @challenge.save! end From 12c96bc76e2b895a1a57449b73f80d8f24c42ed4 Mon Sep 17 00:00:00 2001 From: Slava <53832230+slavalamp@users.noreply.github.com> Date: Wed, 24 Dec 2025 04:20:48 +0100 Subject: [PATCH 5/6] AO3-6277 improve a test --- .../challenge/gift_exchange_controller.rb | 2 +- .../gift_exchanges/challenge_giftexchange.feature | 14 +++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/app/controllers/challenge/gift_exchange_controller.rb b/app/controllers/challenge/gift_exchange_controller.rb index 2871c137d23..c59c0ee62fb 100644 --- a/app/controllers/challenge/gift_exchange_controller.rb +++ b/app/controllers/challenge/gift_exchange_controller.rb @@ -71,7 +71,7 @@ def gift_exchange_params :signup_instructions_general, :signup_instructions_requests, :signup_instructions_offers, :request_url_label, :offer_url_label, :offer_description_label, :request_description_label, :works_reveal_at_string, - :authors_reveal_at_string, :no_potential_matches_found, + :authors_reveal_at_string, request_restriction_attributes: [ :id, :optional_tags_allowed, :title_required, :title_allowed, :description_required, :description_allowed, :url_required, :url_allowed, :fandom_num_required, diff --git a/features/gift_exchanges/challenge_giftexchange.feature b/features/gift_exchanges/challenge_giftexchange.feature index 4278ebb509b..4373a8d58c2 100644 --- a/features/gift_exchanges/challenge_giftexchange.feature +++ b/features/gift_exchanges/challenge_giftexchange.feature @@ -226,21 +226,21 @@ Feature: Gift Exchange Challenge Scenario: When no potential matches can be generated, the Matching page and notification emails reflect that Given a locale with translated emails - And I create the gift exchange "NoMatches" with the following options + And I create the gift exchange "One Fandom to Match" with the following options | value | minimum | maximum | match | | prompts | 1 | 1 | 1 | | fandoms | 1 | 1 | 1 | And the user "moderator" enables translated emails - And I have added a co-moderator "mod2" to collection "NoMatches" - When the user "badgirlsdoitwell" signs up for "NoMatches" with the following prompts + And I have added a co-moderator "mod2" to collection "One Fandom to Match" + When the user "badgirlsdoitwell" signs up for "One Fandom to Match" with the following prompts | type | characters | fandoms | freeforms | ratings | categories | | request | | the show | | | | | offer | | the show | | | | - And the user "sweetiepie" signs up for "NoMatches" with the following prompts + And the user "sweetiepie" signs up for "One Fandom to Match" with the following prompts | type | characters | fandoms | freeforms | ratings | categories | | request | | the book | | | | | offer | | the book | | | | - When I close signups for "NoMatches" + When I close signups for "One Fandom to Match" And I follow "Matching" And I press "Generate Potential Matches" Then I should see "Beginning generation of potential matches." @@ -255,6 +255,10 @@ Feature: Gift Exchange Challenge When I reload the page Then I should see "No Potential Matches" And I should see "No potential matches were found." + When I edit settings for "One Fandom to Match" challenge + And I submit + And I follow "Matching" + Then I should see "No potential matches yet!" Scenario: Invalid signups are caught before generation and a translated email is sent Given the gift exchange "Awesome Gift Exchange" is ready for matching From c2fbe27ea68650c64a2b65418fac1395fb0713d1 Mon Sep 17 00:00:00 2001 From: Slava <53832230+slavalamp@users.noreply.github.com> Date: Wed, 24 Dec 2025 04:31:47 +0100 Subject: [PATCH 6/6] AO3-6277 actually improve --- .../gift_exchanges/challenge_giftexchange.feature | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/features/gift_exchanges/challenge_giftexchange.feature b/features/gift_exchanges/challenge_giftexchange.feature index 4373a8d58c2..711008ad702 100644 --- a/features/gift_exchanges/challenge_giftexchange.feature +++ b/features/gift_exchanges/challenge_giftexchange.feature @@ -226,21 +226,21 @@ Feature: Gift Exchange Challenge Scenario: When no potential matches can be generated, the Matching page and notification emails reflect that Given a locale with translated emails - And I create the gift exchange "One Fandom to Match" with the following options + And I create the gift exchange "OneFandomToMatch" with the following options | value | minimum | maximum | match | | prompts | 1 | 1 | 1 | | fandoms | 1 | 1 | 1 | And the user "moderator" enables translated emails - And I have added a co-moderator "mod2" to collection "One Fandom to Match" - When the user "badgirlsdoitwell" signs up for "One Fandom to Match" with the following prompts + And I have added a co-moderator "mod2" to collection "OneFandomToMatch" + When the user "badgirlsdoitwell" signs up for "OneFandomToMatch" with the following prompts | type | characters | fandoms | freeforms | ratings | categories | | request | | the show | | | | | offer | | the show | | | | - And the user "sweetiepie" signs up for "One Fandom to Match" with the following prompts + And the user "sweetiepie" signs up for "OneFandomToMatch" with the following prompts | type | characters | fandoms | freeforms | ratings | categories | | request | | the book | | | | | offer | | the book | | | | - When I close signups for "One Fandom to Match" + When I close signups for "OneFandomToMatch" And I follow "Matching" And I press "Generate Potential Matches" Then I should see "Beginning generation of potential matches." @@ -255,7 +255,7 @@ Feature: Gift Exchange Challenge When I reload the page Then I should see "No Potential Matches" And I should see "No potential matches were found." - When I edit settings for "One Fandom to Match" challenge + When I edit settings for "OneFandomToMatch" challenge And I submit And I follow "Matching" Then I should see "No potential matches yet!"