Files
odoo_source/addons/survey/tests/test_survey_ui.py
T
Sébastien Theys df7326f0be [IMP] tests, *: add start_tour helper
Before this commit, the syntax to start a tour was extremely verbose.
With this new method, it is possible to start a tour by just giving the
essential parameter: the tour name.
The full set of features from browser_js are kept by using **kwargs.

closes odoo/odoo#32316

Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2019-04-04 08:44:59 +00:00

31 lines
1.4 KiB
Python

# Part of Odoo. See LICENSE file for full copyright and licensing details.
import odoo.tests
@odoo.tests.common.tagged('post_install','-at_install')
class TestUi(odoo.tests.HttpCase):
def test_01_admin_survey_tour(self):
access_token = self.env.ref('survey.survey_feedback').access_token
self.start_tour("/survey/start/%s" % access_token, 'test_survey', login="admin")
def test_02_demo_survey_tour(self):
access_token = self.env.ref('survey.survey_feedback').access_token
self.start_tour("/survey/start/%s" % access_token, 'test_survey', login="demo")
def test_03_public_survey_tour(self):
access_token = self.env.ref('survey.survey_feedback').access_token
self.start_tour("/survey/start/%s" % access_token, 'test_survey')
def test_04_certification_success_tour(self):
access_token = self.env.ref('survey.vendor_certification').access_token
self.start_tour("/survey/start/%s" % access_token, 'test_certification_success', login="demo")
def test_05_certification_failure_tour(self):
access_token = self.env.ref('survey.vendor_certification').access_token
self.start_tour("/survey/start/%s" % access_token, 'test_certification_failure', login="demo")
def test_06_survey_prefill(self):
access_token = self.env.ref('survey.survey_feedback').access_token
self.start_tour("/survey/start/%s" % access_token, 'test_survey_prefill')