diff options
| author | Christophe Simonis <chs@odoo.com> | 2019-03-08 17:56:14 +0100 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2019-03-08 17:56:14 +0100 |
| commit | 2c5c9b8342df2748ad1044fa94c7c3ad821245ba (patch) | |
| tree | aa6228b4ee7c0038d8759f6d202c2e16e9ac0012 /addons/web/static/tests/fields/relational_fields_tests.js | |
| parent | 7d4ca676809564d592257450f6a7628d0722ba0a (diff) | |
| parent | c023d0784f27622f185a1075cba8e408067b5352 (diff) | |
[MERGE] forward port branch 12.0 up to c023d0784f2
Diffstat (limited to 'addons/web/static/tests/fields/relational_fields_tests.js')
| -rw-r--r-- | addons/web/static/tests/fields/relational_fields_tests.js | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/addons/web/static/tests/fields/relational_fields_tests.js b/addons/web/static/tests/fields/relational_fields_tests.js index faf3df6f2e8..5b3ff08a1b6 100644 --- a/addons/web/static/tests/fields/relational_fields_tests.js +++ b/addons/web/static/tests/fields/relational_fields_tests.js @@ -1257,6 +1257,30 @@ QUnit.module('relational_fields', { form.destroy(); }); + QUnit.test('fieldmany2many tags in tree view', function (assert) { + assert.expect(3); + + this.data.partner.records[0].timmy = [12, 14]; + var list = createView({ + View: ListView, + model: 'partner', + data: this.data, + arch: '<tree string="Partners">' + + '<field name="timmy" widget="many2many_tags" options="{\'color_field\': \'color\'}"/>' + + '</tree>', + }); + assert.containsN(list, '.o_field_many2manytags .badge', 2, "there should be 2 tags"); + assert.containsNone(list, '.dropdown-toggle', "the tags should not be dropdowns"); + + testUtils.intercept(list, 'switch_view', function (event) { + assert.strictEqual(event.data.view_type, "form", "should switch to form view"); + }); + // click on the tag: should do nothing and open the form view + testUtils.dom.click(list.$('.o_field_many2manytags .badge:first')); + + list.destroy(); + }); + QUnit.test('fieldmany2many tags view a domain', function (assert) { assert.expect(7); |
