-
Notifications
You must be signed in to change notification settings - Fork 193
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9668 from alphagov/content-modelling/707-update-w…
…hitehall-to-allow-insert-journey (707) Add Content Block guidance to Whitehall in non-production environments
- Loading branch information
Showing
4 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<h3 class="govuk-heading-m">Content block</h3> | ||
|
||
<p class="govuk-body"> | ||
To create, edit and use standardised content, go to the | ||
<%= link_to "Content Block Manager (opens in new tab)", content_block_manager.content_block_manager_root_path, class: "govuk-link", target: "_blank", rel: "noopener" %>. | ||
</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
require "test_helper" | ||
|
||
class Admin::SidebarHelperTest < ActionView::TestCase | ||
extend Minitest::Spec::DSL | ||
|
||
before do | ||
test_strategy = Flipflop::FeatureSet.current.test! | ||
test_strategy.switch!(:show_link_to_content_block_manager, content_block_enabled) | ||
end | ||
|
||
context "when #show_link_to_content_block_manager? is false" do | ||
let(:content_block_enabled) { false } | ||
|
||
it "does not include content block guidance" do | ||
result = simple_formatting_sidebar | ||
assert_includes result, "Formatting" | ||
assert_includes result, "Use plain English" | ||
assert_not_includes result, "Content block" | ||
end | ||
end | ||
|
||
context "when #show_link_to_content_block_manager? is true" do | ||
let(:content_block_enabled) { true } | ||
|
||
it "includes content block guidance" do | ||
result = simple_formatting_sidebar | ||
assert_includes result, "Formatting" | ||
assert_includes result, "Use plain English" | ||
assert_includes result, "Content block" | ||
end | ||
end | ||
end |