diff options
| author | Géry Debongnie <ged@odoo.com> | 2018-04-20 10:36:18 +0200 |
|---|---|---|
| committer | Géry Debongnie <ged@odoo.com> | 2018-04-20 10:36:18 +0200 |
| commit | 6d4eb69ef3ddefe4698a338eee7ac946446f6b86 (patch) | |
| tree | 577d8b0f2a02673f5c3300e342e2a72cc4237465 /addons/barcodes/static/tests/barcode_tests.js | |
| parent | b519858a30c59251ca0b37337bdc648342f3c2ed (diff) | |
[FIX] barcodes: update tests to new notification service
The notification manager was removed and replaced by a notification
service. Some tests were forward ported after this change, so they need
to be updated to the new system.
Diffstat (limited to 'addons/barcodes/static/tests/barcode_tests.js')
| -rw-r--r-- | addons/barcodes/static/tests/barcode_tests.js | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/addons/barcodes/static/tests/barcode_tests.js b/addons/barcodes/static/tests/barcode_tests.js index b2a2bf46126..de88e79b9fc 100644 --- a/addons/barcodes/static/tests/barcode_tests.js +++ b/addons/barcodes/static/tests/barcode_tests.js @@ -8,6 +8,7 @@ var fieldRegistry = require('web.field_registry'); var FormController = require('web.FormController'); var FormView = require('web.FormView'); var testUtils = require('web.test_utils'); +var NotificationService = require('web.NotificationService'); var createView = testUtils.createView; var triggerKeypressEvent = testUtils.triggerKeypressEvent; @@ -64,14 +65,16 @@ QUnit.test('Button with barcode_trigger', function (assert) { '</header>' + '</form>', res_id: 2, + services: [NotificationService.extend({ + notify: function (params) { + assert.step(params.type); + } + })], intercepts: { execute_action: function (event) { assert.strictEqual(event.data.action_data.name, 'do_something', "do_something method call verified"); }, - warning: function () { - assert.step('warn'); - }, }, }); @@ -509,11 +512,11 @@ QUnit.test('barcode_scanned only trigger error for active view', function (asser '</form>', }, res_id: 1, - intercepts: { - warning: function (event) { - assert.step(event.name); + services: [NotificationService.extend({ + notify: function (params) { + assert.step(params.type); } - }, + })], viewOptions: { mode: 'edit', }, |
