Skip to content
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-6307 Add mailer previews for creatorship notifications #4292

Merged
merged 1 commit into from
Jul 17, 2022

Conversation

redsummernight
Copy link
Member

Issue

https://otwarchive.atlassian.net/browse/AO3-6307

Purpose

Enable mailer previews in development and staging.

  • Patch the preview UI to hide the ribbon dev mark.
  • To make the previews' locale selector work, move the I18n.with_locale block outside the mailer methods.
  • Wrap the previews in a transaction and roll back to avoid saving preview data to the database.
  • Use factory_bot to generate preview data.

Simplify factory_bot setup.

  • In development and test, include factory_bot_rails which automatically finds and loads definitions.
  • In staging, install only factory_bot without loading it by default, because we don't want it used outside mailer previews where we explicitly require it.

Testing Instructions

The preview UI should be at https://test.archiveofourown.org/rails/mailers.

Enable mailer previews in development and staging.

- Patch the preview UI to hide the ribbon dev mark.
- To make the previews' locale selector work, move the I18n.with_locale
  block outside the mailer methods.
- Wrap the previews in a transaction and roll back to avoid saving
  preview data to the database.
- Use factory_bot to generate preview data.

Simplify factory_bot setup.

- In development and test, include factory_bot_rails which automatically
  finds and loads definitions.
- In staging, install only factory_bot without loading it by default,
  because we don't want it used outside mailer previews where we
  explicitly require it.
@sarken sarken merged commit 1fe7681 into otwcode:master Jul 17, 2022
@redsummernight redsummernight deleted the test/mailer-preview branch July 18, 2022 00:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants