Removed broken avatar background until @mrflix has time to fix it.
This commit is contained in:
parent
ec43a02588
commit
afc1d6571d
2 changed files with 56 additions and 7 deletions
|
@ -26,12 +26,12 @@ class AgentOrganizationProfileTest < TestCase
|
||||||
{
|
{
|
||||||
:where => :instance1,
|
:where => :instance1,
|
||||||
:execute => 'search_organization',
|
:execute => 'search_organization',
|
||||||
:term => 'Zammad',
|
:term => 'Zammad Foundation',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
:where => :instance2,
|
:where => :instance2,
|
||||||
:execute => 'search_organization',
|
:execute => 'search_organization',
|
||||||
:term => 'Zammad',
|
:term => 'Zammad Foundation',
|
||||||
},
|
},
|
||||||
|
|
||||||
# update note
|
# update note
|
||||||
|
@ -79,7 +79,7 @@ class AgentOrganizationProfileTest < TestCase
|
||||||
# search and open org
|
# search and open org
|
||||||
{
|
{
|
||||||
:execute => 'search_organization',
|
:execute => 'search_organization',
|
||||||
:term => 'Zammad',
|
:term => 'Zammad Foundation',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
:execute => 'match',
|
:execute => 'match',
|
||||||
|
@ -170,7 +170,7 @@ class AgentOrganizationProfileTest < TestCase
|
||||||
# switch to org tab, verify if ticket is shown
|
# switch to org tab, verify if ticket is shown
|
||||||
{
|
{
|
||||||
:execute => 'search_organization',
|
:execute => 'search_organization',
|
||||||
:term => 'Zammad',
|
:term => 'Zammad Foundation',
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
|
@ -525,6 +525,55 @@ class TestCase < Test::Unit::TestCase
|
||||||
}
|
}
|
||||||
assert( false, "(#{test[:name]}) ticket creation failed, can't get zoom url" )
|
assert( false, "(#{test[:name]}) ticket creation failed, can't get zoom url" )
|
||||||
return
|
return
|
||||||
|
elsif action[:execute] == 'search_user'
|
||||||
|
element = instance.find_elements( { :css => '#global-search' } )[0]
|
||||||
|
element.click
|
||||||
|
element.clear
|
||||||
|
if @stack
|
||||||
|
action[:term].gsub! '###stack###', @stack
|
||||||
|
end
|
||||||
|
element.send_keys( action[:term] )
|
||||||
|
sleep 3
|
||||||
|
element = instance.find_element( { :partial_link_text => action[:term] } ).click
|
||||||
|
name = instance.find_elements( { :css => '.active h1' } )[0].text
|
||||||
|
if name !~ /#{action[:term]}/
|
||||||
|
assert( false, "(#{test[:name]}) unable to search/find user #{action[:term]}!" )
|
||||||
|
return
|
||||||
|
end
|
||||||
|
assert( true, "(#{test[:name]}) user #{action[:term]} found" )
|
||||||
|
return
|
||||||
|
elsif action[:execute] == 'search_organization'
|
||||||
|
element = instance.find_elements( { :css => '#global-search' } )[0]
|
||||||
|
element.click
|
||||||
|
element.clear
|
||||||
|
if @stack
|
||||||
|
action[:term].gsub! '###stack###', @stack
|
||||||
|
end
|
||||||
|
element.send_keys( action[:term] )
|
||||||
|
sleep 3
|
||||||
|
instance.find_elements( { :css => '.search .empty-search' } )[0].click
|
||||||
|
sleep 0.5
|
||||||
|
text = instance.find_elements( { :css => '#global-search' } )[0].attribute('value')
|
||||||
|
if !text
|
||||||
|
assert( false, "(#{test[:name]}) #global-search is not empty!" )
|
||||||
|
return
|
||||||
|
end
|
||||||
|
element = instance.find_elements( { :css => '#global-search' } )[0]
|
||||||
|
element.click
|
||||||
|
element.clear
|
||||||
|
if @stack
|
||||||
|
action[:term].gsub! '###stack###', @stack
|
||||||
|
end
|
||||||
|
element.send_keys( action[:term] )
|
||||||
|
sleep 2
|
||||||
|
element = instance.find_element( { :partial_link_text => action[:term] } ).click
|
||||||
|
name = instance.find_elements( { :css => '.active h1' } )[0].text
|
||||||
|
if name !~ /#{action[:term]}/
|
||||||
|
assert( false, "(#{test[:name]}) unable to search/find org #{action[:term]}!" )
|
||||||
|
return
|
||||||
|
end
|
||||||
|
assert( true, "(#{test[:name]}) org #{action[:term]} found" )
|
||||||
|
return
|
||||||
elsif action[:execute] == 'search_ticket'
|
elsif action[:execute] == 'search_ticket'
|
||||||
element = instance.find_elements( { :css => '#global-search' } )[0]
|
element = instance.find_elements( { :css => '#global-search' } )[0]
|
||||||
element.click
|
element.click
|
||||||
|
@ -544,7 +593,7 @@ class TestCase < Test::Unit::TestCase
|
||||||
element.clear
|
element.clear
|
||||||
action[:number].gsub! '###stack###', @stack
|
action[:number].gsub! '###stack###', @stack
|
||||||
element.send_keys( action[:number] )
|
element.send_keys( action[:number] )
|
||||||
sleep 3
|
sleep 2
|
||||||
element = instance.find_element( { :partial_link_text => action[:number] } ).click
|
element = instance.find_element( { :partial_link_text => action[:number] } ).click
|
||||||
number = instance.find_elements( { :css => '.active .page-header .ticket-number' } )[0].text
|
number = instance.find_elements( { :css => '.active .page-header .ticket-number' } )[0].text
|
||||||
if number !~ /#{action[:number]}/
|
if number !~ /#{action[:number]}/
|
||||||
|
@ -684,14 +733,14 @@ class TestCase < Test::Unit::TestCase
|
||||||
match = false
|
match = false
|
||||||
if action[:no_quote]
|
if action[:no_quote]
|
||||||
#puts "aaaa #{text}/#{action[:value]}"
|
#puts "aaaa #{text}/#{action[:value]}"
|
||||||
if text =~ /#{action[:value]}/
|
if text =~ /#{action[:value]}/i
|
||||||
if $1
|
if $1
|
||||||
@stack = $1
|
@stack = $1
|
||||||
end
|
end
|
||||||
match = $1 || true
|
match = $1 || true
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
if text =~ /#{Regexp.quote(action[:value])}/
|
if text =~ /#{Regexp.quote(action[:value])}/i
|
||||||
match = true
|
match = true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue