Test the citation type

Create a testbrowser
    >>> aBrowser = self.makeAdminBrowser()

Create a citation

First, we create some information to cite.
    >>> cTitle = 'Title'
    >>> cDescrip = 'Description'
    >>> cPubLocation = 'Publication Location'
    >>> cAuthor = 'Author'
    >>> cYear = '1952'
    >>> cFullUrl = 'http://www.test.com'
    >>> cSource = 'Source'
    >>> cVolume = 'IV'
    >>> cIssue = '4'
    >>> cPages = '4-5'
    >>> cAbstract = 'http://www.test.com/abstract'

    >>> aBrowser.open(self.folder.absolute_url())
    >>> newCiteLink = aBrowser.getLink(text='Citation')
    >>> newCiteLink #Make sure we got the link
    <Link ...>
    >>> newCiteLink.click()
    >>> 'citation' in aBrowser.url and 'edit' in aBrowser.url
    True
    >>> form = aBrowser.getForm(name='edit_form')
    >>> form.getControl('Title').value = cTitle
    >>> form.getControl('Description').value = cDescrip
    >>> form.getControl('Publication Location').value = cPubLocation
    >>> form.getControl('Author').value = cAuthor
    >>> form.getControl('Year').value = cYear
    >>> form.getControl('Full Text URL').value = cFullUrl
    >>> form.getControl('Source/Journal').value = cSource
    >>> form.getControl('Volume').value = cVolume
    >>> form.getControl('Issue').value = cIssue
    >>> form.getControl('Pages').value = cPages
    >>> form.getControl('Abstract URL').value = cAbstract
    >>> form.submit()

Make sure the citaiton was created
    >>> cite = self.folder.getFirstChild()
    >>> cite
    <Citation at ...>

The default layout is article, we'll check that first
All possible fields are currently filled in
    >>> start = aBrowser.contents.find('collective-types-citation-article-layout') - 13
    >>> end = aBrowser.contents.find('collective-types-citation-abstract') + 113
    >>> aSnippet = aBrowser.contents[start:end]
    >>> print aSnippet
    <span class="collective-types-citation-article-layout">
    <BLANKLINE>
    <span class="collective-types-citation-author">
     Author.
    </span>
    <BLANKLINE>
    <span class="collective-types-citation-year">
     (1952).
    </span>
    <BLANKLINE>
    <BLANKLINE>
    <BLANKLINE>
    <span class="collective-types-citation-title">
      <a href="http://www.test.com">Title</a>.
    </span>
    <BLANKLINE>
    <span>
     <span class="collective-types-citation-source">Source</span>,
     <span class="collective-types-citation-volume">IV</span>
    </span>
    <BLANKLINE>
    <BLANKLINE>
    <BLANKLINE>
    <span>
     (<span class="collective-types-citation-issue">4</span>):
     <span class="collective-types-citation-pages">4-5</span>.
    </span>
    <BLANKLINE>
    <BLANKLINE>
    <BLANKLINE>
    <BLANKLINE>
    <BLANKLINE>
    <span class="collective-types-citation-abstract">
     <a href="http://www.test.com/abstract">[View Abstract]</a>
    </span>
    <BLANKLINE>
    </span>

Let's change the view to book, and confirm that it shows properly
    >>> aBrowser.getLink("Book").click()

Make sure the layout changed
    >>> 'collective-types-citation-book-layout' in aBrowser.contents
    True
    >>> start = aBrowser.contents.find('collective-types-citation-book-layout') - 13
    >>> end = aBrowser.contents.find('collective-types-citation-abstract') + 113
    >>> bSnippet = aBrowser.contents[start:end]
    >>> print bSnippet
    <span class="collective-types-citation-book-layout">
    <BLANKLINE>
    <BLANKLINE>
    <BLANKLINE>
    <span class="collective-types-citation-title">
     <a href="http://www.test.com">Title</a>.
    </span>
    <BLANKLINE>
    <span class="collective-types-citation-author">
     Author.
    </span>
    <BLANKLINE>
    <span class="collective-types-citation-location">
     Publication Location:
    </span>
    <BLANKLINE>
    <span class="collective-types-citation-source">
     <span>Source</span>,
    </span>
    <BLANKLINE>
    <span class="collective-types-citation-year">
     <span>1952</span>.
    </span>
    <BLANKLINE>
    <span class="collective-types-citation-abstract">
     <a href="http://www.test.com/abstract">[View Abstract]</a>
    </span>
    <BLANKLINE>
    </span>

Change the view to other, and confirm that it shows properly
    >>> aBrowser.getLink("Other").click()

Make sure the layout changed
    >>> 'collective-types-citation-other-layout' in aBrowser.contents
    True
    >>> start = aBrowser.contents.find('collective-types-citation-other-layout') - 13
    >>> end = aBrowser.contents.find('collective-types-citation-abstract') + 113
    >>> oSnippet = aBrowser.contents[start:end]
    >>> print oSnippet
    <span class="collective-types-citation-other-layout">
    <BLANKLINE>
    <span class="collective-types-citation-author">
     Author.
    </span>
    <BLANKLINE>
    <BLANKLINE>
    <BLANKLINE>
    <span class="collective-types-citation-title">
     <a href="http://www.test.com">Title</a>.
    </span>
    <BLANKLINE>
    <span class="collective-types-citation-location">
     Publication Location:
    </span>
    <BLANKLINE>
    <span class="collective-types-citation-source">
     Source,
    </span>
    <BLANKLINE>
    <span class="collective-types-citation-year">
     (1952).
    </span>
    <BLANKLINE>
    <span class="collective-types-citation-abstract">
     <a href="http://www.test.com/abstract">[View Abstract]</a>
    </span>
    <BLANKLINE>
    </span>

Change the view to report, and confirm that it shows properly
    >>> aBrowser.getLink("Report").click()

Make sure the layout changed
    >>> 'collective-types-citation-report-layout' in aBrowser.contents
    True
    >>> start = aBrowser.contents.find('collective-types-citation-report-layout') - 13
    >>> end = aBrowser.contents.find('collective-types-citation-abstract') + 113
    >>> rSnippet = aBrowser.contents[start:end]
    >>> print rSnippet
    <span class="collective-types-citation-report-layout">
    <BLANKLINE>
    <span class="collective-types-citation-author">
     Author.
    </span>
    <BLANKLINE>
    <BLANKLINE>
    <BLANKLINE>
    <span class="collective-types-citation-title">
     <a href="http://www.test.com">Title</a>.
    </span>
    <BLANKLINE>
    <span class="collective-types-citation-location">
     Publication Location:
    </span>
    <BLANKLINE>
    <span class="collective-types-citation-source">
     Source,
    </span>
    <BLANKLINE>
    <span class="collective-types-citation-year">
     (1952).
    </span>
    <BLANKLINE>
    <span class="collective-types-citation-abstract">
     <a href="http://www.test.com/abstract">[View Abstract]</a>
    </span>
    <BLANKLINE>
    </span>
