Fixes #4094 - Tab behaviour does not show properly when doing a ticket update at the same time.
This commit is contained in:
parent
e06d10978e
commit
79997ca992
2 changed files with 9 additions and 3 deletions
|
@ -18,8 +18,6 @@ class App.TicketZoomAttributeBar extends App.Controller
|
||||||
constructor: ->
|
constructor: ->
|
||||||
super
|
super
|
||||||
|
|
||||||
@secondaryAction = @getAction()
|
|
||||||
|
|
||||||
@subscribeId = App.Macro.subscribe(@checkMacroChanges)
|
@subscribeId = App.Macro.subscribe(@checkMacroChanges)
|
||||||
@render()
|
@render()
|
||||||
|
|
||||||
|
@ -97,7 +95,7 @@ class App.TicketZoomAttributeBar extends App.Controller
|
||||||
sharedDraftButtonShown: sharedDraftButtonShown
|
sharedDraftButtonShown: sharedDraftButtonShown
|
||||||
))
|
))
|
||||||
|
|
||||||
@setSecondaryAction(@secondaryAction, localeEl)
|
@setSecondaryAction(@getAction(), localeEl)
|
||||||
|
|
||||||
if @ticket.currentView() is 'agent'
|
if @ticket.currentView() is 'agent'
|
||||||
@taskbarWatcher = new App.TaskbarWatcher(
|
@taskbarWatcher = new App.TaskbarWatcher(
|
||||||
|
|
|
@ -1843,6 +1843,14 @@ RSpec.describe 'Ticket zoom', type: :system do
|
||||||
expect(User.find_by(email: 'admin@example.com').preferences[:secondaryAction]).to eq('stayOnTab')
|
expect(User.find_by(email: 'admin@example.com').preferences[:secondaryAction]).to eq('stayOnTab')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it 'does show the correct tab state after update of the ticket (#4094)' do
|
||||||
|
select 'closed', from: 'State'
|
||||||
|
click '.js-attributeBar .dropup div'
|
||||||
|
click 'span[data-type=stayOnTab]'
|
||||||
|
click '.js-submit'
|
||||||
|
expect(page.find('.js-secondaryActionButtonLabel')).to have_text('Stay on tab')
|
||||||
|
end
|
||||||
|
|
||||||
context 'Tab behaviour - Close tab on ticket close' do
|
context 'Tab behaviour - Close tab on ticket close' do
|
||||||
it 'does not close the tab without any action' do
|
it 'does not close the tab without any action' do
|
||||||
click '.js-submit'
|
click '.js-submit'
|
||||||
|
|
Loading…
Reference in a new issue