Code layout improvements.
This commit is contained in:
parent
4d837d7bd4
commit
984bb9c4f5
5 changed files with 46 additions and 38 deletions
|
@ -37,20 +37,14 @@ class AgentTicketActionLevel0Test < TestCase
|
|||
tasks_close_all()
|
||||
|
||||
# invite agent (with one group)
|
||||
click(
|
||||
css: '#navigation a[href="#dashboard"]',
|
||||
)
|
||||
click(
|
||||
css: '.active.content .tab[data-area="first-steps-widgets"]',
|
||||
)
|
||||
click(css: '#navigation a[href="#dashboard"]')
|
||||
click(css: '.active.content .tab[data-area="first-steps-widgets"]')
|
||||
watch_for(
|
||||
css: '.active.content',
|
||||
value: 'Configuration',
|
||||
)
|
||||
click(
|
||||
css: '.active.content .js-inviteAgent',
|
||||
)
|
||||
sleep 4
|
||||
click(css: '.active.content .js-inviteAgent')
|
||||
modal_ready()
|
||||
set(
|
||||
css: '.modal [name="firstname"]',
|
||||
value: 'Bob',
|
||||
|
@ -94,12 +88,9 @@ class AgentTicketActionLevel0Test < TestCase
|
|||
|
||||
# customer ticket create
|
||||
click(css: 'a[href="#new"]')
|
||||
click(css: 'a[href="#customer_ticket_new"]')
|
||||
sleep 2
|
||||
click(css: 'a[href="#customer_ticket_new"]', wait: 2)
|
||||
|
||||
exists_not(
|
||||
css: '.newTicket select[name="group_id"]',
|
||||
)
|
||||
exists_not(css: '.newTicket select[name="group_id"]')
|
||||
|
||||
set(
|
||||
css: '.newTicket input[name="title"]',
|
||||
|
@ -109,8 +100,7 @@ class AgentTicketActionLevel0Test < TestCase
|
|||
css: '.newTicket [data-name="body"]',
|
||||
value: 'one group body',
|
||||
)
|
||||
click(css: '.newTicket button.js-submit')
|
||||
sleep 5
|
||||
click(css: '.newTicket button.js-submit', wait: 5)
|
||||
|
||||
# check if ticket is shown
|
||||
location_check(url: '#ticket/zoom/')
|
||||
|
|
|
@ -25,7 +25,7 @@ class AdminChannelEmailTest < TestCase
|
|||
|
||||
click(css: '#content .js-channelNew')
|
||||
|
||||
sleep 2
|
||||
modal_ready()
|
||||
|
||||
set(
|
||||
css: '.modal input[name="realname"]',
|
||||
|
@ -65,7 +65,7 @@ class AdminChannelEmailTest < TestCase
|
|||
# re-create
|
||||
click(css: '#content .js-channelNew')
|
||||
|
||||
sleep 2
|
||||
modal_ready()
|
||||
|
||||
set(
|
||||
css: '.modal input[name="realname"]',
|
||||
|
@ -99,7 +99,8 @@ class AdminChannelEmailTest < TestCase
|
|||
|
||||
# set invalid folder
|
||||
click(css: '#content .js-editInbound')
|
||||
sleep 2
|
||||
|
||||
modal_ready()
|
||||
|
||||
set(
|
||||
css: '.modal input[name="options::folder"]',
|
||||
|
|
|
@ -13,7 +13,7 @@ class TaskbarTaskTest < TestCase
|
|||
|
||||
# persistant task
|
||||
click(css: 'a[href="#new"]')
|
||||
click( css: 'a[href="#ticket/create"]' )
|
||||
click(css: 'a[href="#ticket/create"]', wait: 0.8)
|
||||
set(
|
||||
css: '.active .newTicket input[name="title"]',
|
||||
value: 'some test AAA',
|
||||
|
@ -31,7 +31,7 @@ class TaskbarTaskTest < TestCase
|
|||
sleep 3
|
||||
|
||||
# check if task still exists
|
||||
click( css: '.task' )
|
||||
click(css: '.task', wait: 0.8)
|
||||
|
||||
match(
|
||||
css: '.active .newTicket input[name="title"]',
|
||||
|
@ -64,7 +64,7 @@ class TaskbarTaskTest < TestCase
|
|||
)
|
||||
|
||||
click(css: 'a[href="#new"]')
|
||||
click( css: 'a[href="#ticket/create"]' )
|
||||
click(css: 'a[href="#ticket/create"]', wait: 0.8)
|
||||
set(
|
||||
css: '.active .newTicket input[name="title"]',
|
||||
value: 'OUTBOUND TEST#1',
|
||||
|
|
|
@ -264,7 +264,7 @@ class TestCase < Test::Unit::TestCase
|
|||
return if !clues
|
||||
instance.execute_script("$('.js-modal--clue .js-close').click()")
|
||||
assert(true, 'clues closed')
|
||||
sleep 4
|
||||
sleep 2
|
||||
end
|
||||
|
||||
=begin
|
||||
|
@ -416,6 +416,23 @@ class TestCase < Test::Unit::TestCase
|
|||
sleep 0.3
|
||||
end
|
||||
|
||||
=begin
|
||||
|
||||
modal_ready(
|
||||
browser: browser1,
|
||||
)
|
||||
|
||||
=end
|
||||
|
||||
def modal_ready(params)
|
||||
switch_window_focus(params)
|
||||
log('modal_ready', params)
|
||||
|
||||
instance = params[:browser] || @browser
|
||||
|
||||
sleep 2
|
||||
end
|
||||
|
||||
=begin
|
||||
|
||||
execute(
|
||||
|
@ -544,7 +561,7 @@ class TestCase < Test::Unit::TestCase
|
|||
element = instance.find_elements(css: "#{params[:css]}.js-shadow + .js-input")[0]
|
||||
element.click
|
||||
element.clear
|
||||
sleep 0.5
|
||||
sleep 0.4
|
||||
element.send_keys(params[:value])
|
||||
sleep 0.2
|
||||
element.send_keys(:enter)
|
||||
|
@ -562,7 +579,7 @@ class TestCase < Test::Unit::TestCase
|
|||
dropdown.select_by(:text, params[:value])
|
||||
#puts "select - #{params.inspect}"
|
||||
rescue
|
||||
sleep 0.5
|
||||
sleep 0.4
|
||||
|
||||
# just try again
|
||||
log('select', { rescure: true })
|
||||
|
@ -574,7 +591,7 @@ class TestCase < Test::Unit::TestCase
|
|||
dropdown.select_by(:text, params[:value])
|
||||
#puts "select2 - #{params.inspect}"
|
||||
end
|
||||
sleep 0.5
|
||||
sleep 0.4
|
||||
end
|
||||
|
||||
=begin
|
||||
|
@ -1014,7 +1031,7 @@ class TestCase < Test::Unit::TestCase
|
|||
|
||||
# accept task close warning
|
||||
if params[:discard_changes]
|
||||
sleep 1
|
||||
modal_ready()
|
||||
instance.find_elements(css: '.modal button.js-submit')[0].click
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue