
    >>> from Products.Five.testbrowser import Browser
    >>> browser = Browser()
    >>> portal_url = self.portal.absolute_url()
    >>> self.portal.error_log._ignored_exceptions = ()

    >>> from Products.PloneTestCase.setup import portal_owner, default_password

    >>> browser.open(portal_url)
    >>> browser.getControl(name='__ac_name').value = portal_owner
    >>> browser.getControl(name='__ac_password').value = default_password
    >>> browser.getControl(name='submit').click()

Adding a new Section content item
--------------------------------

We use the 'Add new' menu to add a new content item.

    >>> browser.getLink('Add new').click()

Then we select the type of item we want to add. In this case we select
'Section' and click the 'Add' button to get to the add form.

    >>> browser.getControl('Section').click()
    >>> browser.getControl(name='form.button.Add').click()
    >>> 'Section' in browser.contents
    True

Now we fill the form and submit it.

    >>> browser.getControl(name='form.title').value = 'Sample Section'
    >>> browser.getControl(name='form.actions.save').click()
    >>> browser.url
    'http://nohost/plone/sample-section/view'
    >>> 'Sample Section' in browser.contents
    True
    
Default view

    >>> browser.open(portal_url + '/sample-section')
    >>> browser.url
    'http://nohost/plone/sample-section'
    >>> 'Sample Section' in browser.contents
    True

Adding a new Banner content item
--------------------------------

We use the 'Add new' menu to add a new content item.

    >>> browser.getLink('Add new').click()

Then we select the type of item we want to add. In this case we select
'Banner' and click the 'Add' button to get to the add form.

    >>> browser.getControl('Banner').click()
    >>> browser.getControl(name='form.button.Add').click()
    >>> 'Banner' in browser.contents
    True

Now we fill the form and submit it.

    >>> browser.getControl(name='form.widgets.title').value = 'Sample Banner'
    >>> browser.getControl(name='form.buttons.save').click()
    >>> browser.url
    'http://nohost/plone/sample-section/sample-banner/view'
    >>> 'Sample Banner' in browser.contents
    True
    
Default view

    >>> browser.open(portal_url + '/sample-section/sample-banner')
    >>> browser.url
    'http://nohost/plone/sample-section/sample-banner'
    >>> 'Sample Banner' in browser.contents
    True

User with Commercial role can add Sections and Banners
    >>> portal.acl_users.userFolderAddUser('commercial', 'secret', ['Commercial'], [])
    >>> browser.open(portal_url + '/logout')
    >>> browser.open(portal_url)
    >>> browser.getControl(name='__ac_name').value = 'commercial'
    >>> browser.getControl(name='__ac_password').value = 'secret'
    >>> browser.getControl(name='submit').click()

Adding a Section
    >>> browser.open(portal_url+'/+/addSection')
    >>> 'Section title.' in browser.contents
    True

Now banners...
    >>> browser.open(portal_url+'/++add++Banner')
    >>> 'Add Banner' in browser.contents
    True
