diff --git a/test/browser/agent_ticket_create_cc_tokenizer_test.rb b/test/browser/agent_ticket_create_cc_tokenizer_test.rb index 9d2800c2f..6522b9e37 100644 --- a/test/browser/agent_ticket_create_cc_tokenizer_test.rb +++ b/test/browser/agent_ticket_create_cc_tokenizer_test.rb @@ -5,7 +5,7 @@ require 'browser_test_helper' # # Ensure that CC field when creating a new ticket is autocompleting user emails -class AgentTicketCreateResetCustomerSelectionTest < TestCase +class AgentTicketCreateCcTokenizerTest < TestCase def test_tokenizer @browser = browser_instance @@ -20,13 +20,24 @@ class AgentTicketCreateResetCustomerSelectionTest < TestCase css: 'a[href="#ticket/create"]' ) - @browser.find_element(:css, 'li[data-type=email-out]').click + email_out_css = '.content.active li[data-type=email-out]' + + watch_for( + css: email_out_css + ) + + click(css: email_out_css) + + watch_for( + css: '.content.active input[name=cc]', + displayed: true + ) elem = @browser.find_element(:name, 'cc') elem.send_keys 'test@example.com' elem.send_keys :enter - exists( + watch_for( css: '.token-label', value: 'test@example.com' )