From 32ea56c9d90f5a387e7fcf60fbd2d011ee7f5801 Mon Sep 17 00:00:00 2001 From: Thorsten Eckel Date: Thu, 16 Jul 2015 17:15:47 +0200 Subject: [PATCH 1/2] Added workaround to avoid 2 sec issue with discard changes. --- test/browser/agent_ticket_actions_level3_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/browser/agent_ticket_actions_level3_test.rb b/test/browser/agent_ticket_actions_level3_test.rb index 619ccd6fa..2e0ae75ad 100644 --- a/test/browser/agent_ticket_actions_level3_test.rb +++ b/test/browser/agent_ticket_actions_level3_test.rb @@ -206,7 +206,7 @@ class AgentTicketActionsLevel3Test < TestCase css: '.content.active .js-reset', browser: browser2, ) - sleep 2 + sleep 5 ticket_verify( browser: browser2, data: { From 7274fbdd4f7995f19692d728cbfb18ef78b2c902 Mon Sep 17 00:00:00 2001 From: Thorsten Eckel Date: Thu, 16 Jul 2015 17:19:46 +0200 Subject: [PATCH 2/2] Applied rubocop. --- test/browser_test_helper.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/browser_test_helper.rb b/test/browser_test_helper.rb index a4d89f6aa..02bff8d11 100644 --- a/test/browser_test_helper.rb +++ b/test/browser_test_helper.rb @@ -20,7 +20,7 @@ class TestCase < Test::Unit::TestCase elsif browser == 'chrome' browser_profile = Selenium::WebDriver::Chrome::Profile.new - browser_profile["intl.accept_languages"] = "en" + browser_profile['intl.accept_languages'] = 'en' end browser_profile end @@ -1242,7 +1242,7 @@ wait untill text in selector disabppears found = nil (1..10).each { - next if found + break if found begin text = instance.find_elements( { css: '.content.active .js-reset' } )[0].text @@ -1256,6 +1256,7 @@ wait untill text in selector disabppears } if !found screenshot( browser: instance, comment: 'ticket_update_discard_message_failed' ) + fail 'no discard message found' end end