[FIX] web: BS4, restore slider checkboxes

Take advantage of the new BS4 checkbox structure to simplify the
widget too.
This commit is contained in:
qsm-odoo
2018-08-23 16:45:40 +02:00
parent 6fd68c28cd
commit 9fc771dd5d
3 changed files with 34 additions and 58 deletions
@@ -359,7 +359,7 @@ QUnit.module('basic_fields', {
QUnit.module('FieldBooleanToggle');
QUnit.test('use boolean toggle widget in form view', function (assert) {
assert.expect(2);
assert.expect(1);
var form = createView({
View: FormView,
@@ -370,7 +370,6 @@ QUnit.module('basic_fields', {
});
assert.strictEqual(form.$(".custom-checkbox.o_boolean_toggle").length, 1, "Boolean toggle widget applied to boolean field");
assert.strictEqual(form.$(".custom-checkbox.o_boolean_toggle").find(".slider").length, 1, "Boolean toggle contains slider to toggle");
form.destroy();
});