auto_wizard_browser_test.rb 1.1 KB

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