diff options
| author | Martin Trigaux <mat@odoo.com> | 2019-07-24 07:36:59 +0000 |
|---|---|---|
| committer | Martin Trigaux <mat@odoo.com> | 2019-07-24 10:32:23 +0000 |
| commit | a98427834e00380e2e63e08668f5c2b069e3c2ea (patch) | |
| tree | fbefd4a26124efbaf5e6b4bdbf58ec570014c896 /addons/web/static/tests/chrome | |
| parent | 4e6ee3ac97041653ff15a77abd77084dc0c9f525 (diff) | |
| parent | 860ab5a1c28ba85d7a193d68cfbbb1063bbf0651 (diff) | |
[MERGE] Forward port of saas-12.2 to saas-12.3 up to 860ab5a1c28ba
closes odoo/odoo#35119
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
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 db3908ffd9f..4d05d723ccf 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); |
