[Checkins]
SVN: zwiki/branches/baijum-experimental-zwiki/ Few tests,
padding for 'Search Wiki' link in css, typo fixes.
Baiju M
baiju.m.mail at gmail.com
Fri Dec 15 05:40:15 EST 2006
Log message for revision 71557:
Few tests, padding for 'Search Wiki' link in css, typo fixes.
Changed:
U zwiki/branches/baijum-experimental-zwiki/README.txt
U zwiki/branches/baijum-experimental-zwiki/TODO.txt
U zwiki/branches/baijum-experimental-zwiki/browser/ftests.py
U zwiki/branches/baijum-experimental-zwiki/browser/skin/wiki.css
A zwiki/branches/baijum-experimental-zwiki/browser/zwiki.txt
A zwiki/branches/baijum-experimental-zwiki/tests/diff.txt
A zwiki/branches/baijum-experimental-zwiki/tests/test_doctest.py
-=-
Modified: zwiki/branches/baijum-experimental-zwiki/README.txt
===================================================================
--- zwiki/branches/baijum-experimental-zwiki/README.txt 2006-12-15 10:22:33 UTC (rev 71556)
+++ zwiki/branches/baijum-experimental-zwiki/README.txt 2006-12-15 10:40:14 UTC (rev 71557)
@@ -46,5 +46,5 @@
- Somewhat sophisticated rendering mechanism. New source types and
their render methods can now be configured (added) via ZCML.
- - A fully independent skin called 'wiki'; Note that this skill will
+ - A fully independent skin called 'wiki'; Note that this skin will
be only useful in the context of a Wiki Page.
Modified: zwiki/branches/baijum-experimental-zwiki/TODO.txt
===================================================================
--- zwiki/branches/baijum-experimental-zwiki/TODO.txt 2006-12-15 10:22:33 UTC (rev 71556)
+++ zwiki/branches/baijum-experimental-zwiki/TODO.txt 2006-12-15 10:40:14 UTC (rev 71557)
@@ -3,10 +3,7 @@
Tests
- - Write tests for diff module
- - Write tests for Comment title
-
- Convert unit tests to doc tests
- Add functional tests
@@ -41,4 +38,4 @@
- Allow for multiple parents. The WikiPageHierarchyAdapter.path() method
only returns the path of a wiki and not all the possible paths it has.
- - Make use of indices in search, once they are back in the core again.
\ No newline at end of file
+ - Make use of indices in search, once they are back in the core again.
Modified: zwiki/branches/baijum-experimental-zwiki/browser/ftests.py
===================================================================
--- zwiki/branches/baijum-experimental-zwiki/browser/ftests.py 2006-12-15 10:22:33 UTC (rev 71556)
+++ zwiki/branches/baijum-experimental-zwiki/browser/ftests.py 2006-12-15 10:40:14 UTC (rev 71557)
@@ -17,7 +17,9 @@
"""
from zope.app.testing.functional import FunctionalDocFileSuite
+import unittest
-
def test_suite():
- return FunctionalDocFileSuite("browser.txt")
+ return unittest.TestSuite((
+ FunctionalDocFileSuite("browser.txt"),
+ FunctionalDocFileSuite("zwiki.txt"),))
Modified: zwiki/branches/baijum-experimental-zwiki/browser/skin/wiki.css
===================================================================
--- zwiki/branches/baijum-experimental-zwiki/browser/skin/wiki.css 2006-12-15 10:22:33 UTC (rev 71556)
+++ zwiki/branches/baijum-experimental-zwiki/browser/skin/wiki.css 2006-12-15 10:40:14 UTC (rev 71557)
@@ -43,6 +43,7 @@
#search {
float: right;
+ padding: 0.5em;
}
#personal {
Added: zwiki/branches/baijum-experimental-zwiki/browser/zwiki.txt
===================================================================
--- zwiki/branches/baijum-experimental-zwiki/browser/zwiki.txt 2006-12-15 10:22:33 UTC (rev 71556)
+++ zwiki/branches/baijum-experimental-zwiki/browser/zwiki.txt 2006-12-15 10:40:14 UTC (rev 71557)
@@ -0,0 +1,119 @@
+
+Sqaure Initialization
+---------------------
+
+Initialize the browser and set authorization::
+
+ >>> from zope.testbrowser.testing import Browser
+ >>> browser = Browser()
+ >>> browser.addHeader('Authorization', 'Basic mgr:mgrpw')
+
+Open square adding form and check url::
+
+ >>> browser.open('http://localhost/+/AddWiki.html=')
+ >>> browser.url
+ 'http://localhost/+/AddWiki.html='
+
+Fill the form::
+
+ >>> name = browser.getControl(name="add_input_name")
+ >>> name.value = 'MyWiki'
+
+Let's verify the values::
+
+ >>> name.value
+ 'MyWiki'
+
+Submit the form and test url::
+
+ >>> browser.getControl(name="UPDATE_SUBMIT").click()
+ >>> browser.url
+ 'http://localhost/@@contents.html'
+
+Go to wiki::
+
+ >>> mwlink = browser.getLink("MyWiki")
+ >>> mwlink.click()
+ >>> browser.url
+ 'http://localhost/MyWiki/@@contents.html'
+
+Go to wiki FrontPage with ++wiki++ skin::
+
+ >>> browser.open('http://localhost/++skin++wiki/MyWiki/FrontPage')
+ >>> browser.url
+ 'http://localhost/++skin++wiki/MyWiki/FrontPage'
+ >>> browser.title
+ 'ZWiki for Zope 3'
+
+Edit FrontPage::
+
+ >>> editlink = browser.getLink("Edit")
+ >>> editlink.click()
+ >>> browser.url
+ 'http://localhost/++skin++wiki/MyWiki/FrontPage/@@edit.html'
+ >>> source = browser.getControl(name="field.source")
+ >>> source.value = 'Visit this TestPage'
+ >>> source.value
+ 'Visit this TestPage'
+
+Submit the form, test url and visit TestPage::
+
+ >>> browser.getControl(name="UPDATE_SUBMIT").click()
+ >>> browser.url
+ 'http://localhost/++skin++wiki/MyWiki/FrontPage/@@view.html'
+ >>> browser.title
+ 'ZWiki for Zope 3'
+ >>> testlink = browser.getLink("?")
+ >>> testlink.url
+ 'http://localhost/++skin++wiki/MyWiki/+/AddWikiPage.html=TestPage'
+ >>> testlink.click()
+ >>> browser.url
+ 'http://localhost/++skin++wiki/MyWiki/+/AddWikiPage.html=TestPage'
+
+Edit TestPage::
+
+ >>> source = browser.getControl(name="field.source")
+ >>> source.value = 'Go to FrontPage'
+ >>> source.value
+ 'Go to FrontPage'
+
+Submit the form, test url and visit FrontPage::
+
+ >>> browser.getControl(name="UPDATE_SUBMIT").click()
+ >>> browser.url
+ 'http://localhost/++skin++wiki/MyWiki/TestPage'
+ >>> browser.title
+ 'ZWiki for Zope 3'
+ >>> testlink = browser.getLink("FrontPage")
+ >>> testlink.url
+ 'http://localhost/++skin++wiki/MyWiki/FrontPage'
+ >>> testlink.click()
+ >>> browser.url
+ 'http://localhost/++skin++wiki/MyWiki/FrontPage'
+
+Add comments::
+
+ >>> commentlink = browser.getLink("Comment")
+ >>> commentlink.url
+ 'http://localhost/++skin++wiki/MyWiki/FrontPage/+/AddComment.html='
+ >>> commentlink.click()
+ >>> browser.url
+ 'http://localhost/++skin++wiki/MyWiki/FrontPage/+/AddComment.html='
+ >>> title = browser.getControl(name="field.title")
+ >>> title.value
+ ''
+ >>> title.value = 'Comment 1'
+ >>> title.value
+ 'Comment 1'
+ >>> source = browser.getControl(name="field.source")
+ >>> source.value = 'This is comment 1'
+ >>> source.value
+ 'This is comment 1'
+ >>> browser.getControl(name="UPDATE_SUBMIT").click()
+ >>> browser.url
+ 'http://localhost/++skin++wiki/MyWiki/FrontPage/'
+ >>> 'Comment 1' in browser.contents
+ True
+ >>> 'This is comment 1' in browser.contents
+ True
+
Property changes on: zwiki/branches/baijum-experimental-zwiki/browser/zwiki.txt
___________________________________________________________________
Name: svn:eol-style
+ native
Added: zwiki/branches/baijum-experimental-zwiki/tests/diff.txt
===================================================================
--- zwiki/branches/baijum-experimental-zwiki/tests/diff.txt 2006-12-15 10:22:33 UTC (rev 71556)
+++ zwiki/branches/baijum-experimental-zwiki/tests/diff.txt 2006-12-15 10:40:14 UTC (rev 71557)
@@ -0,0 +1,34 @@
+Import the diff module::
+
+ >>> from zwiki import diff
+
+Test for changed::
+
+ >>> print diff.textdiff('', 'a')
+ <BLANKLINE>
+ ??changed:
+ -
+ +a
+ <BLANKLINE>
+ >>> print diff.textdiff('a', 'b')
+ <BLANKLINE>
+ ??changed:
+ -a
+ +b
+ <BLANKLINE>
+
+Test for added::
+
+ >>> print diff.textdiff('a', 'a\nb')
+ <BLANKLINE>
+ ++added:
+ b
+ <BLANKLINE>
+
+Test for removed::
+
+ >>> print diff.textdiff('a\nb', 'a')
+ <BLANKLINE>
+ --removed:
+ -b
+ <BLANKLINE>
Property changes on: zwiki/branches/baijum-experimental-zwiki/tests/diff.txt
___________________________________________________________________
Name: svn:eol-style
+ native
Added: zwiki/branches/baijum-experimental-zwiki/tests/test_doctest.py
===================================================================
--- zwiki/branches/baijum-experimental-zwiki/tests/test_doctest.py 2006-12-15 10:22:33 UTC (rev 71556)
+++ zwiki/branches/baijum-experimental-zwiki/tests/test_doctest.py 2006-12-15 10:40:14 UTC (rev 71557)
@@ -0,0 +1,9 @@
+import unittest
+import doctest
+
+def test_suite():
+ return unittest.TestSuite((
+ doctest.DocFileSuite('diff.txt')))
+
+if __name__ == "__main__":
+ unittest.main(defaultTest='test_suite')
Property changes on: zwiki/branches/baijum-experimental-zwiki/tests/test_doctest.py
___________________________________________________________________
Name: svn:eol-style
+ native
More information about the Checkins
mailing list