diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2022-05-10 21:51:50 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2022-05-10 21:51:50 +0700 |
| commit | 3751379f1e9a4c215fb6eb898b4ccc67659b9ace (patch) | |
| tree | a44932296ef4a9b71d5f010906253d8c53727726 /addons/survey/static/tests/tours/survey_tour_session_start.js | |
| parent | 0a15094050bfde69a06d6eff798e9a8ddf2b8c21 (diff) | |
initial commit 2
Diffstat (limited to 'addons/survey/static/tests/tours/survey_tour_session_start.js')
| -rw-r--r-- | addons/survey/static/tests/tours/survey_tour_session_start.js | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/addons/survey/static/tests/tours/survey_tour_session_start.js b/addons/survey/static/tests/tours/survey_tour_session_start.js new file mode 100644 index 00000000..309ce0af --- /dev/null +++ b/addons/survey/static/tests/tours/survey_tour_session_start.js @@ -0,0 +1,32 @@ +odoo.define('survey.test_survey_session_start_tour', function (require) { +"use strict"; + +var tour = require('web_tour.tour'); +var surveySessionTools = require('survey.session_tour_tools'); + +/** + * Small tour that will open the session manager and check + * that the attendees are accounted for, then start the session + * by going to the first question. + */ +tour.register('test_survey_session_start_tour', { + url: "/web", + test: true, +}, [].concat(surveySessionTools.accessSurveySteps, [{ + trigger: 'button[name="action_open_session_manager"]', +}, { + trigger: '.o_survey_session_attendees_count:contains("3")', + run: function () {} // check attendees count +}, { + trigger: 'h1', + run: function () { + var e = $.Event('keydown'); + e.keyCode = 39; // arrow-right + $(document).trigger(e); // start session + } +}, { + trigger: 'h1:contains("Nickname")', + run: function () {} // check first question is displayed +}])); + +}); |
