summaryrefslogtreecommitdiff
path: root/addons/im_livechat/static/src/components
diff options
context:
space:
mode:
Diffstat (limited to 'addons/im_livechat/static/src/components')
-rw-r--r--addons/im_livechat/static/src/components/discuss/discuss_tests.js26
1 files changed, 26 insertions, 0 deletions
diff --git a/addons/im_livechat/static/src/components/discuss/discuss_tests.js b/addons/im_livechat/static/src/components/discuss/discuss_tests.js
index 166e4fd679f..c756f2dff93 100644
--- a/addons/im_livechat/static/src/components/discuss/discuss_tests.js
+++ b/addons/im_livechat/static/src/components/discuss/discuss_tests.js
@@ -411,6 +411,32 @@ QUnit.test('livechats with no messages are sorted by creation date in the sideba
);
});
+QUnit.test('invite button should be present on livechat', async function (assert) {
+ assert.expect(1);
+
+ this.data['mail.channel'].records.push(
+ {
+ anonymous_name: "Visitor 11",
+ channel_type: 'livechat',
+ id: 11,
+ livechat_operator_id: this.data.currentPartnerId,
+ members: [this.data.currentPartnerId, this.data.publicPartnerId],
+ },
+ );
+ await this.start({
+ discuss: {
+ params: {
+ default_active_id: 'mail.channel_11',
+ },
+ },
+ });
+ assert.containsOnce(
+ document.body,
+ '.o_widget_Discuss_controlPanelButtonInvite',
+ "Invite button should be visible in control panel when livechat is active thread"
+ );
+});
+
});
});
});