summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/tests/field_html_tests.js
diff options
context:
space:
mode:
authorqsm-odoo <qsm@odoo.com>2020-05-28 10:04:46 +0000
committerqsm-odoo <qsm@odoo.com>2020-06-02 09:42:19 +0000
commit7736cde22c3bce06305045a818a2d70892cf25ef (patch)
tree2b42b79b891c9d569517b34eade2957fa174679d /addons/web_editor/static/tests/field_html_tests.js
parentade27dd08dd8a4aebebe04665171c1c39a00b338 (diff)
[IMP] web_editor, website, *: use new color names
*: mass_mailing, website_blog, website_forum, website_hr_recruitment Deprecate alpha, beta, gamma, delta and espilon color names and now use a new color system: o-color-x, with x from 1 to 5. This will allow to review the colors of all themes to have nice visuals for the new color combinations classes, without breaking the current uses of bg-alpha, alert-delta, etc in current websites of customers (by keeping the old color and classes for compatibility). This will also allow to uniformize all themes under the same conventions to enforce BS color override: - o-color-1 used as primary (as before, for alpha) - o-color-2 used as secondary (as before, for beta) Before, some themes were not following the 2 guidelines. The users using those themes will simply have the possibility to choose o-color-1 and o-color-2 colors accordingly to restore their website without breaking the new system features. Another change is that those colors are defined through color palettes and not theme color palettes. This will avoid them to generate automatic bootstrap classes which we don't want (alert, btn) and generate the one we want by ourself. Note: for mass mailing, the colors and classes also have been renamed but the system stays unchanged. Part of https://github.com/odoo/odoo/pull/45856 task-2197038
Diffstat (limited to 'addons/web_editor/static/tests/field_html_tests.js')
-rw-r--r--addons/web_editor/static/tests/field_html_tests.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/addons/web_editor/static/tests/field_html_tests.js b/addons/web_editor/static/tests/field_html_tests.js
index d1e83c32393..eb62efa8a48 100644
--- a/addons/web_editor/static/tests/field_html_tests.js
+++ b/addons/web_editor/static/tests/field_html_tests.js
@@ -227,10 +227,10 @@ QUnit.module('web_editor', {}, function () {
// text is selected
await openColorpicker('.note-toolbar .note-back-color-preview');
- await testUtils.dom.click($field.find('.note-toolbar .note-back-color-preview .o_we_color_btn.bg-gamma'));
+ await testUtils.dom.click($field.find('.note-toolbar .note-back-color-preview .o_we_color_btn.bg-o-color-3'));
assert.strictEqual($field.find('.note-editable').html(),
- '<p>t<font style="background-color: rgb(0, 255, 255);">oto t</font><font style="" class="bg-gamma">oto&nbsp;</font><font class="bg-gamma" style="">to</font>to</p><p>tata</p>',
+ '<p>t<font style="background-color: rgb(0, 255, 255);">oto t</font><font style="" class="bg-o-color-3">oto&nbsp;</font><font class="bg-o-color-3" style="">to</font>to</p><p>tata</p>',
"should have rendered the field correctly in edit");
form.destroy();
@@ -361,7 +361,7 @@ QUnit.module('web_editor', {}, function () {
mockRPC: function (route, args) {
if (args.method === "write") {
assert.strictEqual(args.args[1].body,
- '<p>t<font class="bg-gamma">oto toto&nbsp;</font>toto</p><p>tata</p>',
+ '<p>t<font class="bg-o-color-3">oto toto&nbsp;</font>toto</p><p>tata</p>',
"should save the content");
}
@@ -386,7 +386,7 @@ QUnit.module('web_editor', {}, function () {
}
await openColorpicker('.note-toolbar .note-back-color-preview');
- await testUtils.dom.click($field.find('.note-toolbar .note-back-color-preview .o_we_color_btn.bg-gamma'));
+ await testUtils.dom.click($field.find('.note-toolbar .note-back-color-preview .o_we_color_btn.bg-o-color-3'));
await testUtils.form.clickSave(form);