diff options
| author | Thanh Dodeur <tso@odoo.com> | 2020-03-26 09:11:30 +0000 |
|---|---|---|
| committer | Thanh Dodeur <tso@odoo.com> | 2020-04-17 11:09:41 +0000 |
| commit | bf97152ce99f84a524ed8773280b4bba8fca38da (patch) | |
| tree | 5776a716c2bdcd06a89170511793a838b860f662 /addons/mail/static/tests | |
| parent | a6e96c256ded6bb764d1ab469878ef780ecdbe3c (diff) | |
[REF] mail: removes signature from route params
This commit removes the unnecessary usage of `signature` instead of
`unique` in the route params for `web/image`.
closes odoo/odoo#48437
Related: odoo/enterprise#9501
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Diffstat (limited to 'addons/mail/static/tests')
| -rw-r--r-- | addons/mail/static/tests/chatter_tests.js | 10 | ||||
| -rw-r--r-- | addons/mail/static/tests/document_viewer_tests.js | 6 |
2 files changed, 8 insertions, 8 deletions
diff --git a/addons/mail/static/tests/chatter_tests.js b/addons/mail/static/tests/chatter_tests.js index c3cb823738a..8e7ea9beb9d 100644 --- a/addons/mail/static/tests/chatter_tests.js +++ b/addons/mail/static/tests/chatter_tests.js @@ -1775,21 +1775,21 @@ QUnit.test('chatter: Attachment viewer', async function (assert) { attachment_ids: [{ filename: 'image1.jpg', id:1, - checksum: 999, + checksum: '123456789abc', mimetype: 'image/jpeg', name: 'Test Image 1', url: '/web/content/1?download=true' },{ filename: 'image2.jpg', id:2, - checksum: 999, + checksum: '123456789abc', mimetype: 'image/jpeg', name: 'Test Image 2', url: '/web/content/2?download=true' },{ filename: 'image3.jpg', id:3, - checksum: 999, + checksum: '123456789abc', mimetype: 'image/jpeg', name: 'Test Image 3', url: '/web/content/3?download=true' @@ -1840,11 +1840,11 @@ QUnit.test('chatter: Attachment viewer', async function (assert) { "image caption should have correct download link"); // click on first image attachement await testUtils.dom.click(form.$('.o_thread_message .o_attachment .o_image_box .o_image_overlay').first()); - assert.strictEqual($('.o_modal_fullscreen img.o_viewer_img[data-src="/web/image/1?unique=1&signature=999&model=ir.attachment"]').length, 1, + assert.strictEqual($('.o_modal_fullscreen img.o_viewer_img[data-src="/web/image/1?unique=56789abc&model=ir.attachment"]').length, 1, "Modal popup should open with first image src"); // click on next button await testUtils.dom.click($('.modal .arrow.arrow-right.move_next span')); - assert.strictEqual($('.o_modal_fullscreen img.o_viewer_img[data-src="/web/image/2?unique=1&signature=999&model=ir.attachment"]').length, 1, + assert.strictEqual($('.o_modal_fullscreen img.o_viewer_img[data-src="/web/image/2?unique=56789abc&model=ir.attachment"]').length, 1, "Modal popup should have now second image src"); assert.strictEqual($('.o_modal_fullscreen .o_viewer_toolbar .o_download_btn').length, 1, "Modal popup should have download button"); diff --git a/addons/mail/static/tests/document_viewer_tests.js b/addons/mail/static/tests/document_viewer_tests.js index 4d914347669..5ccb9df5ff3 100644 --- a/addons/mail/static/tests/document_viewer_tests.js +++ b/addons/mail/static/tests/document_viewer_tests.js @@ -28,7 +28,7 @@ var createViewer = function (params) { if (route === '/web/content/4?model=ir.attachment') { return Promise.resolve(); } - if (route === '/web/image/6?unique=1&signature=999&model=ir.attachment') { + if (route === '/web/image/6?unique=56789abc&model=ir.attachment') { return Promise.resolve(); } }; @@ -70,7 +70,7 @@ QUnit.module('DocumentViewer', { {id: 3, name: 'urlRandom', type: 'url', mimetype: '', url: 'https://www.google.com'}, {id: 4, name: 'text.html', type: 'binary', mimetype: 'text/html', datas:'testee'}, {id: 5, name: 'video.mp4', type: 'binary', mimetype: 'video/mp4', datas:'R0lDOP////ywAADs='}, - {id: 6, name: 'image.jpg', type: 'binary', mimetype: 'image/jpeg', checksum: 999, datas:'R0lVOP////ywAADs='}, + {id: 6, name: 'image.jpg', type: 'binary', mimetype: 'image/jpeg', checksum: '123456789abc', datas:'R0lVOP////ywAADs='}, ]; }, }, function () { @@ -166,7 +166,7 @@ QUnit.module('DocumentViewer', { assert.strictEqual(viewer.$(".o_image_caption:contains('image.jpg')").length, 1, "the viewer be on the right attachment"); - assert.containsOnce(viewer, 'img[data-src="/web/image/6?unique=1&signature=999&model=ir.attachment"]', + assert.containsOnce(viewer, 'img[data-src="/web/image/6?unique=56789abc&model=ir.attachment"]', "there should be a video player"); viewer.destroy(); |
