Skip to content

Commit 7c97ebd

Browse files
Chat: an error should not occur when showing if jQEvent is not passed (DevExpress#29720)
1 parent ba527c9 commit 7c97ebd

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

packages/devextreme/testing/tests/DevExpress.ui.widgets/chatParts/messageList.tests.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1219,6 +1219,26 @@ QUnit.module('MessageList', () => {
12191219
assert.strictEqual(this.contextMenu.option('visible'), false, 'context menu is hidden after window resize');
12201220
});
12211221

1222+
QUnit.test('an error should not occur when showing if jQEvent is not passed', function(assert) {
1223+
this.reinit({
1224+
allowDeleting: () => true,
1225+
allowUpdating: () => true,
1226+
items: [
1227+
{ text: 'a', author: userFirst },
1228+
{ text: 'b', author: userSecond },
1229+
],
1230+
currentUserId: userSecond.id,
1231+
});
1232+
1233+
try {
1234+
this.contextMenu.show();
1235+
} catch(e) {
1236+
assert.ok(false, `Error occurred: ${e.message}`);
1237+
} finally {
1238+
assert.strictEqual(this.contextMenu.option('visible'), false, 'context menu is hidden');
1239+
}
1240+
});
1241+
12221242
[
12231243
{
12241244
editingOptions: {

0 commit comments

Comments
 (0)