@@ -241,7 +241,7 @@ describe('Chat Subdomain API Route', () => {
241241 } )
242242
243243 describe ( 'POST endpoint' , ( ) => {
244- it ( 'should handle authentication requests without messages ' , async ( ) => {
244+ it ( 'should handle authentication requests without input ' , async ( ) => {
245245 const req = createMockRequest ( 'POST' , { password : 'test-password' } )
246246 const params = Promise . resolve ( { subdomain : 'password-protected-chat' } )
247247
@@ -257,7 +257,7 @@ describe('Chat Subdomain API Route', () => {
257257 expect ( mockSetChatAuthCookie ) . toHaveBeenCalled ( )
258258 } )
259259
260- it ( 'should return 400 for requests without message ' , async ( ) => {
260+ it ( 'should return 400 for requests without input ' , async ( ) => {
261261 const req = createMockRequest ( 'POST' , { } )
262262 const params = Promise . resolve ( { subdomain : 'test-chat' } )
263263
@@ -269,7 +269,7 @@ describe('Chat Subdomain API Route', () => {
269269
270270 const data = await response . json ( )
271271 expect ( data ) . toHaveProperty ( 'error' )
272- expect ( data ) . toHaveProperty ( 'message' , 'No message provided' )
272+ expect ( data ) . toHaveProperty ( 'message' , 'No input provided' )
273273 } )
274274
275275 it ( 'should return 401 for unauthorized access' , async ( ) => {
@@ -279,7 +279,7 @@ describe('Chat Subdomain API Route', () => {
279279 error : 'Authentication required' ,
280280 } ) )
281281
282- const req = createMockRequest ( 'POST' , { message : 'Hello' } )
282+ const req = createMockRequest ( 'POST' , { input : 'Hello' } )
283283 const params = Promise . resolve ( { subdomain : 'protected-chat' } )
284284
285285 const { POST } = await import ( './route' )
@@ -342,7 +342,7 @@ describe('Chat Subdomain API Route', () => {
342342 }
343343 } )
344344
345- const req = createMockRequest ( 'POST' , { message : 'Hello' } )
345+ const req = createMockRequest ( 'POST' , { input : 'Hello' } )
346346 const params = Promise . resolve ( { subdomain : 'test-chat' } )
347347
348348 const { POST } = await import ( './route' )
@@ -357,7 +357,7 @@ describe('Chat Subdomain API Route', () => {
357357 } )
358358
359359 it ( 'should return streaming response for valid chat messages' , async ( ) => {
360- const req = createMockRequest ( 'POST' , { message : 'Hello world' , conversationId : 'conv-123' } )
360+ const req = createMockRequest ( 'POST' , { input : 'Hello world' , conversationId : 'conv-123' } )
361361 const params = Promise . resolve ( { subdomain : 'test-chat' } )
362362
363363 const { POST } = await import ( './route' )
@@ -374,7 +374,7 @@ describe('Chat Subdomain API Route', () => {
374374 } )
375375
376376 it ( 'should handle streaming response body correctly' , async ( ) => {
377- const req = createMockRequest ( 'POST' , { message : 'Hello world' } )
377+ const req = createMockRequest ( 'POST' , { input : 'Hello world' } )
378378 const params = Promise . resolve ( { subdomain : 'test-chat' } )
379379
380380 const { POST } = await import ( './route' )
@@ -404,7 +404,7 @@ describe('Chat Subdomain API Route', () => {
404404 throw new Error ( 'Execution failed' )
405405 } )
406406
407- const req = createMockRequest ( 'POST' , { message : 'Trigger error' } )
407+ const req = createMockRequest ( 'POST' , { input : 'Trigger error' } )
408408 const params = Promise . resolve ( { subdomain : 'test-chat' } )
409409
410410 const { POST } = await import ( './route' )
@@ -444,7 +444,7 @@ describe('Chat Subdomain API Route', () => {
444444
445445 it ( 'should pass conversationId to executeWorkflowForChat when provided' , async ( ) => {
446446 const req = createMockRequest ( 'POST' , {
447- message : 'Hello world' ,
447+ input : 'Hello world' ,
448448 conversationId : 'test-conversation-123' ,
449449 } )
450450 const params = Promise . resolve ( { subdomain : 'test-chat' } )
@@ -461,7 +461,7 @@ describe('Chat Subdomain API Route', () => {
461461 } )
462462
463463 it ( 'should handle missing conversationId gracefully' , async ( ) => {
464- const req = createMockRequest ( 'POST' , { message : 'Hello world' } )
464+ const req = createMockRequest ( 'POST' , { input : 'Hello world' } )
465465 const params = Promise . resolve ( { subdomain : 'test-chat' } )
466466
467467 const { POST } = await import ( './route' )
0 commit comments