File: test_share_dashboard_tour.py

package info (click to toggle)
odoo 18.0.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 878,716 kB
  • sloc: javascript: 927,937; python: 685,670; xml: 388,524; sh: 1,033; sql: 415; makefile: 26
file content (20 lines) | stat: -rw-r--r-- 807 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# Part of Odoo. See LICENSE file for full copyright and licensing details.

from .common import DashboardTestCommon

from odoo.tests import tagged
from odoo.tests.common import HttpCase

@tagged("post_install", "-at_install")
class TestDashboardShareTour(DashboardTestCommon, HttpCase):
    def test_open_public_dashboard(self):
        """check the public spreadsheet page can be opened without error"""
        dashboard = self.create_dashboard()
        share = self.share_dashboard(dashboard)
        # web_tour is not part of the public dashboard assets bundle.
        # We can't use the start_tour helper method.
        self.browser_js(
            "/dashboard/share/%s/%s" % (share.id, share.access_token),
            "console.log('test successful');",
            ready="odoo.isReady",
        )