This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

The gocept.jasmine distribution

Jasmine integration for selenium.

Usage

You need two things to run jasmine tests with selenium:

  • A test app which requires your resources and jasmine test files:

    class MyTestApp(gocept.jasmine.jasmine.TestApp):
    
        def need_resources(self):
            # Require your resources here
            my.package.resource.need()
            my.package.tests.jasmine_tests.need()
    
        @property
        def body(self):
            # HTML setup for your tests goes here
            return '<div id="my_container"></div>'
    
  • A TestCase with the jasmine layer:

    class MyJasmineTestCase(gocept.jasmine.jasmine.TestCase):
    
        layer = gocept.jasmine.jasmine.get_layer(MyTestApp())
    
        def test_integration(self):
            self.run_jasmine()
    

The important things here are, that the get_layer function is given your jasmine app and that the returned Layer is used on your TestCase.

In your Test, simple run run_jasmine, which will open the TestApp in your Browser. The TestApp renders your body and includes all needed resources and then runs the jasmine tests. run_jasmine will wait for these tests to finish and the report success or failure. Jasmine tracebacks and error details are visible through the selenium error handling.

Debugging

You can set the debug flag on your test case to get a pdb debugger right after the start of the jasmine tests. This lets you debug your jasmine tests within your browser:

class MyJasmineTestCase(gocept.jasmine.jasmine.TestCase):

    layer = gocept.jasmine.jasmine.get_layer(MyTestApp())
    debug = True

    def test_integration(self):
        self.run_jasmine()

Change log for gocept.jasmine

0.5.1 (2014-06-10)

  • The last two releases (0.4 and 0.5) were brown bag releases, so we need to make a new one.

0.5 (2014-06-10)

  • Add JS library to mock ajax calls during jasmine tests.

0.4 (2014-06-06)

  • Make it possible to run multiple TestApps.

0.3 (2013-08-27)

  • Fixed a problem where the testrunner finished sucessfully before all jasmine tests finished in browser.

0.2 (2013-08-17)

  • Added helper function to ease test layer setup.
  • Made it easier to debug jasmine tests in the browser.

0.1 (2013-08-16)

initial release

Release History

Release History

0.5.1

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.5

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.4

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.3

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
gocept.jasmine-0.5.1.zip (43.7 kB) Copy SHA256 Checksum SHA256 Source Jun 10, 2014

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting