diff options
| author | Priyanka Kakadiya <pka@odoo.com> | 2018-11-13 13:19:41 +0000 |
|---|---|---|
| committer | Vincent Schippefilt <vsc@odoo.com> | 2019-05-27 13:59:34 +0000 |
| commit | d9c33c4c78e3b2e1a828e59ec423fb3b48acd015 (patch) | |
| tree | e7c880600ada879b3a4caccb00e3b744ee432962 /addons/web/static/tests | |
| parent | a61f8c591f7589b24756d3485393f3c6f8b9b26a (diff) | |
[IMP] web: add accesskey 'b' for previous breadcrumb
Also, exclude 'b' for being automatically assigned to buttons
Issue : 1878248
closes odoo/odoo#33689
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: Mohammed Shekha <msh@openerp.com>
Diffstat (limited to 'addons/web/static/tests')
| -rw-r--r-- | addons/web/static/tests/chrome/action_manager_tests.js | 30 |
1 files changed, 30 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 6fdfc6d92bc..b14ccefb447 100644 --- a/addons/web/static/tests/chrome/action_manager_tests.js +++ b/addons/web/static/tests/chrome/action_manager_tests.js @@ -2568,6 +2568,36 @@ QUnit.module('ActionManager', { actionManager.destroy(); }); + QUnit.test('reverse breadcrumb works on accesskey "b"', async function (assert) { + assert.expect(4); + + var actionManager = await createActionManager({ + actions: this.actions, + archs: this.archs, + data: this.data, + }); + await actionManager.doAction(3); + + // open a record in form view + await testUtils.dom.click(actionManager.$('.o_list_view .o_data_row:first')); + await testUtils.dom.click(actionManager.$('.o_form_view button:contains(Execute action)')); + + assert.containsN(actionManager, '.o_control_panel .breadcrumb li', 3); + + var $previousBreadcrumb = actionManager.$('.o_control_panel .breadcrumb li.active').prev(); + assert.strictEqual($previousBreadcrumb.attr("accesskey"), "b", + "previous breadcrumb should have accessKey 'b'"); + await testUtils.dom.click($previousBreadcrumb); + + assert.containsN(actionManager, '.o_control_panel .breadcrumb li', 2); + + var $previousBreadcrumb = actionManager.$('.o_control_panel .breadcrumb li.active').prev(); + assert.strictEqual($previousBreadcrumb.attr("accesskey"), "b", + "previous breadcrumb should have accessKey 'b'"); + + actionManager.destroy(); + }); + QUnit.test('reload previous controller when discarding a new record', async function (assert) { assert.expect(8); |
