[ADD]: wiki: Added yml test cases(in progress)
authorksa (Open ERP) <ksa@tinyerp.co.in>
Mon, 19 Apr 2010 05:04:19 +0000 (10:34 +0530)
committerksa (Open ERP) <ksa@tinyerp.co.in>
Mon, 19 Apr 2010 05:04:19 +0000 (10:34 +0530)
bzr revid: ksa@tinyerp.co.in-20100419050419-rotyi3l8v17umfbd

addons/wiki/__init__.py
addons/wiki/__openerp__.py
addons/wiki/test/wiki_test00.yml [new file with mode: 0644]

index f52d0c2..42f93f5 100644 (file)
@@ -1,6 +1,6 @@
 # -*- coding: utf-8 -*-
 ##############################################################################
-#    
+#
 #    OpenERP, Open Source Management Solution
 #    Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
 #
 #    GNU Affero General Public License for more details.
 #
 #    You should have received a copy of the GNU Affero General Public License
-#    along with this program.  If not, see <http://www.gnu.org/licenses/>.     
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 ##############################################################################
 
 import wiki
 import wizard
-
 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
index 16c82e6..a087af3 100644 (file)
@@ -43,7 +43,7 @@
         'data/wiki_main.xml',
         'security/ir.model.access.csv'
     ],
-    'demo_xml': [],
+    'test':['test/wiki_test00.yml'],
     'installable': True,
     'active': False,
     'certificate': '0086363630317',
diff --git a/addons/wiki/test/wiki_test00.yml b/addons/wiki/test/wiki_test00.yml
new file mode 100644 (file)
index 0000000..6b74356
--- /dev/null
@@ -0,0 +1,46 @@
+-
+    In order to test the wiki in OpenERP ,I create new wikipage    
+- 
+    !record {model: wiki.wiki, id: wiki_wiki_openerpwikiediting0}:
+      group_id: wiki.wiki_groups_wikiformatting0
+      name: openerp_wiki_editing
+      parent_id: wiki.wiki_wiki_main
+      section: '1.2'
+      text_area: '=The Open ERP wiki=
+    
+      The Open ERP wiki allows you to manage your enterprise contents using wiki
+    
+      restructured texts. This module provides a collaborative way to manage internal
+    
+      FAQs, quality manuals, technical references, etc.
+    
+      '    
+-
+    I editing on this current page by clicking on "Basic wiki Editing" wizard
+-
+    !python {model: wiki.wiki}: |
+      self.open_wiki_page(cr, uid, [ref("wiki_wiki_openerpwikiediting0")], context)
+-
+    I create Index on this current page by clicking on "Create Index" wizard
+-
+    !python {model: wiki.make.index}: |
+      ids = self.search(cr, uid, []) 
+      self.wiki_do_index(cr, uid, ids, context)
+-
+    I check the page history for the current page by clicking on "Page History".After that find difference between history.
+-
+    !act_window {name: Open Wiki Page, view_type: form, res_model: wiki.wiki.page.open, src_model: wiki.groups, view_mode: form,key2: client_action_multi, id: action_view_wiki_wiki_page_open_vals,target: new}
+-
+    I create a new wiki group on the Given Home Page
+-
+    !record {model: wiki.groups, id: wiki_groups_wikigroupediting0}:
+      name: Wiki Group Editing
+      home: wiki.wiki_wiki_quickstart0
+
+-
+    I open a wiki page on this given group and page by clicking on Open wiki Page wizard.
+-
+    !python {model: wiki.wiki.page.open}: |
+      ids = self.search(cr, uid, []) 
+      self.open_wiki_page(cr, uid, ids, {'active_ids': [ref('wiki_groups_wikigroupediting0')]})
+