@@ -85,9 +85,7 @@ describe('AssistantChat', function () {
85
85
it ( 'renders input field and send button' , function ( ) {
86
86
renderWithChat ( [ ] ) ;
87
87
88
- const inputField = screen . getByPlaceholderText (
89
- 'Ask MongoDB Assistant a question'
90
- ) ;
88
+ const inputField = screen . getByPlaceholderText ( 'Ask a question' ) ;
91
89
const sendButton = screen . getByLabelText ( 'Send message' ) ;
92
90
93
91
expect ( inputField ) . to . exist ;
@@ -99,7 +97,7 @@ describe('AssistantChat', function () {
99
97
100
98
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
101
99
const inputField = screen . getByPlaceholderText (
102
- 'Ask MongoDB Assistant a question'
100
+ 'Ask a question'
103
101
) as HTMLTextAreaElement ;
104
102
105
103
userEvent . type ( inputField , 'What is MongoDB?' ) ;
@@ -109,9 +107,8 @@ describe('AssistantChat', function () {
109
107
110
108
it ( 'displays the disclaimer and welcome text' , function ( ) {
111
109
renderWithChat ( [ ] ) ;
112
- expect ( screen . getByText ( / T h i s f e a t u r e i s p o w e r e d b y g e n e r a t i v e A I / ) ) . to
110
+ expect ( screen . getByText ( / A I c a n m a k e m i s t a k e s . R e v i e w f o r a c c u r a c y . / ) ) . to
113
111
. exist ;
114
- expect ( screen . getByText ( / P l e a s e r e v i e w t h e o u t p u t s c a r e f u l l y / ) ) . to . exist ;
115
112
} ) ;
116
113
117
114
it ( 'displays the welcome text when there are no messages' , function ( ) {
@@ -149,9 +146,7 @@ describe('AssistantChat', function () {
149
146
it ( 'send button is enabled when input has text' , function ( ) {
150
147
renderWithChat ( [ ] ) ;
151
148
152
- const inputField = screen . getByPlaceholderText (
153
- 'Ask MongoDB Assistant a question'
154
- ) ;
149
+ const inputField = screen . getByPlaceholderText ( 'Ask a question' ) ;
155
150
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
156
151
const sendButton = screen . getByLabelText (
157
152
'Send message'
@@ -165,9 +160,7 @@ describe('AssistantChat', function () {
165
160
it ( 'send button is disabled for whitespace-only input' , async function ( ) {
166
161
renderWithChat ( [ ] ) ;
167
162
168
- const inputField = screen . getByPlaceholderText (
169
- 'Ask MongoDB Assistant a question'
170
- ) ;
163
+ const inputField = screen . getByPlaceholderText ( 'Ask a question' ) ;
171
164
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
172
165
const sendButton = screen . getByLabelText (
173
166
'Send message'
@@ -246,9 +239,7 @@ describe('AssistantChat', function () {
246
239
it ( 'calls sendMessage when form is submitted' , async function ( ) {
247
240
const { result, ensureOptInAndSendStub } = renderWithChat ( [ ] ) ;
248
241
const { track } = result ;
249
- const inputField = screen . getByPlaceholderText (
250
- 'Ask MongoDB Assistant a question'
251
- ) ;
242
+ const inputField = screen . getByPlaceholderText ( 'Ask a question' ) ;
252
243
const sendButton = screen . getByLabelText ( 'Send message' ) ;
253
244
254
245
userEvent . type ( inputField , 'What is aggregation?' ) ;
@@ -268,7 +259,7 @@ describe('AssistantChat', function () {
268
259
269
260
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
270
261
const inputField = screen . getByPlaceholderText (
271
- 'Ask MongoDB Assistant a question'
262
+ 'Ask a question'
272
263
) as HTMLTextAreaElement ;
273
264
274
265
userEvent . type ( inputField , 'Test message' ) ;
@@ -282,9 +273,7 @@ describe('AssistantChat', function () {
282
273
const { ensureOptInAndSendStub, result } = renderWithChat ( [ ] ) ;
283
274
const { track } = result ;
284
275
285
- const inputField = screen . getByPlaceholderText (
286
- 'Ask MongoDB Assistant a question'
287
- ) ;
276
+ const inputField = screen . getByPlaceholderText ( 'Ask a question' ) ;
288
277
289
278
userEvent . type ( inputField , ' What is sharding? ' ) ;
290
279
userEvent . click ( screen . getByLabelText ( 'Send message' ) ) ;
@@ -301,9 +290,7 @@ describe('AssistantChat', function () {
301
290
it ( 'does not call ensureOptInAndSend when input is empty or whitespace-only' , function ( ) {
302
291
const { ensureOptInAndSendStub } = renderWithChat ( [ ] ) ;
303
292
304
- const inputField = screen . getByPlaceholderText (
305
- 'Ask MongoDB Assistant a question'
306
- ) ;
293
+ const inputField = screen . getByPlaceholderText ( 'Ask a question' ) ;
307
294
const chatForm = screen . getByTestId ( 'assistant-chat-input' ) ;
308
295
309
296
// Test empty input
0 commit comments