admin_overview_test.rb 765 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. # encoding: utf-8
  2. require 'browser_test_helper'
  3. class AdminOverviewTest < TestCase
  4. def test_account_add
  5. name = "some overview #{rand(99_999_999)}"
  6. @browser = browser_instance
  7. login(
  8. username: 'master@example.com',
  9. password: 'test',
  10. url: browser_url,
  11. )
  12. tasks_close_all()
  13. # add new overview
  14. overview_create(
  15. data: {
  16. name: name,
  17. role: 'Agent',
  18. selector: {
  19. 'Priority' => '1 low',
  20. },
  21. 'order::direction' => 'down',
  22. }
  23. )
  24. # edit overview
  25. overview_update(
  26. data: {
  27. name: name,
  28. role: 'Agent',
  29. selector: {
  30. 'State' => 'new',
  31. },
  32. 'order::direction' => 'up',
  33. }
  34. )
  35. end
  36. end