Fixes #3331 - Direct Article URL / Link in Zoom.
This commit is contained in:
parent
24e46c9ddf
commit
f75e18ab36
2 changed files with 58 additions and 39 deletions
|
@ -125,4 +125,5 @@
|
|||
|
||||
<div class="js-article-actions"></div>
|
||||
|
||||
<small class="task-subline"><%- @humanTime(@article.created_at) %></small>
|
||||
<a href="<%- @C('http_type') %>://<%- @C('fqdn') %>/#ticket/zoom/<%- @article.ticket_id %>/<%- @article.id %>"><small class="task-subline"><%- @humanTime(@article.created_at) %></small></a>
|
||||
|
||||
|
|
|
@ -1266,8 +1266,25 @@ RSpec.describe 'Ticket zoom', type: :system do
|
|||
end
|
||||
end
|
||||
|
||||
describe 'Article ID in URL' do
|
||||
describe 'Article ID URL / link' do
|
||||
let(:ticket) { create(:ticket, group: Group.first) }
|
||||
let!(:article) { create(:'ticket/article', ticket: ticket) }
|
||||
let(:url) { "#{Setting.get('http_type')}://#{Setting.get('fqdn')}/#ticket/zoom/#{ticket.id}/#{article.id}" }
|
||||
|
||||
it 'shows Article direct link' do
|
||||
|
||||
ensure_websocket do
|
||||
visit "ticket/zoom/#{ticket.id}"
|
||||
await_empty_ajax_queue
|
||||
|
||||
within :active_ticket_article, article do
|
||||
expect(page).to have_css(%(a[href="#{url}"]))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context 'when multiple Articles are present' do
|
||||
|
||||
let(:article_count) { 20 }
|
||||
let(:article_at_the_top) { ticket.articles.first }
|
||||
let(:article_in_the_middle) { ticket.articles[ article_count / 2 ] }
|
||||
|
@ -1320,6 +1337,7 @@ RSpec.describe 'Ticket zoom', type: :system do
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe 'Macros', authenticated_as: :authenticate do
|
||||
let(:macro) { create :macro, perform: { 'article.note'=>{ 'body' => 'macro <b>body</b>', 'internal' => 'true', 'subject' => 'macro note' } } }
|
||||
|
|
Loading…
Reference in a new issue