auto_wizard_browser_test.rb 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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. # wait unless elasticsearch has index all objects from auto wizard
  26. sleep 10
  27. organization_open_by_search(
  28. value: 'Demo Organization',
  29. )
  30. watch_for(
  31. css: '.active .profile-window',
  32. value: 'Demo Organization',
  33. )
  34. watch_for(
  35. css: '.active .profile-window',
  36. value: 'Atila',
  37. )
  38. logout
  39. login(
  40. username: 'hans.atila@zammad.org',
  41. password: 'Z4mm4dr0ckZ!',
  42. )
  43. watch_for(
  44. css: '.user-menu .user a',
  45. attribute: 'title',
  46. value: 'hans.atila@zammad.org',
  47. timeout: 8,
  48. )
  49. end
  50. end