customer_ticket_create_fields_test.rb 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. require 'browser_test_helper'
  2. class CustomerTicketCreateFieldsTest < TestCase
  3. def test_customer_ticket_create_fields
  4. @browser = browser_instance
  5. # create agent session and fetch object attributes
  6. login(
  7. username: 'master@example.com',
  8. password: 'test',
  9. url: browser_url,
  10. )
  11. # remove local object attributes bound to the session
  12. logout()
  13. # re-create agent session and fetch object attributes
  14. login(
  15. username: 'master@example.com',
  16. password: 'test',
  17. url: browser_url,
  18. )
  19. # re-remove local object attributes bound to the session
  20. # there was an issue (#1856) where the old attribute values
  21. # persisted and were stored as the original attributes
  22. logout()
  23. # create customer session and fetch object attributes
  24. login(
  25. username: 'nicole.braun@zammad.org',
  26. password: 'test',
  27. url: browser_url,
  28. )
  29. # customer ticket create
  30. click(css: 'a[href="#new"]', only_if_exists: true)
  31. click(css: 'a[href="#customer_ticket_new"]')
  32. sleep 2
  33. # ensure that the object attributes of the agent session
  34. # were removed properly and won't get displayed in the form
  35. exists_not(
  36. css: '.newTicket input[name="customer_id"]',
  37. )
  38. end
  39. end