Files
odoo_source/addons/survey/views/assets.xml
T
Aurélien Warnon 6405ffd483 [IMP] survey: add python tests/tours to test the survey sessions
PURPOSE

This commit adds a big flow test/tours to the survey sessions, for the host
point of view.
This will avoid breaking the feature with future changes, as it contains some
tricky and complex mechanics (especially the screens chaining).

SPECS

The tour tests the whole host point of view.

Break down of the testing/tour main points:
- Create the survey session
- Check our attendees are accounted for
- Open the 'session manager'
- Display the nickname question, and move to the next one (as answers are not
  displayed for nickname questions)
- Check answers are correctly displayed for the 3 'simple' question types
  (text, date, datetime)
- Move to the choice question and check that answers are displayed
- If everything is correctly displayed, move to the next question
- On the scored choice question, check that the screens are correctly chained:
  no results displayed -> results displayed -> correct/incorrect answers ->
  leaderboard
- On the scored + timed multiple choice question, check the same than previous
  question, except that the results are supposed to be displayed automatically
  when the question timer runs out
- Test the 'back' behavior and check that screens are reversed correctly
- Check that our final leaderboard is correct based on attendees answers
- Close the survey session

LINKS

PR #46768
Task 2208574
2020-03-31 15:16:02 +00:00

70 lines
4.1 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<!-- survey assets -->
<template id="survey_assets" name="Survey Results assets">
<script src="/web/static/lib/Chart/Chart.js"></script>
<script type="text/javascript" src="/web/static/src/js/fields/field_utils.js"></script>
<script type="text/javascript" src="/survey/static/src/js/survey_quick_access.js" />
<script type="text/javascript" src="/survey/static/src/js/survey_timer.js" />
<script type="text/javascript" src="/survey/static/src/js/survey_breadcrumb.js" />
<script type="text/javascript" src="/survey/static/src/js/survey_form.js" />
<script type="text/javascript" src="/survey/static/src/js/survey_print.js" />
<script type="text/javascript" src="/survey/static/src/js/survey_result.js" />
<t t-call="web._assets_helpers">
<t t-call="web._assets_frontend_helpers"/>
</t>
<link href="/survey/static/src/css/survey_print.css" rel="stylesheet" type="text/css"/>
<link href="/survey/static/src/css/survey_result.css" rel="stylesheet" type="text/css"></link>
<link rel="stylesheet" type="text/scss" href="/survey/static/src/scss/survey_form.scss"/>
</template>
<!-- survey user input session assets -->
<template id="survey_user_input_session_assets" name="Survey User Input Session Assets">
<script type="text/javascript" src="/survey/static/src/js/libs/chartjs-plugin-datalabels.min.js" />
<script type="text/javascript" src="/survey/static/src/js/survey_session_colors.js" />
<script type="text/javascript" src="/survey/static/src/js/survey_session_chart.js" />
<script type="text/javascript" src="/survey/static/src/js/survey_session_text_answers.js" />
<script type="text/javascript" src="/survey/static/src/js/survey_session_leaderboard.js" />
<script type="text/javascript" src="/survey/static/src/js/survey_session_manage.js" />
</template>
<template id="survey_report_assets_pdf" inherit_id="web.report_assets_pdf">
<xpath expr="link[last()]" position="after">
<link rel="stylesheet" type="text/scss" href="/survey/static/src/scss/survey_reports.scss"/>
</xpath>
</template>
<template id="assets_backend" name="survey assets" inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<link rel="stylesheet" href="/survey/static/src/css/survey_result.css"/>
<script type="text/javascript" src="/survey/static/src/js/fields_section_one2many.js"/>
<script type="text/javascript" src="/survey/static/src/js/fields_form_page_description.js"/>
</xpath>
</template>
<template id="assets_backend_inherit_survey" inherit_id="web.assets_backend" name="Survey backend assets">
<xpath expr="link[last()]" position="after">
<link rel="stylesheet" type="text/scss" href="/survey/static/src/scss/survey_views.scss"/>
</xpath>
</template>
<template id="assets_tests" name="Survey Assets Tests" inherit_id="web.assets_tests">
<xpath expr="." position="inside">
<script type="text/javascript" src="/survey/static/tests/tours/certification_failure.js"></script>
<script type="text/javascript" src="/survey/static/tests/tours/certification_success.js"></script>
<script type="text/javascript" src="/survey/static/tests/tours/survey.js"></script>
<script type="text/javascript" src="/survey/static/tests/tours/survey_prefill.js"></script>
<script type="text/javascript" src="/survey/static/tests/tours/survey_tour_session_tools.js"></script>
<script type="text/javascript" src="/survey/static/tests/tours/survey_tour_session_create.js"></script>
<script type="text/javascript" src="/survey/static/tests/tours/survey_tour_session_start.js"></script>
<script type="text/javascript" src="/survey/static/tests/tours/survey_tour_session_manage.js"></script>
<script type="text/javascript" src="/survey/static/tests/tours/survey_session_manage_test.js"></script>
</xpath>
</template>
</data>
</odoo>