-
Notifications
You must be signed in to change notification settings - Fork 510
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AO3-6764 Add kudo mailer preview #4875
AO3-6764 Add kudo mailer preview #4875
Conversation
guest_count = params[:guest_count] || 1 | ||
user_count = params[:user_count].to_i || 1 | ||
names = Array.new(user_count) { "User#{Faker::Alphanumeric.alpha(number: 8)}" } | ||
hash = { "Work_#{work.id}": { guest_count:, names: } } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This syntax is new to Ruby 3.1 and the rubocop annotation is a false positive. Adding a space would make a different cop complain. This cop accepts the formatting starting with rubocop 1.24.0, we are on 1.22.3.
reset_mailer | ||
end | ||
|
||
Then /^"([^\"]*)" should be emailed$/ do |user| | ||
Given "a locale with translated emails" do | ||
language = Language.find_or_create_by(short: "new", name: "New") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a completely new language and locale to prevent the existing translations from interfering with the tests. Otherwise a test might break when a Phrase export changes a translation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Issue
https://otwarchive.atlassian.net/browse/AO3-6764
Purpose
Add a preview for the kudo mailer. The amount of guest and user kudos is configurable with URL params.
Move the
I18n.with_locale
call so that the locale dropdown in the preview works (see #4292 for another PR that did this). Update the locale keys to get rid of thehtml_safe
calls.Testing Instructions
See Jira.
References
PR Limit: 6 out of 5
Using reviewer bonus:
#4720
#4736
Credit
Bilka (he/him)