File tree Expand file tree Collapse file tree
apps/e2e/tests/backend/endpoints/api/v1 Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -244,7 +244,10 @@ describe("AI Query Endpoint - Validation", () => {
244244 } ) ;
245245
246246 expect ( response . status ) . toBe ( 400 ) ;
247- expect ( response . body ) . toEqual ( expect . stringContaining ( `Maximum ${ MAX_IMAGES_PER_MESSAGE } images per message.` ) ) ;
247+ expect ( response . body ) . toMatchObject ( {
248+ code : "TOO_MANY_IMAGE_ATTACHMENTS" ,
249+ error : expect . stringContaining ( `Maximum ${ MAX_IMAGES_PER_MESSAGE } images per message.` ) ,
250+ } ) ;
248251 } ) ;
249252
250253 it ( "rejects user messages with oversized image attachments" , async ( { expect } ) => {
@@ -272,7 +275,10 @@ describe("AI Query Endpoint - Validation", () => {
272275 } ) ;
273276
274277 expect ( response . status ) . toBe ( 400 ) ;
275- expect ( response . body ) . toEqual ( expect . stringContaining ( "Image exceeds" ) ) ;
278+ expect ( response . body ) . toMatchObject ( {
279+ code : "IMAGE_ATTACHMENT_TOO_LARGE" ,
280+ error : expect . stringContaining ( "Image exceeds" ) ,
281+ } ) ;
276282 } ) ;
277283
278284} ) ;
You can’t perform that action at this time.
0 commit comments