Browse Source
Merge pull request #302 from Tecnativa/10.0-website_mass_mailing_name-faster_tour
Merge pull request #302 from Tecnativa/10.0-website_mass_mailing_name-faster_tour
[IMP] website_mass_mailing_name: Make tour fasterpull/312/head
Pedro M. Baeza
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 51 additions and 72 deletions
-
4website_mass_mailing_name/__manifest__.py
-
4website_mass_mailing_name/demo/assets.xml
-
45website_mass_mailing_name/static/src/js/editor_and_public_tour.js
-
50website_mass_mailing_name/static/src/js/editor_tour.js
-
20website_mass_mailing_name/tests/test_ui.py
@ -1,19 +1,60 @@ |
|||
/* Copyright 2016-2017 Jairo Llopis <jairo.llopis@tecnativa.com> |
|||
* License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). */
|
|||
odoo.define("website_mass_mailing_name.public_tour", function (require) { |
|||
odoo.define("website_mass_mailing_name.editor_and_public_tour", function (require) { |
|||
"use strict"; |
|||
var base = require("web_editor.base"); |
|||
var tour = require("web_tour.tour"); |
|||
|
|||
tour.register( |
|||
"mass_mailing_name_public", |
|||
"mass_mailing_name_editor_and_public", |
|||
{ |
|||
test: true, |
|||
wait_for: base.ready(), |
|||
}, |
|||
[ |
|||
// Admin edits home page and adds subscription snippet
|
|||
{ |
|||
content: "Edit the homepage", |
|||
trigger: ".o_menu_systray a[data-action=edit]", |
|||
}, |
|||
{ |
|||
content: "Drag and drop a text snippet", |
|||
trigger: ".oe_snippet[name='Text Block'] .oe_snippet_thumbnail", |
|||
run: "drag_and_drop #wrap", |
|||
}, |
|||
{ |
|||
content: "Drag and drop a newsletter snippet", |
|||
trigger: ".oe_snippet[name='Newsletter'] .oe_snippet_thumbnail", |
|||
run: "drag_and_drop #wrap .s_text_block", |
|||
}, |
|||
{ |
|||
content: "Let the default mailing list", |
|||
trigger: ".modal-dialog button:contains('Continue')", |
|||
}, |
|||
{ |
|||
content: "Save changes", |
|||
extra_trigger: "body:not(:has(.modal:visible))", |
|||
trigger: "#web_editor-top-edit button[data-action=save]", |
|||
}, |
|||
{ |
|||
content: "Subscribe Administrator", |
|||
extra_trigger: "body:not(:has(#web_editor-top-edit))", |
|||
trigger: ".js_subscribe_btn", |
|||
}, |
|||
// Log out
|
|||
{ |
|||
content: "Open user menu", |
|||
extra_trigger: ".js_subscribe .alert-success", |
|||
trigger: "#top_menu span:contains('Administrator')", |
|||
}, |
|||
{ |
|||
content: "Logout", |
|||
trigger: "#o_logout a", |
|||
}, |
|||
// Now use the widget as a random public user
|
|||
{ |
|||
content: "Try to subscribe without data", |
|||
extra_trigger: "a:contains('Sign in')", |
|||
trigger: ".js_subscribe_btn", |
|||
}, |
|||
{ |
@ -1,50 +0,0 @@ |
|||
/* Copyright 2016-2017 Jairo Llopis <jairo.llopis@tecnativa.com> |
|||
* License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). */
|
|||
odoo.define("website_mass_mailing_name.editor_tour", function (require) { |
|||
"use strict"; |
|||
var base = require("web_editor.base"); |
|||
var tour = require("web_tour.tour"); |
|||
|
|||
tour.register( |
|||
"mass_mailing_name_editor", |
|||
{ |
|||
test: true, |
|||
wait_for: base.ready(), |
|||
}, |
|||
[ |
|||
{ |
|||
content: "Edit the homepage", |
|||
trigger: ".o_menu_systray a[data-action=edit]", |
|||
}, |
|||
{ |
|||
content: "Drag and drop a text snippet", |
|||
trigger: ".oe_snippet[name='Text Block'] .oe_snippet_thumbnail", |
|||
run: "drag_and_drop #wrap", |
|||
}, |
|||
{ |
|||
content: "Drag and drop a newsletter snippet", |
|||
trigger: ".oe_snippet[name='Newsletter'] .oe_snippet_thumbnail", |
|||
run: "drag_and_drop #wrap .s_text_block", |
|||
}, |
|||
{ |
|||
content: "Let the default mailing list", |
|||
trigger: ".modal-dialog button:contains('Continue')", |
|||
}, |
|||
{ |
|||
content: "Save changes", |
|||
extra_trigger: "body:not(:has(.modal:visible))", |
|||
trigger: "#web_editor-top-edit button[data-action=save]", |
|||
}, |
|||
{ |
|||
content: "Subscribe Administrator", |
|||
extra_trigger: "body:not(:has(#web_editor-top-edit))", |
|||
trigger: ".js_subscribe_btn", |
|||
}, |
|||
{ |
|||
content: "Open user menu", |
|||
extra_trigger: ".js_subscribe .alert-success", |
|||
trigger: "#top_menu span:contains('Administrator')", |
|||
}, |
|||
] |
|||
); |
|||
}); |
Write
Preview
Loading…
Cancel
Save
Reference in new issue