From ee0a5ca4490ee83a0ed9d6e4f7382246b50da170 Mon Sep 17 00:00:00 2001 From: jpr-odoo Date: Mon, 18 Feb 2019 06:47:16 +0000 Subject: [MOV/IMP] web, mail: update attachment widget and moved the common scss code from mail to web with this commit, we have updated the attachment widget view same as like chatter attachment view moved the common scss code from mail to web for many2many_binary widget, which is used for attachment and update test case according to the widget Task ID: 1930087 --- addons/web/static/tests/fields/relational_fields_tests.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'addons/web/static/tests') diff --git a/addons/web/static/tests/fields/relational_fields_tests.js b/addons/web/static/tests/fields/relational_fields_tests.js index 406370b0a2b..6f72b827cae 100644 --- a/addons/web/static/tests/fields/relational_fields_tests.js +++ b/addons/web/static/tests/fields/relational_fields_tests.js @@ -2253,11 +2253,11 @@ QUnit.module('relational_fields', { assert.containsOnce(form, 'div.o_field_widget.oe_fileupload', "there should be the attachment widget"); - assert.strictEqual(form.$('div.o_field_widget.oe_fileupload .oe_attachments').children().length, 1, + assert.strictEqual(form.$('div.o_field_widget.oe_fileupload .o_attachments').children().length, 1, "there should be no attachment"); assert.containsNone(form, 'div.o_field_widget.oe_fileupload .o_attach', "there should not be an Add button (readonly)"); - assert.containsNone(form, 'div.o_field_widget.oe_fileupload .oe_attachment .oe_delete', + assert.containsNone(form, 'div.o_field_widget.oe_fileupload .o_attachment .o_attachment_delete', "there should not be a Delete button (readonly)"); // to edit mode @@ -2273,8 +2273,7 @@ QUnit.module('relational_fields', { // no idea how to test this // delete the attachment - await testUtils.dom.click(form.$('div.o_field_widget.oe_fileupload .oe_attachment .oe_delete')); - + await testUtils.dom.click(form.$('div.o_field_widget.oe_fileupload .o_attachment .o_attachment_delete')); assert.verifySteps([ '/web/dataset/call_kw/turtle/read', @@ -2283,7 +2282,7 @@ QUnit.module('relational_fields', { await testUtils.form.clickSave(form); - assert.strictEqual(form.$('div.o_field_widget.oe_fileupload .oe_attachments').children().length, 0, + assert.strictEqual(form.$('div.o_field_widget.oe_fileupload .o_attachments').children().length, 0, "there should be no attachment"); assert.verifySteps([ -- cgit v1.2.3