registering_assets.feature 1.0 KB

1234567891011121314151617181920212223242526272829303132333435
  1. Feature: Registering Assets
  2. Registering CSS and JS files
  3. Background:
  4. Given a configuration of:
  5. """
  6. ActiveAdmin.register Post
  7. """
  8. And I am logged in
  9. Scenario: Viewing default asset files
  10. When I am on the index page for posts
  11. Then I should see the css file "admin/active_admin.css"
  12. Then I should see the js file "active_admin_vendor.js"
  13. Then I should see the js file "active_admin.js"
  14. Scenario: Registering a CSS file
  15. Given a configuration of:
  16. """
  17. ActiveAdmin.application.register_stylesheet "some-random-css.css", :media => :print
  18. ActiveAdmin.register Post
  19. """
  20. When I am on the index page for posts
  21. Then I should see the css file "some-random-css.css" of media "print"
  22. Scenario: Registering a JS file
  23. Given a configuration of:
  24. """
  25. ActiveAdmin.application.register_javascript "some-random-js.js"
  26. ActiveAdmin.register Post
  27. """
  28. When I am on the index page for posts
  29. Then I should see the js file "some-random-js.js"