customer_ticket_create_test.rb 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. # encoding: utf-8
  2. require 'browser_test_helper'
  3. class CustomerTicketCreateTest < TestCase
  4. def test_customer_ticket_create
  5. @browser = browser_instance
  6. login(
  7. username: 'nicole.braun@zammad.org',
  8. password: 'test',
  9. url: browser_url,
  10. )
  11. # customer ticket create
  12. click(css: 'a[href="#new"]')
  13. click(css: 'a[href="#customer_ticket_new"]')
  14. sleep 2
  15. select(
  16. css: '.newTicket select[name="group_id"]',
  17. value: 'Users',
  18. )
  19. set(
  20. css: '.newTicket input[name="title"]',
  21. value: 'some subject 123äöü',
  22. )
  23. set(
  24. css: '.newTicket [data-name="body"]',
  25. value: 'some body 123äöü',
  26. )
  27. exists_not(
  28. css: '.newTicket input[name="customer_id"]',
  29. )
  30. exists_not(
  31. css: '.newTicket input[name="priority_id"]',
  32. )
  33. click(css: '.newTicket button.js-submit')
  34. sleep 5
  35. # check if ticket is shown
  36. location_check(url: '#ticket/zoom/')
  37. match(
  38. css: '.active div.ticket-article',
  39. value: 'some body 123äöü',
  40. no_quote: true,
  41. )
  42. # update ticket
  43. set(
  44. css: '.content.active [data-name="body"]',
  45. value: 'some body 1234 äöüß',
  46. no_click: true,
  47. )
  48. task_type(
  49. type: 'stayOnTab',
  50. )
  51. click(css: '.content.active .js-submit')
  52. watch_for(
  53. css: '.content.active div.ticket-article',
  54. value: 'some body 1234 äöüß',
  55. )
  56. end
  57. end