Close task per default.
This commit is contained in:
parent
48dde6e313
commit
3c8cce0c3d
4 changed files with 37 additions and 12 deletions
|
@ -14,9 +14,9 @@ class App.TicketZoomAttributeBar extends App.Controller
|
|||
constructor: ->
|
||||
super
|
||||
|
||||
@secondaryAction = @preferencesGet() || 'closeTab'
|
||||
if !@overview_id && @secondaryAction is 'closeNextInOverview'
|
||||
@secondaryAction = 'closeTab'
|
||||
@secondaryAction = 'closeTab'
|
||||
if @overview_id
|
||||
@secondaryAction = 'closeNextInOverview'
|
||||
|
||||
@subscribeId = App.Macro.subscribe(@render)
|
||||
@render()
|
||||
|
@ -71,10 +71,3 @@ class App.TicketZoomAttributeBar extends App.Controller
|
|||
element.closest('.js-secondaryAction').find('.js-selectedIcon').addClass('is-selected')
|
||||
@secondaryActionButton.text(text)
|
||||
@secondaryActionButton.data('type', type)
|
||||
App.LocalStorage.set(@preferencesStoreKey(), type, @Session.get('id'))
|
||||
|
||||
preferencesGet: =>
|
||||
App.LocalStorage.get(@preferencesStoreKey(), @Session.get('id'))
|
||||
|
||||
preferencesStoreKey: =>
|
||||
"ticketZoom:taskAktion:#{@ticket_id}"
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
<div class="btn js-reset hide"><%- @T('Discard your unsaved changes.') %></div>
|
||||
<div class="buttonDropdown dropdown dropdown--actions dropup">
|
||||
<div class="btn btn--text btn--icon--last" data-toggle="dropdown">
|
||||
<span class="js-secondaryActionButtonLabel">xx</span> <%- @Icon('arrow-up') %>
|
||||
<span class="js-secondaryActionButtonLabel"></span> <%- @Icon('arrow-up') %>
|
||||
</div>
|
||||
<ul class="dropdown-menu dropdown-menu-right" role="menu" aria-labelledby="secondaryAction">
|
||||
<li class="js-secondaryAction" role="menuitem">
|
||||
|
@ -23,6 +22,7 @@
|
|||
</span>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="buttonDropdown btn js-reset hide"><%- @T('Discard your unsaved changes.') %></div>
|
||||
<% if @macroDisabled: %>
|
||||
<div class="btn btn--primary js-submit"><%- @T('Update') %></div>
|
||||
<% else: %>
|
||||
|
|
|
@ -248,6 +248,11 @@ class AgentTicketActionsLevel3Test < TestCase
|
|||
no_quote: true,
|
||||
)
|
||||
|
||||
task_type(
|
||||
browser: browser2,
|
||||
type: 'stayOnTab',
|
||||
)
|
||||
|
||||
click(
|
||||
browser: browser2,
|
||||
css: '.active .js-submit',
|
||||
|
|
|
@ -583,6 +583,28 @@ class TestCase < Test::Unit::TestCase
|
|||
match(params)
|
||||
end
|
||||
|
||||
=begin
|
||||
|
||||
task_type(
|
||||
:browser => browser1,
|
||||
:type => 'stayOnTab',
|
||||
)
|
||||
|
||||
=end
|
||||
|
||||
def task_type(params)
|
||||
log('task_type', params)
|
||||
|
||||
instance = params[:browser] || @browser
|
||||
|
||||
if params[:type]
|
||||
instance.find_elements( { css: '.content.active .js-secondaryActionButtonLabel' } )[0].click
|
||||
instance.find_elements( { css: ".content.active .js-secondaryActionLabel[data-type=#{params[:type]}]" } )[0].click
|
||||
return
|
||||
end
|
||||
fail "Unknown params for task_type: #{params.inspect}"
|
||||
end
|
||||
|
||||
=begin
|
||||
|
||||
cookie(
|
||||
|
@ -1312,6 +1334,11 @@ wait untill text in selector disabppears
|
|||
end
|
||||
end
|
||||
|
||||
task_type(
|
||||
browser: instance,
|
||||
type: 'stayOnTab',
|
||||
)
|
||||
|
||||
if params[:do_not_submit]
|
||||
assert( true, 'ticket updated without submit' )
|
||||
return true
|
||||
|
|
Loading…
Reference in a new issue