-
-
-
-
![Viewer]()
+
+
+
+
+
+
+
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();