Skip to content

Commit

Permalink
feat(chat): Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
marker dao ® committed Sep 3, 2024
1 parent 96c8f1e commit e3f50ec
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ class MessageBox extends Widget<MessageBoxProperties> {
activeStateEnabled,
focusStateEnabled,
hoverStateEnabled,
// TODO: Add tests for new default options
stylingMode: 'outlined',
placeholder: 'Type a message',
autoResizeEnabled: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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`);
});
});
});
});

0 comments on commit e3f50ec

Please sign in to comment.