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/static/tests/tours/website_style_edition.js | |
| parent | 0a15094050bfde69a06d6eff798e9a8ddf2b8c21 (diff) | |
initial commit 2
Diffstat (limited to 'addons/website/static/tests/tours/website_style_edition.js')
| -rw-r--r-- | addons/website/static/tests/tours/website_style_edition.js | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/addons/website/static/tests/tours/website_style_edition.js b/addons/website/static/tests/tours/website_style_edition.js new file mode 100644 index 00000000..1f4033eb --- /dev/null +++ b/addons/website/static/tests/tours/website_style_edition.js @@ -0,0 +1,34 @@ +odoo.define("website.tour.website_style_edition", function (require) { +"use strict"; + +const tour = require("web_tour.tour"); + +const TARGET_FONT_SIZE = 30; + +tour.register("website_style_edition", { + test: true, + url: "/", +}, [{ + content: "Enter edit mode", + trigger: 'a[data-action=edit]', +}, { + content: "Go to theme options", + trigger: '.o_we_customize_theme_btn', +}, { + content: "Change font size", + trigger: '[data-variable="font-size-base"] input', + run: `text_blur ${TARGET_FONT_SIZE}`, +}, { + content: "Save", + trigger: '[data-action="save"]', +}, { + content: "Check the font size was properly adapted", + trigger: 'body:not(.editor_enable) #wrapwrap', + run: function (actions) { + const style = window.getComputedStyle(this.$anchor[0]); + if (style.fontSize !== `${TARGET_FONT_SIZE}px`) { + console.error(`Expected the font-size to be equal to ${TARGET_FONT_SIZE}px but found ${style.fontSize} instead`); + } + }, +}]); +}); |
