-
    In order to test the document_page in OpenERP, I create a new page to category demo_category1
-
    !record {model: document.page, id: test_page0}:
      name: Test Page0
      parent_id: demo_category1
      content: 'Test content

      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 check the category index contains my page.
-
    !python {model: document.page}: |
      res = self.read(cr, uid, [ref('demo_category1')], ['display_content'])
      assert res[0]['display_content'].find('Test Page') > 1
-
    !record {model: document.page, id: test_page0}:
      content: 'Test updated content

      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.

      Wiki text can easily be edited
      '
-
    I check the page history for the current page by clicking on "Page History".After that find difference between history.
-
    !python {model: wizard.document.page.history.show_diff}: |
      hist_obj = model.pool.get('document.page.history')
      ids = hist_obj.search(cr, uid, [('page_id', '=', ref("test_page0"))])
      model.get_diff(cr, uid, {'active_ids': ids[:] })
-
    I click the "create menu" link and i fill the form.
-
    !record {model: document.page.create.menu, id: test_create_menu0}:
      menu_name: Wiki Test menu
      menu_parent_id: base.menu_base_partner
-
    I create a Menu by clicking on "create menu"
-
    !python {model: document.page.create.menu}: |
      ids = [ref("test_create_menu0")]
      context['active_id'] = ref('test_page0')
      self.document_page_menu_create(cr, uid, ids, context)


