diff options
| author | Aaron Bohy <aab@odoo.com> | 2018-01-25 11:02:13 +0100 |
|---|---|---|
| committer | Aaron Bohy <aab@odoo.com> | 2018-01-26 19:26:03 +0100 |
| commit | 36a9cb20593db6831f8342f5c19df2b83c6f2e26 (patch) | |
| tree | a9ff9038015b9076e70e39fd389f540132eacec0 /addons/web/static/tests | |
| parent | 563c31fe4947f84898e4a4213bde6af5fabed3da (diff) | |
[IMP] web: Kanban open ColumnQuickCreate if no column
Part of task #38740
Diffstat (limited to 'addons/web/static/tests')
| -rw-r--r-- | addons/web/static/tests/views/kanban_tests.js | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/addons/web/static/tests/views/kanban_tests.js b/addons/web/static/tests/views/kanban_tests.js index 5d5782bdd6a..e7c96525d11 100644 --- a/addons/web/static/tests/views/kanban_tests.js +++ b/addons/web/static/tests/views/kanban_tests.js @@ -1888,6 +1888,33 @@ QUnit.module('Views', { kanban.destroy(); }); + QUnit.test('quick create column should be opened if there is no column', function (assert) { + assert.expect(3); + + var kanban = createView({ + View: KanbanView, + model: 'partner', + data: this.data, + arch: '<kanban class="o_kanban_test">' + + '<field name="product_id"/>' + + '<templates><t t-name="kanban-box">' + + '<div><field name="foo"/></div>' + + '</t></templates>' + + '</kanban>', + groupBy: ['product_id'], + domain: [['foo', '=', 'norecord']], + }); + + assert.strictEqual(kanban.$('.o_kanban_group').length, 0, + "there should be no column"); + assert.strictEqual(kanban.$('.o_column_quick_create').length, 1, + "should have a quick create column"); + assert.ok(kanban.$('.o_column_quick_create input').is(':visible'), + "the quick create should be opened"); + + kanban.destroy(); + }); + QUnit.test('cancel column quick create by pressing ESCAPE', function (assert) { assert.expect(4); |
