CKEditor control panel
======================

First just try to get some property from ckeditor_properties sheet:

    >>> self.loginAsManager()
    >>> ptool = self.ptool
    >>> ckeditor_props = ptool.ckeditor_properties
    >>> ckeditor_props.allow_link_byuid
    True
    >>> ckeditor_props.allow_file_upload
    True

Viewing the ckeditor control panel
----------------------------------

    >>> self.browser.open('http://nohost/plone/@@ckeditor-controlpanel')
    >>> self.browser.url
    'http://nohost/plone/@@ckeditor-controlpanel'

Click the cancel button:

    >>> self.browser.getControl(name="form.actions.cancel").click()
    >>> self.browser.url.endswith('plone_control_panel')
    True

There should be still no changes:

    >>> 'Changes canceled.' in self.browser.contents
    True

Make some changes
-----------------

    >>> self.browser.open('http://nohost/plone/@@ckeditor-controlpanel')
    >>> self.browser.url.endswith('ckeditor-controlpanel')
    True

    >>> self.browser.getControl('Allow file upload').selected = False
    >>> self.browser.getControl(name='form.width').value = '80%'


Click the save button:

    >>> self.browser.getControl("Save").click()
    >>> self.browser.url.endswith('ckeditor-controlpanel')
    True

We should be informed that something has changed:

    >>> 'Changes saved.' in self.browser.contents
    True

Make sure the changes have been applied correctly to the ckeditor properties sheet:

    >>> ckeditor_props.allow_file_upload
    False

    >>> ckeditor_props.width
    u'80%'

Test the fieldsets
------------------

    >>> 'fieldset-cke_base' in self.browser.contents
    True

    >>> 'fieldset-cke_skin' in self.browser.contents
    True

    >>> 'fieldset-cke_browser' in self.browser.contents
    True

    >>> 'fieldset-cke_advanced' in self.browser.contents
    True

