[IMP] document_page: Use Odoo HTML Diff comparison method

This commit is contained in:
Enric Tobella
2025-12-15 09:59:54 +01:00
parent 90a8ed45f6
commit 864c0a000c
13 changed files with 143 additions and 98 deletions

View File

@@ -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)])