[IMP] Automated tour tests
[odoo/odoo.git] / addons / website_blog / tests / test_website_blog.yml
1 -
2     In order to test the document_page in OpenERP, I create a new page to category blog_category_1
3 -
4     !record {model: blog.post, id: test_page0}:
5       name: Test Page0
6       category_id: blog_category_1
7       content: 'Test content
8
9       The Open ERP wiki allows you to manage your enterprise contents using wiki
10
11       restructured texts. This module provides a collaborative way to manage internal
12
13       FAQs, quality manuals, technical references, etc.'
14
15 # -
16 #     I check the category index contains my page.
17 # -
18     # !python {model: blog.post}: |
19     #   res = self.read(cr, uid, [ref('blog_category_1')], ['display_content'])
20     #   assert res[0]['display_content'].find('Test Page') > 1
21 -
22     !record {model: blog.post, id: test_page0}:
23       content: 'Test updated content
24
25       The Open ERP wiki allows you to manage your enterprise contents using wiki
26
27       restructured texts. This module provides a collaborative way to manage internal
28
29       FAQs, quality manuals, technical references, etc.
30
31       Wiki text can easily be edited
32       '
33 -
34     I check the page history for the current page by clicking on "Page History".After that find difference between history.
35 -
36     !python {model: blog.post.history.show_diff}: |
37       hist_obj = model.pool.get('blog.post.history')
38       ids = hist_obj.search(cr, uid, [('post_id', '=', ref("test_page0"))])
39       model.get_diff(cr, uid, {'active_ids': ids[:] })
40 # -
41 #     I click the "create menu" link and i fill the form.
42 # -
43     # !record {model: document.page.create.menu, id: test_create_menu0}:
44     #   menu_name: Wiki Test menu
45     #   menu_parent_id: base.menu_base_partner
46 # -
47 #     I create a Menu by clicking on "create menu"
48 # -
49     # !python {model: document.page.create.menu}: |
50     #   ids = [ref("test_create_menu0")]
51     #   context['active_id'] = ref('test_page0')
52     #   self.document_page_menu_create(cr, uid, ids, context)
53
54