Allow extensions to provide JavaScript unit tests.

Review Request #7992 — Created Feb. 23, 2016 and submitted

Information

Review Board
release-2.0.x

Reviewers

This adds a new /js-tests/extensions/ page that runs through the test
suites for all enabled extensions. It will load the "tests" bundle (if
it exists) from each extension, along with any default or included
bundles.

JSExtensions classes are not initialized on this page. Instead, test
suites should define them with whatever data is necessary to test
against, like any other model. It's up to the extension author to ensure
that any JSExtensions they test can be run within the context of the
test page.

Added some unit tests to an extension through a "tests" bundle and
visited the new page. Saw the tests run.

Description From Last Updated

When you merge this to 2.6.x, make sure to update it for the pipeline changes.

daviddavid
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/urls.py
        reviewboard/staticbundles.py
    
    Ignored Files:
        reviewboard/templates/js/tests_base.html
        reviewboard/templates/js/extension_tests.html
        reviewboard/templates/js/tests.html
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/urls.py
        reviewboard/staticbundles.py
    
    Ignored Files:
        reviewboard/templates/js/tests_base.html
        reviewboard/templates/js/extension_tests.html
        reviewboard/templates/js/tests.html
    
    
  2. 
      
david
  1. 
      
  2. Show all issues

    When you merge this to 2.6.x, make sure to update it for the pipeline changes.

  3. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to release-2.0.x (11c58a9)