From 73fdb771785a55e1e5fd40abddae9d3d04e84215 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Fri, 27 Nov 2015 15:47:56 +0100 Subject: [PATCH] Fixed browser test. --- .../agent_ticket_actions_level0_test.rb | 4 ++ test/browser_test_helper.rb | 39 +++++++++++-------- 2 files changed, 26 insertions(+), 17 deletions(-) diff --git a/test/browser/agent_ticket_actions_level0_test.rb b/test/browser/agent_ticket_actions_level0_test.rb index 93df96aa1..4ab44e1b8 100644 --- a/test/browser/agent_ticket_actions_level0_test.rb +++ b/test/browser/agent_ticket_actions_level0_test.rb @@ -45,6 +45,7 @@ class AgentTicketActionLevel0Test < TestCase ) sendkey( value: :arrow_down, + slow: true, ) click( css: '.active .shortcut > ul> li > a' ) @@ -130,6 +131,7 @@ class AgentTicketActionLevel0Test < TestCase sendkey( browser: browser2, value: :arrow_down, + slow: true, ) click( browser: browser2, @@ -167,6 +169,7 @@ class AgentTicketActionLevel0Test < TestCase sendkey( browser: browser2, value: :arrow_down, + slow: true, ) click( browser: browser2, @@ -210,6 +213,7 @@ class AgentTicketActionLevel0Test < TestCase sendkey( browser: browser2, value: :arrow_down, + slow: true, ) click( diff --git a/test/browser_test_helper.rb b/test/browser_test_helper.rb index b82e88715..d785e1005 100644 --- a/test/browser_test_helper.rb +++ b/test/browser_test_helper.rb @@ -361,13 +361,13 @@ class TestCase < Test::Unit::TestCase =begin set( - :browser => browser1, - :css => '.some_class', - :value => true, - :slow => false, - :blur => true, - :clear => true, # todo | default: true - :contenteditable => true + browser: browser1, + css: '.some_class', + value: true, + slow: false, + blur: true, + clear: true, # todo | default: true + contenteditable: true ) =end @@ -417,9 +417,9 @@ class TestCase < Test::Unit::TestCase =begin select( - :browser => browser1, - :css => '.some_class', - :value => 'Some Value', + browser: browser1, + css: '.some_class', + value: 'Some Value', ) =end @@ -446,8 +446,8 @@ class TestCase < Test::Unit::TestCase =begin check( - :browser => browser1, - :css => '.some_class', + browser: browser1, + css: '.some_class', ) =end @@ -465,8 +465,8 @@ class TestCase < Test::Unit::TestCase =begin uncheck( - :browser => browser1, - :css => '.some_class', + browser: browser1, + css: '.some_class', ) =end @@ -484,8 +484,9 @@ class TestCase < Test::Unit::TestCase =begin sendkey( - :browser => browser1, - :value => :enter, + browser: browser1, + value: :enter, + slow: false, ) =end @@ -501,7 +502,11 @@ class TestCase < Test::Unit::TestCase return end instance.action.send_keys(params[:value]).perform - sleep 0.5 + if params[:slow] + sleep 1 + else + sleep 0.6 + end end =begin