diff options
| author | Martin Geubelle <mge@odoo.com> | 2017-05-19 17:25:59 +0200 |
|---|---|---|
| committer | Aaron Bohy <aab@odoo.com> | 2017-05-24 08:25:23 +0200 |
| commit | fc82e1e40abd8092e6a044dc4e78432beffb5149 (patch) | |
| tree | 1000b8c86df671f84f9446655443155dd59f2031 /addons/mrp/static/tests | |
| parent | 460c21f76578cceec364f0431d03e4f4515d6acc (diff) | |
[FIX] mrp: correctly replace inputs in pdf_viewer widget
In the extended template `HiddenInputFile` there are actually two inputs
(one for image only and another one).
This widget needs to replace both of them otherwise the file selector will
be opened twice.
Diffstat (limited to 'addons/mrp/static/tests')
| -rw-r--r-- | addons/mrp/static/tests/mrp_tests.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/addons/mrp/static/tests/mrp_tests.js b/addons/mrp/static/tests/mrp_tests.js index ed4dab4f91b..40f6fc2607b 100644 --- a/addons/mrp/static/tests/mrp_tests.js +++ b/addons/mrp/static/tests/mrp_tests.js @@ -31,7 +31,7 @@ QUnit.module('mrp', { }, }, function () { QUnit.test("pdf_viewer without data", function (assert) { - assert.expect(3); + assert.expect(4); var form = createView({ View: FormView, @@ -48,6 +48,8 @@ QUnit.module('mrp', { "there should be a visible 'Upload' button"); assert.ok(form.$('.o_field_widget iframe.o_pdfview_iframe').hasClass('o_hidden'), "there should be an invisible iframe"); + assert.strictEqual(form.$('input[type="file"]').length, 1, + "there should be one input"); form.destroy(); }); |
