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/website_forum/static/tests | |
| parent | 0a15094050bfde69a06d6eff798e9a8ddf2b8c21 (diff) | |
initial commit 2
Diffstat (limited to 'addons/website_forum/static/tests')
| -rw-r--r-- | addons/website_forum/static/tests/tours/website_forum_question.js | 64 |
1 files changed, 64 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 00000000..be292067 --- /dev/null +++ b/addons/website_forum/static/tests/tours/website_forum_question.js @@ -0,0 +1,64 @@ +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: '.o_forum_ask_btn', + }, { + 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")', + }, { + content: "This page contain new created question.", + trigger: '#wrap:has(".fa-star")', + run: function() {}, //it's a check that page has been reloaded, + }, { + content: "Close modal once modal animation is done.", + extra_trigger: 'div.modal.modal_shown', + trigger: ".modal-header button.close", + }, + { + trigger: "a:contains(\"Answer\").collapsed", + content: "Click to answer.", + position: "bottom", + }, + { + 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: "Close modal once modal animation is done.", + extra_trigger: 'div.modal.modal_shown', + trigger: ".modal-header button.close", + }, { + content: "Click here to accept this answer.", + extra_trigger: '#wrap:has(".o_wforum_validate_toggler")', + trigger: '.o_wforum_validate_toggler[data-karma="20"]:first', + }, { + content: "Congratulations! You just created and post your first question and answer.", + trigger: '#wrap:has(".o_wforum_answer_correct")', + }]); +}); |
