-
Notifications
You must be signed in to change notification settings - Fork 192
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add helper copy to admin attachments interface
Attachments don't work consistently across all formats. While experienced publishers know this, we sometimes get support requests from users confused as to why their attachments are not displaying. This commit aims to improve the situation ever so slightly with some copy. Relevant Trello ticket (2ndline): https://trello.com/c/XeE6aw32/156-improve-whitehall-publisher-attachment-copy
- Loading branch information
Theodor Vararu
committed
May 24, 2016
1 parent
a43d220
commit e044301
Showing
2 changed files
with
37 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,28 @@ | ||
require 'test_helper' | ||
require 'capybara/rails' | ||
|
||
class AttachmentsTest < ActionDispatch::IntegrationTest | ||
include Capybara::DSL | ||
|
||
setup do | ||
login_as_admin | ||
end | ||
|
||
test 'displays attachment helper copy for non-publications' do | ||
edition = create(:edition) | ||
visit "/government/admin/editions/#{edition.id}/attachments" | ||
|
||
within ".qa-helper-copy" do | ||
assert_text "need to be referenced" | ||
end | ||
end | ||
|
||
test 'displays different helper copy for publications' do | ||
publication = create(:publication) | ||
visit "/government/admin/editions/#{publication.id}/attachments" | ||
|
||
within ".qa-helper-copy" do | ||
assert_text "will appear automatically" | ||
end | ||
end | ||
end |