Introduction
------------

Setup the test framework::

    >>> from zope.component import getMultiAdapter
    >>> from Products.Five.testbrowser import Browser
    >>> browser = Browser()
    >>> portal_url = 'http://nohost/plone'

We should already be installed::

    >>> import plone.app.jquerytools


Javascript Resource and View
----------------------------

We should have three items in the JS registry::

    >>> jsreg = portal.portal_javascripts
    >>> ids = jsreg.getResourceIds()
    >>> '++resource++plone.app.jquerytools.js' in ids
    True

    >>> '++resource++plone.app.jquerytools.overlayhelpers.js' in ids
    True

    >>> '++resource++plone.app.jquerytools.plugins.js' in ids
    True

Open the main JS code item as a resource::

    >>> browser.open(portal_url+'/++resource++plone.app.jquerytools.js')

And, make sure it's got our code in it::

    >>> print browser.contents
    /*
     * jquery.tools ... - The missing UI library for the Web
    ...

Open the overlay helper code item as a resource::

    >>> browser.open(portal_url+'/++resource++plone.app.jquerytools.overlayhelpers.js')

And, make sure it's got our code in it::

    >>> print browser.contents
    /*****************
    <BLANKLINE>
    jQuery Tools overlay helpers.
    ...

Open the plugins item as a resource::

    >>> browser.open(portal_url+'/++resource++plone.app.jquerytools.plugins.js')

And, make sure it's got our code in it::

    >>> print browser.contents
    /*
     * jquery.tools 1.1.2 - The missing UI library for the Web
    ...

