From 8f078715206a154688735ad113689edaa517d898 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Tue, 16 Sep 2014 20:57:55 +0200 Subject: [PATCH] Browser test fixes. --- test/browser/agent_ticket_actions_level5_test.rb | 6 +++--- test/browser/agent_user_manage_test.rb | 4 ++-- test/browser/manage_test.rb | 8 ++++---- test/browser_test_helper.rb | 5 +++-- 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/test/browser/agent_ticket_actions_level5_test.rb b/test/browser/agent_ticket_actions_level5_test.rb index 9ed3f8036..fe451ee90 100644 --- a/test/browser/agent_ticket_actions_level5_test.rb +++ b/test/browser/agent_ticket_actions_level5_test.rb @@ -43,7 +43,7 @@ class AgentTicketActionLevel5Test < TestCase }, { :execute => 'click', - :css => '.modal button.submit', + :css => '.modal button.js-submit', }, { :execute => 'wait', @@ -89,7 +89,7 @@ class AgentTicketActionLevel5Test < TestCase }, { :execute => 'click', - :css => '.modal button.submit', + :css => '.modal button.js-submit', }, { :execute => 'wait', @@ -248,7 +248,7 @@ class AgentTicketActionLevel5Test < TestCase { :where => :instance1, :execute => 'click', - :css => '.modal button.submit', + :css => '.modal button.js-submit', }, { :execute => 'wait', diff --git a/test/browser/agent_user_manage_test.rb b/test/browser/agent_user_manage_test.rb index c07f0cbe5..6bf19c0cf 100644 --- a/test/browser/agent_user_manage_test.rb +++ b/test/browser/agent_user_manage_test.rb @@ -51,7 +51,7 @@ class AgentUserManageTest < TestCase }, { :execute => 'click', - :css => '.modal button.submit', + :css => '.modal button.js-submit', }, { :execute => 'wait', @@ -107,7 +107,7 @@ class AgentUserManageTest < TestCase # accept task close warning { :execute => 'click', - :css => '.modal .submit', + :css => '.modal button.js-submit', }, { :execute => 'wait', diff --git a/test/browser/manage_test.rb b/test/browser/manage_test.rb index c6f119967..56b15b1ff 100644 --- a/test/browser/manage_test.rb +++ b/test/browser/manage_test.rb @@ -47,7 +47,7 @@ class ManageTest < TestCase }, { :execute => 'click', - :css => '.modal button.submit', + :css => '.modal button.js-submit', }, { :execute => 'watch_for', @@ -95,7 +95,7 @@ class ManageTest < TestCase }, { :execute => 'click', - :css => '.modal button.submit', + :css => '.modal button.js-submit', }, { :execute => 'watch_for', @@ -126,7 +126,7 @@ class ManageTest < TestCase }, { :execute => 'click', - :css => '.modal button.submit', + :css => '.modal button.js-submit', }, { :execute => 'watch_for', @@ -147,7 +147,7 @@ class ManageTest < TestCase }, { :execute => 'click', - :css => '.modal .submit', + :css => '.modal button.js-submit', }, { :execute => 'wait', diff --git a/test/browser_test_helper.rb b/test/browser_test_helper.rb index 3a4e8d8cf..5882623e0 100644 --- a/test/browser_test_helper.rb +++ b/test/browser_test_helper.rb @@ -289,7 +289,7 @@ class TestCase < Test::Unit::TestCase element.clear element.send_keys( action[:password] ) instance.find_element( { :css => '.modal input[name="role_ids"][value="3"]' } ).click - instance.find_element( { :css => '.modal button.submit' } ).click + instance.find_element( { :css => '.modal button.js-submit' } ).click (1..14).each {|loop| element = instance.find_element( { :css => 'body' } ) text = element.text @@ -354,7 +354,8 @@ class TestCase < Test::Unit::TestCase hover_element = instance.find_element( { :css => '.navigation .tasks .task:first-child' } ) if hover_element instance.mouse.move_to(hover_element) - click_element = instance.find_element( { :css => '.navigation .tasks .task:first-child [data-type="close"]' } ) + sleep 0.1 + click_element = instance.find_element( { :css => '.navigation .tasks .task:first-child .js-close' } ) if click_element click_element.click sleep 0.2