Files
odoo_source/addons/mail_bot/static/tests/messaging_initializer_tests.js
T
tsm-odoo 2538a71944 [IMP] mail, *: make mail tests stop relying on this
*: hr_holidays, im_livechat, mail, mail_bot, sms, snailmail, test_mail,
website_livechat, website_slides.

Mail tests are currently relying on this during tests to make env, widget,
data available. We don't wan't to add magic keys to this anymore.

task-2792108

closes odoo/odoo#86559

Related: odoo/enterprise#25341
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-17 19:30:08 +01:00

40 lines
926 B
JavaScript

/** @odoo-module **/
import { beforeEach, start } from '@mail/utils/test_utils';
QUnit.module('mail_bot', {}, function () {
QUnit.module('messaging_initializer_tests.js', {
beforeEach() {
beforeEach(this);
},
});
QUnit.test('OdooBot initialized at init', async function (assert) {
// TODO this test should be completed in combination with
// implementing _mockMailChannelInitOdooBot task-2300480
assert.expect(2);
await start({
data: this.data,
env: {
session: {
odoobot_initialized: false,
},
},
async mockRPC(route, args) {
if (args.method === 'init_odoobot') {
assert.step('init_odoobot');
}
return this._super(...arguments);
},
});
assert.verifySteps(
['init_odoobot'],
"should have initialized OdooBot at init"
);
});
});