Do not require SiteConfig.tagline (#10623) [deploy]
* Fix incorrect formatting in admin/configs/show.html.erb * Only render SiteConfig.tagline if it exists * Fix typo in _signup_modal.html.erb * Remove tagline from VerifySetupCompleted::MANDATORY_CONFIGS * Improve signup_modal tagline specs * Tiny fixes to address @citizen428's comments
This commit is contained in:
parent
a282994e24
commit
3d169b5e6f
5 changed files with 882 additions and 864 deletions
|
|
@ -7,7 +7,6 @@ module VerifySetupCompleted
|
|||
community_name
|
||||
community_description
|
||||
community_action
|
||||
tagline
|
||||
|
||||
main_social_image
|
||||
logo_png
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -2,7 +2,9 @@
|
|||
<div class="crayons-layout crayons-layout--limited mb-10" style="max-width:640px">
|
||||
<div class="crayons-notice mt-4">
|
||||
<h1>Welcome to <%= community_name %></h1>
|
||||
<h3><%= SiteConfig.tagline %></h3>
|
||||
<% if SiteConfig.tagline.present? %>
|
||||
<h3><%= SiteConfig.tagline %></h3>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="mt-3 crayons-card p-7 align-left">
|
||||
<h2>Set a password to access your account</h2>
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
<% if SiteConfig.tagline.present? %>
|
||||
<%= SiteConfig.tagline %>
|
||||
<% else %>
|
||||
We’d love for you to be apart of this community.
|
||||
We’d love for you to be a part of this community.
|
||||
<% end %>
|
||||
</p>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,8 +1,17 @@
|
|||
require "rails_helper"
|
||||
|
||||
RSpec.describe "layouts/_signup_modal.html.erb", type: :view do
|
||||
it "has the tagline" do
|
||||
let(:tagline_text) { "the best community" }
|
||||
|
||||
it "renders the tagline if it is set" do
|
||||
allow(SiteConfig).to receive(:tagline).and_return(tagline_text)
|
||||
render
|
||||
expect(rendered).to have_text(SiteConfig.tagline)
|
||||
end
|
||||
|
||||
it "does not render the tagline if it is not set" do
|
||||
allow(SiteConfig).to receive(:tagline).and_return(nil)
|
||||
render
|
||||
expect(rendered).not_to have_text(tagline_text)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue