maintenance_app_version_test.rb 653 B

123456789101112131415161718192021222324252627282930313233343536
  1. require 'browser_test_helper'
  2. class MaintenanceAppVersionTest < TestCase
  3. def test_app_version
  4. @browser = browser_instance
  5. login(
  6. username: 'master@example.com',
  7. password: 'test',
  8. url: browser_url,
  9. )
  10. sleep 8
  11. execute(
  12. js: 'App.Event.trigger("maintenance", {type:"app_version", app_version:"1234:false"} )',
  13. )
  14. sleep 8
  15. match_not(
  16. css: 'body',
  17. value: 'new version',
  18. )
  19. execute(
  20. js: 'App.Event.trigger("maintenance", {type:"app_version", app_version:"1235:true"}) ',
  21. )
  22. sleep 5
  23. match(
  24. css: 'body',
  25. value: 'new version',
  26. )
  27. end
  28. end