auto_wizard_browser_test.rb 1.3 KB

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