Follow up for issue #2419 - Zammad Icon (Bird) on page top left disappears and does not come back - fixed test.

This commit is contained in:
Martin Edenhofer 2019-01-08 23:14:47 +01:00
parent e43154c373
commit dadb8e207b
3 changed files with 21 additions and 15 deletions

View file

@ -23,17 +23,26 @@ class App.TicketMerge extends App.ControllerModal
@render() @render()
) )
onShown: (e) =>
super
later = =>
if @tableCustomerTickets
@tableCustomerTickets.show()
if @tableRecentViewedTickets
@tableRecentViewedTickets.show()
@delay(later, 300)
content: => content: =>
content = $( App.view('agent_ticket_merge')() ) content = $( App.view('agent_ticket_merge')() )
new App.TicketList( @tableCustomerTickets = new App.TicketList(
tableId: 'ticket-merge-customer-tickets' tableId: 'ticket-merge-customer-tickets'
el: content.find('#ticket-merge-customer-tickets') el: content.find('#ticket-merge-customer-tickets')
ticket_ids: @ticket_ids_by_customer ticket_ids: @ticket_ids_by_customer
radio: true radio: true
) )
new App.TicketList( @tableRecentViewedTickets = new App.TicketList(
tableId: 'ticket-merge-recent-tickets' tableId: 'ticket-merge-recent-tickets'
el: content.find('#ticket-merge-recent-tickets') el: content.find('#ticket-merge-recent-tickets')
ticket_ids: @ticket_ids_recent_viewed ticket_ids: @ticket_ids_recent_viewed

View file

@ -103,6 +103,9 @@ class AgentTicketTagTest < TestCase
browser: browser2, browser: browser2,
number: ticket3[:number], number: ticket3[:number],
) )
empty_search(
browser: browser2,
)
# set tag #1 # set tag #1
click( click(
@ -272,6 +275,9 @@ class AgentTicketTagTest < TestCase
browser: browser2, browser: browser2,
number: ticket3[:number], number: ticket3[:number],
) )
empty_search(
browser: browser2,
)
# verify tags # verify tags
tags_verify( tags_verify(

View file

@ -2719,18 +2719,9 @@ wait untill text in selector disabppears
element.send_keys(params[:number]) element.send_keys(params[:number])
sleep 3 sleep 3
empty_search(browser: instance)
# search by number again
element = instance.find_elements(css: '#global-search')[0]
element.click
element.clear
element.send_keys(params[:number])
sleep 1
# open ticket # open ticket
#instance.find_element(partial_link_text: params[:number] } ).click #instance.find_element(partial_link_text: params[:number] } ).click
instance.execute_script("$(\".js-global-search-result a:contains('#{params[:number]}') .nav-tab-icon\").first().click()") instance.execute_script("$(\".js-global-search-result a:contains('#{params[:number]}') .nav-tab-name\").first().click()")
watch_for( watch_for(
browser: instance, browser: instance,
css: '.content.active .ticketZoom-header .ticket-number' css: '.content.active .ticketZoom-header .ticket-number'
@ -2767,7 +2758,7 @@ wait untill text in selector disabppears
# open ticket # open ticket
#instance.find_element(partial_link_text: params[:title] } ).click #instance.find_element(partial_link_text: params[:title] } ).click
instance.execute_script("$(\".js-global-search-result a:contains('#{params[:title]}') .nav-tab-icon\").click()") instance.execute_script("$(\".js-global-search-result a:contains('#{params[:title]}') .nav-tab-name\").first().click()")
sleep 1 sleep 1
title = instance.find_elements(css: '.content.active .ticketZoom-header .js-objectTitle')[0].text title = instance.find_elements(css: '.content.active .ticketZoom-header .js-objectTitle')[0].text
if !title.match?(/#{params[:title]}/) if !title.match?(/#{params[:title]}/)
@ -2854,7 +2845,7 @@ wait untill text in selector disabppears
element.send_keys(params[:value]) element.send_keys(params[:value])
sleep 2 sleep 2
#instance.find_element(partial_link_text: params[:value] } ).click #instance.find_element(partial_link_text: params[:value] } ).click
instance.execute_script("$(\".js-global-search-result a:contains('#{params[:value]}') .nav-tab-icon\").click()") instance.execute_script("$(\".js-global-search-result a:contains('#{params[:value]}') .nav-tab-name\").first().click()")
watch_for( watch_for(
browser: instance, browser: instance,
css: '.content.active h1' css: '.content.active h1'
@ -2890,7 +2881,7 @@ wait untill text in selector disabppears
sleep 3 sleep 3
#instance.find_element(partial_link_text: params[:value]).click #instance.find_element(partial_link_text: params[:value]).click
instance.execute_script("$(\".js-global-search-result a:contains('#{params[:value]}') .nav-tab-icon\").click()") instance.execute_script("$(\".js-global-search-result a:contains('#{params[:value]}') .nav-tab-name\").first().click()")
watch_for( watch_for(
browser: instance, browser: instance,
css: '.content.active h1' css: '.content.active h1'