diff --git a/test/browser/agent_ticket_actions_level0_test.rb b/test/browser/agent_ticket_actions_level0_test.rb index 4c8110737..be964b650 100644 --- a/test/browser/agent_ticket_actions_level0_test.rb +++ b/test/browser/agent_ticket_actions_level0_test.rb @@ -84,16 +84,14 @@ class AgentTicketActionLevel0Test < TestCase ticket_create( :browser => browser2, :data => { - :customer => '', - :title => 'A', + :title => 'A', }, :do_not_submit => true, ) ticket_create( :browser => browser2, :data => { - :customer => '', - :title => 'B', + :title => 'B', }, :do_not_submit => true, ) @@ -143,7 +141,7 @@ class AgentTicketActionLevel0Test < TestCase watch_for( :browser => browser2, :css => '.active div[data-name=body]', - :value => 'some content' + random, + :value => 'some content ' + random, ) sleep 2 @@ -193,9 +191,10 @@ class AgentTicketActionLevel0Test < TestCase ticket_create( :browser => browser2, :data => { - :group => 'Users', - :subject => 'some subject 123äöü', - :body => 'some body 123äöü', + :customer => 'nico', + :group => 'Users', + :title => 'some subject 123äöü', + :body => 'some body 123äöü', }, ) @@ -266,7 +265,7 @@ class AgentTicketActionLevel0Test < TestCase :css => '.modal', ) - watch_for( + set( :browser => browser2, :css => '.active div[data-name=body]', :value => '::' + random, diff --git a/test/browser_test_helper.rb b/test/browser_test_helper.rb index c25b607f7..361116c98 100644 --- a/test/browser_test_helper.rb +++ b/test/browser_test_helper.rb @@ -536,7 +536,7 @@ class TestCase < Test::Unit::TestCase instance = params[:browser] || @browser timeout = 16 - if action[:timeout] + if params[:timeout] timeout = params[:timeout] end loops = (timeout).to_i @@ -550,7 +550,7 @@ class TestCase < Test::Unit::TestCase end sleep 1 } - raise "#{test[:css]}) still exsists" + raise "#{params[:css]}) still exsists" end =begin @@ -850,9 +850,13 @@ class TestCase < Test::Unit::TestCase instance.find_elements( { :css => '.content.active button.js-submit' } )[0].click (1..10).each {|loop| - text = instance.find_elements( { :css => '.content.active .js-reset' } )[0].text - if !text || text.empty? - return true + begin + text = instance.find_elements( { :css => '.content.active .js-reset' } )[0].text + if !text || text.empty? + return true + end + rescue + # just try again end sleep 1 }