From e3f50ec5d1e1b31d3a974babb606d21ce7a25595 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marker=20dao=20=C2=AE?= Date: Tue, 3 Sep 2024 17:32:14 +0200 Subject: [PATCH] feat(chat): Add tests --- .../js/__internal/ui/chat/chat_message_box.ts | 1 - .../chatParts/messageBox.tests.js | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/packages/devextreme/js/__internal/ui/chat/chat_message_box.ts b/packages/devextreme/js/__internal/ui/chat/chat_message_box.ts index e438525fbf56..f4ef40a56520 100644 --- a/packages/devextreme/js/__internal/ui/chat/chat_message_box.ts +++ b/packages/devextreme/js/__internal/ui/chat/chat_message_box.ts @@ -65,7 +65,6 @@ class MessageBox extends Widget { activeStateEnabled, focusStateEnabled, hoverStateEnabled, - // TODO: Add tests for new default options stylingMode: 'outlined', placeholder: 'Type a message', autoResizeEnabled: true, diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets/chatParts/messageBox.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets/chatParts/messageBox.tests.js index 026cdb0843c2..49a515008f8f 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets/chatParts/messageBox.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets/chatParts/messageBox.tests.js @@ -201,4 +201,20 @@ QUnit.module('MessageBox', moduleConfig, () => { }); }); }); + + QUnit.module('TextArea integration', () => { + QUnit.test('TextArea should have correct options', function(assert) { + const expectedOptions = { + stylingMode: 'outlined', + placeholder: 'Type a message', + autoResizeEnabled: true, + }; + + const textArea = TextArea.getInstance(this.$textArea); + + Object.entries(expectedOptions).forEach(([key, value]) => { + assert.deepEqual(value, textArea.option(key), `textarea ${key} value is correct`); + }); + }); + }); });