diff --git a/addons/survey/static/tests/tours/survey_tour_session_create.js b/addons/survey/static/tests/tours/survey_tour_session_create.js deleted file mode 100644 index f6546ace474..00000000000 --- a/addons/survey/static/tests/tours/survey_tour_session_create.js +++ /dev/null @@ -1,24 +0,0 @@ -/** @odoo-module **/ - -import { registry } from "@web/core/registry"; -import { accessSurveysteps } from "./survey_tour_session_tools"; - -/** - * Small tour that will simply start the session and wait for attendees. - */ -registry.category("web_tour.tours").add("test_survey_session_create_tour", { - url: "/web", - test: true, - steps: () => { - return [ - ...accessSurveysteps, - { - trigger: 'button[name="action_start_session"]', - }, - { - trigger: '.o_survey_session_attendees_count:contains("0")', - run: function () {}, // check session is correctly started - }, - ]; - }, -}); diff --git a/addons/survey/tests/test_survey_ui_session.py b/addons/survey/tests/test_survey_ui_session.py index 2046e8efe6d..787b61aab06 100644 --- a/addons/survey/tests/test_survey_ui_session.py +++ b/addons/survey/tests/test_survey_ui_session.py @@ -139,9 +139,6 @@ class TestUiSession(HttpCase): (4, timed_scored_choice_answer_3.id)], }) - # ======================= - # PART 1 : CREATE SESSION - # ======================= def action_open_session_manager_mock(self): """ Mock original method to ensure we are not using another tab as it creates issues with automated tours. """ @@ -152,9 +149,11 @@ class TestUiSession(HttpCase): 'url': '/survey/session/manage/%s' % self.access_token } - with patch('odoo.addons.survey.models.survey_survey.Survey.action_open_session_manager', action_open_session_manager_mock): - self.start_tour('/web', 'test_survey_session_create_tour', login='admin') + # ======================= + # PART 1 : CREATE SESSION + # ======================= + survey_session.action_start_session() # tricky part: we only take into account answers created after the session_start_time # the create_date of the answers we just saved is set to the beginning of the test. # but the session_start_time is set after that.