trabajo-afectivo/test/browser/agent_ticket_create_cc_tokenizer_test.rb

46 lines
910 B
Ruby
Raw Normal View History

2018-05-08 07:18:23 +00:00
require 'browser_test_helper'
# Regression test for UI bugfix
# https://github.com/zammad/zammad/issues/1990
#
# Ensure that CC field when creating a new ticket is autocompleting user emails
class AgentTicketCreateCcTokenizerTest < TestCase
2018-05-08 07:18:23 +00:00
def test_tokenizer
@browser = browser_instance
login(
username: 'agent1@example.com',
password: 'test',
url: browser_url,
)
tasks_close_all()
click(
css: 'a[href="#ticket/create"]'
)
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
)
2018-05-08 07:18:23 +00:00
elem = @browser.find_element(:name, 'cc')
elem.send_keys 'test@example.com'
elem.send_keys :enter
watch_for(
2018-05-08 07:18:23 +00:00
css: '.token-label',
value: 'test@example.com'
)
end
end