-
Sean Doyle authored
When an application defines mailers without any corresponding previews, requests to `GET /rails/mailers` return a page with a blank `<body>` element. This entirely empty page can be confusing, since it's difficult to distinguish the "success" state with an empty list and a "failure" state with swallowed errors. Similarly, when an `ActionMailer::Preview` subclass is defined, but doesn't declare any actions, the response contains a mostly empty page. This commit renders empty-state messaging for both scenarios, and links to the [Action Mailer Basics][] guides. To effectively cover that behavior, this commit also expands the Mailer Preview test coverage to utilize [rails-dom-testing][] assertions. [Action Mailer Basics]: https://guides.rubyonrails.org/action_mailer_basics.html#previewing-emails [rails-dom-testing]: http://github.com/rails/rails-dom-testing
Sean Doyle authoredWhen an application defines mailers without any corresponding previews, requests to `GET /rails/mailers` return a page with a blank `<body>` element. This entirely empty page can be confusing, since it's difficult to distinguish the "success" state with an empty list and a "failure" state with swallowed errors. Similarly, when an `ActionMailer::Preview` subclass is defined, but doesn't declare any actions, the response contains a mostly empty page. This commit renders empty-state messaging for both scenarios, and links to the [Action Mailer Basics][] guides. To effectively cover that behavior, this commit also expands the Mailer Preview test coverage to utilize [rails-dom-testing][] assertions. [Action Mailer Basics]: https://guides.rubyonrails.org/action_mailer_basics.html#previewing-emails [rails-dom-testing]: http://github.com/rails/rails-dom-testing
Loading