diff options
| author | Romain Derie <rde@odoo.com> | 2019-06-03 14:26:05 +0000 |
|---|---|---|
| committer | Jeremy Kersten <jke@odoo.com> | 2019-06-05 05:56:33 +0000 |
| commit | fdbf11643fd04059bfbc2210427c428979fed73d (patch) | |
| tree | 56801140d47920d0582068323dd874c2ead687d5 /addons/website_forum/static/tests | |
| parent | d7cd97a9be63ae0a8643400b56d6f9a03285fba6 (diff) | |
[IMP] *: move test and tour files to new folder hierarchy and asset
As we now have a new debug mode 'tests' which load a new asset bundle
containing tour-test files, we moved those files to a new folder hierarchy.
That will clean the .js files trees.
Also, those files should be included in the new asset.
Basically, the .js tour files (not test) should be inside /static/src/js/tours
while .js tour test files (test=true) should be inside /static/tests/tours next
to QUnit tests, inside a tours folder.
+ test_new_api: don't run the test in debug assets
task-1934445
Comes with https://github.com/odoo/enterprise/pull/4281
Closes #33213
Diffstat (limited to 'addons/website_forum/static/tests')
| -rw-r--r-- | addons/website_forum/static/tests/tours/website_forum_question.js | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/addons/website_forum/static/tests/tours/website_forum_question.js b/addons/website_forum/static/tests/tours/website_forum_question.js new file mode 100644 index 00000000000..93f22a05e1f --- /dev/null +++ b/addons/website_forum/static/tests/tours/website_forum_question.js @@ -0,0 +1,53 @@ +odoo.define('website_forum.tour_forum_question', function (require) { + 'use strict'; + + var tour = require("web_tour.tour"); + + tour.register('forum_question', { + test: true, + url: '/forum/help-1', + }, [{ + content: "Ask the question in this forum by clicking on the button.", + trigger: '.btn-lg.btn-block', + }, { + content: "Give your question content.", + trigger: 'input[name=post_name]', + run: 'text First Question Title', + }, { + content: "Put your question here.", + extra_trigger: "#wrap:not(:has(input[name=post_name]:propValue('')))", + trigger: '.note-editable p', + run: 'text First Question', + }, { + content: "Insert tags related to your question.", + extra_trigger: '.note-editable:not(:has(br))', + trigger: '.select2-choices', + run: 'text Tag', + }, { + content: "Click to post your question.", + extra_trigger: "#wrap:not(:has(input[id=s2id_autogen2]:propValue('')))", + trigger: 'button:contains("Post Your Question")', + }, { + content: "This page contain new created question.", + extra_trigger: '#wrap:has(".fa-star")', + trigger: 'button[data-dismiss="modal"]', + }, { + content: "Put your answer here.", + trigger: '.note-editable p', + run: 'text First Answer', + }, { + content: "Click to post your answer.", + extra_trigger: '.note-editable:not(:has(br))', + trigger: 'button:contains("Post Answer")', + }, { + content: "This page contain new created question and its answer.", + extra_trigger: '#wrap:has(".fa-check-circle")', + trigger: 'button[data-dismiss="modal"]', + }, { + content: "Click here to accept this answer.", + trigger: 'a[data-karma="20"]:first', + }, { + content: "Congratulations! You just created and post your first question and answer.", + trigger: '#wrap:has(".oe_answer_true")', + }]); +}); |
