diff options
| author | Christophe Simonis <chs@odoo.com> | 2019-07-26 15:12:29 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2019-07-26 15:12:29 +0200 |
| commit | bfd34e14b1be97465e135d85c76b9e626a219e7a (patch) | |
| tree | 8de54ec8f504158e965ab92e21658cab539024ee /addons/web/static/tests/chrome | |
| parent | 26b5b446b3dab3d66b7db054ca77e7b1a811c28a (diff) | |
| parent | 40e8b67179f212551a176d72b3851671febc1fba (diff) | |
[MERGE] forward port branch saas-12.3 up to 40e8b67179f
Diffstat (limited to 'addons/web/static/tests/chrome')
| -rw-r--r-- | addons/web/static/tests/chrome/action_manager_tests.js | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/addons/web/static/tests/chrome/action_manager_tests.js b/addons/web/static/tests/chrome/action_manager_tests.js index 5724da4b2f8..b98a973695f 100644 --- a/addons/web/static/tests/chrome/action_manager_tests.js +++ b/addons/web/static/tests/chrome/action_manager_tests.js @@ -880,6 +880,41 @@ QUnit.module('ActionManager', { actionManager.destroy(); }); + QUnit.test('lazy loaded multi record view with failing mono record one', async function (assert) { + assert.expect(4); + + var actionManager = await createActionManager({ + actions: this.actions, + archs: this.archs, + data: this.data, + mockRPC: function (route, args) { + if (args.method === 'read') { + return Promise.reject(); + } + return this._super.apply(this, arguments); + }, + }); + + await actionManager.loadState({ + action: 3, + id: 2, + view_type: 'form', + }).then(function () { + assert.ok(false, 'should not resolve the deferred'); + }).catch(function () { + assert.ok(true, 'should reject the deferred'); + }); + + assert.containsNone(actionManager, '.o_form_view'); + assert.containsNone(actionManager, '.o_list_view'); + + await actionManager.doAction(1); + + assert.containsOnce(actionManager, '.o_kanban_view'); + + actionManager.destroy(); + }); + QUnit.test('change the viewType of the current action', async function (assert) { assert.expect(13); |
