Skip to content

Commit

Permalink
[FIX] document_page_portal: reverted some changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Davit Lomauridze committed Aug 12, 2024
1 parent 7db3c2e commit 5465728
Showing 1 changed file with 0 additions and 39 deletions.
39 changes: 0 additions & 39 deletions document_page_portal/tests/test_document_page_portal.py
Original file line number Diff line number Diff line change
@@ -1,48 +1,10 @@
# Copyright 2020 - TODAY, Marcel Savegnago - Escodoo
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl

import odoo.tests


@odoo.tests.tagged("post_install", "-at_install")
class TestPortalDocumentPage(odoo.tests.HttpCase):
def setUp(self):
super(TestPortalDocumentPage, self).setUp()
# self.portal_user = self.env.ref("base.user_demo")
self.document_page = self.env["document.page"].create(
{
"name": "Test Document",
"type": "content",
}
)
self.db = self.env.cr.dbname
self.login = "admin"
self.password = "admin"
self.user_agent_env = {}

def _login_portal_user(self):
self.env["res.users"].with_user(self.portal_user).sudo()._login(
self.db, self.login, self.password, self.user_agent_env
)

def test_prepare_portal_layout_values(self):
self._login_portal_user()
response = self.url_open("/my/knowledge/documents/")
self.assertEqual(response.status_code, 200)
self.assertIn("document_page_count", response.content.decode())

def test_portal_my_knowledge_document_pages(self):
self._login_portal_user()
response = self.url_open("/my/knowledge/documents/")
self.assertEqual(response.status_code, 200)
self.assertIn("document_pages", response.content.decode())

def test_document_pages_followup(self):
self._login_portal_user()
response = self.url_open(f"/knowledge/document/{self.document_page.id}")
self.assertEqual(response.status_code, 200)
self.assertIn("document_page", response.content.decode())

def test_01_document_page_portal_tour(self):
# Create a public document
self.env["document.page"].create(
Expand All @@ -52,7 +14,6 @@ def test_01_document_page_portal_tour(self):
"is_public": True,
}
)

self.browser_js(
"/",
"odoo.__DEBUG__.services['web_tour.tour']"
Expand Down

0 comments on commit 5465728

Please sign in to comment.