auto_wizard_browser_test.rb 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. require 'browser_test_helper'
  2. class AutoWizardBrowserTest < TestCase
  3. def test_auto_wizard
  4. @browser = browser_instance
  5. location(url: browser_url)
  6. watch_for(
  7. css: 'body',
  8. value: 'auto wizard is enabled',
  9. timeout: 10,
  10. )
  11. location(url: "#{browser_url}/#getting_started/auto_wizard")
  12. watch_for(
  13. css: 'body',
  14. value: 'auto wizard is enabled',
  15. timeout: 10,
  16. )
  17. location(url: "#{browser_url}/#getting_started/auto_wizard/secret_token")
  18. watch_for(
  19. css: '.user-menu .user a',
  20. attribute: 'title',
  21. value: 'hans.atila@zammad.org',
  22. timeout: 20,
  23. )
  24. clues_close
  25. organization_open_by_search(
  26. value: 'Demo Organization',
  27. )
  28. watch_for(
  29. css: '.active .profile-window',
  30. value: 'Demo Organization',
  31. )
  32. watch_for(
  33. css: '.active .profile-window',
  34. value: 'Atila',
  35. )
  36. logout
  37. login(
  38. username: 'hans.atila@zammad.org',
  39. password: 'Z4mm4dr0ckZ!',
  40. )
  41. watch_for(
  42. css: '.user-menu .user a',
  43. attribute: 'title',
  44. value: 'hans.atila@zammad.org',
  45. timeout: 8,
  46. )
  47. end
  48. end