Fixes #3040: Reply Article box closes when replying multiple times and placeholder covers input.
This commit is contained in:
parent
9402699a42
commit
f54df50154
2 changed files with 39 additions and 2 deletions
|
@ -141,11 +141,14 @@ class App.TicketZoomArticleNew extends App.Controller
|
|||
if @subscribeIdTextModule
|
||||
App.Ticket.unsubscribe(@subscribeIdTextModule)
|
||||
|
||||
@releaseGlobalClickEvents()
|
||||
|
||||
releaseGlobalClickEvents: ->
|
||||
$(window).off 'click.ticket-zoom-select-type'
|
||||
$(window).on 'click.ticket-zoom-textarea'
|
||||
$(window).off 'click.ticket-zoom-textarea'
|
||||
|
||||
render: ->
|
||||
|
||||
@releaseGlobalClickEvents()
|
||||
ticket = App.Ticket.fullLocal(@ticket_id)
|
||||
|
||||
@html App.view('ticket_zoom/article_new')(
|
||||
|
|
|
@ -172,4 +172,38 @@ RSpec.describe 'Ticket zoom', type: :system do
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
context 'replying' do
|
||||
|
||||
context 'Group without signature' do
|
||||
|
||||
let(:ticket) { create(:ticket) }
|
||||
let(:current_user) { create(:agent_user, password: 'test', groups: [ticket.group]) }
|
||||
|
||||
before do
|
||||
# initial article to reply to
|
||||
create(:ticket_article, ticket: ticket)
|
||||
end
|
||||
|
||||
it 'ensures that text input opens on multiple replies', authenticated: -> { current_user } do
|
||||
visit "ticket/zoom/#{ticket.id}"
|
||||
|
||||
2.times do |article_offset|
|
||||
articles_existing = 1
|
||||
articles_expected = articles_existing + (article_offset + 1)
|
||||
|
||||
all('a[data-type=emailReply]').last.click
|
||||
|
||||
# wait till input box expands completely
|
||||
find('.attachmentPlaceholder-label').in_fixed_postion
|
||||
expect(page).not_to have_css('.attachmentPlaceholder-hint', wait: 0)
|
||||
|
||||
find('.articleNewEdit-body').send_keys('Some reply')
|
||||
click '.js-submit'
|
||||
|
||||
expect(page).to have_css('.ticket-article-item', count: articles_expected)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue