mirror of
https://github.com/OCA/knowledge.git
synced 2025-12-20 20:32:19 -06:00
[IMP] document_page: Use Odoo HTML Diff comparison method
This commit is contained in:
@@ -8,7 +8,12 @@ class TestDocumentPageShowDiff(common.TransactionCase):
|
||||
|
||||
def test_show_demo_page1_diff(self):
|
||||
"""Show test page history difference."""
|
||||
page = self.env.ref("document_page.demo_page1")
|
||||
page = self.env["document.page"].create(
|
||||
{
|
||||
"name": "Test Page",
|
||||
"content": "<div>Initial content</div>",
|
||||
}
|
||||
)
|
||||
|
||||
show_diff_object = self.env["wizard.document.page.history.show_diff"]
|
||||
|
||||
@@ -21,8 +26,8 @@ class TestDocumentPageShowDiff(common.TransactionCase):
|
||||
)._get_diff()
|
||||
)
|
||||
|
||||
page.write({"content": "Text content updated"})
|
||||
page.write({"content": "Text updated"})
|
||||
page.write({"content": "<div>Text content updated</div>"})
|
||||
page.write({"content": "<div>Text updated</div>"})
|
||||
|
||||
history_pages = history_document.search([("page_id", "=", page.id)])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user