[REF] web: remove unused legacy stuff

This commit removes the legacy CustomCheckbox and the backward
compatibility layer for the systray items. Both of them are no
longer used.

closes odoo/odoo#112718

Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
This commit is contained in:
Aaron Bohy
2023-02-15 13:36:51 +01:00
parent 49159d791e
commit cfc5da5b30
6 changed files with 0 additions and 195 deletions
@@ -1,52 +0,0 @@
odoo.define('web.custom_checkbox_tests', function (require) {
"use strict";
const CustomCheckbox = require('web.CustomCheckbox');
const testUtils = require('web.test_utils');
const { createComponent, dom: testUtilsDom } = testUtils;
QUnit.module('Components', {}, function () {
QUnit.module('CustomCheckbox');
QUnit.test('test checkbox: default values', async function(assert) {
assert.expect(6);
const checkbox = await createComponent(CustomCheckbox, {});
assert.containsOnce(checkbox.el, 'input');
assert.containsNone(checkbox.el, 'input:disabled');
assert.containsOnce(checkbox.el, 'label');
const input = checkbox.el.querySelector('input');
assert.notOk(input.checked, 'checkbox should be unchecked');
assert.ok(input.id.startsWith('checkbox-comp-'));
await testUtilsDom.click(checkbox.el.querySelector('label'));
assert.ok(input.checked, 'checkbox should be checked');
});
QUnit.test('test checkbox: custom values', async function(assert) {
assert.expect(6);
const checkbox = await createComponent(CustomCheckbox, {
props: {
id: 'my-form-check',
disabled: true,
value: true,
text: 'checkbox',
}
});
assert.containsOnce(checkbox.el, 'input');
assert.containsOnce(checkbox.el, 'input:disabled');
assert.containsOnce(checkbox.el, 'label');
const input = checkbox.el.querySelector('input');
assert.ok(input.checked, 'checkbox should be checked');
assert.strictEqual(input.id, 'my-form-check');
assert.ok(input.checked, 'checkbox should be checked');
});
});
});