Kotti browser tests for a stripped down app
===========================================

These browser tests use a setup that includes only a selection of
Kotti's functionality.

  >>> from kotti import testing
  >>> tools = testing.setUpFunctionalStrippedDownApp()
  >>> browser = tools['Browser']()
  >>> ctrl = browser.getControl

Logging in
----------

  >>> browser.open(testing.BASE_URL)
  >>> "Welcome, you are not logged in" in browser.contents
  True

  >>> browser.open(testing.BASE_URL + '/secured')
  >>> ctrl("Username or email").value = "admin"
  >>> ctrl("Password").value = "secret"
  >>> ctrl(name="submit").click()
  >>> "You are logged in" in browser.contents
  True

User management
---------------

  >>> browser.open(testing.BASE_URL)
  >>> browser.getLink("User Management").click()

  >>> ctrl(name="query").value = "admin"
  >>> ctrl(name="search").click()
  >>> ctrl(name="role::admin::role:editor").value
  False
  >>> ctrl(name="role::admin::role:admin").value
  True


TearDown
--------

  >>> testing.tearDown()
