@@ -239,7 +239,7 @@ describe('TicketDetailPage reply access', () => {
239239 . toBeTruthy ( )
240240 } )
241241
242- it ( 'preserves freshly revalidated assignees when marking a ticket read completes ' , async ( ) => {
242+ it ( 'revalidates fresh detail after marking the ticket read' , async ( ) => {
243243 const markReadRequest = createDeferred < void > ( )
244244 mockedMarkRead . mockReturnValue ( markReadRequest . promise )
245245 mockUseSWR . mockReturnValue ( {
@@ -254,35 +254,10 @@ describe('TicketDetailPage reply access', () => {
254254
255255 await waitFor ( ( ) => {
256256 expect ( mockMutate )
257- . toHaveBeenCalledWith ( expect . any ( Function ) , false )
257+ . toHaveBeenCalledTimes ( 1 )
258258 } )
259-
260- const updateCachedTicket = mockMutate . mock . calls [ 0 ] [ 0 ] as (
261- ticket ?: SupportTicketDetail ,
262- ) => SupportTicketDetail | undefined
263- const freshlyRevalidatedTicket : SupportTicketDetail = {
264- ...closedTicket ,
265- assignees : [ {
266- assignedAt : '2026-08-07T01:30:00.000Z' ,
267- handle : 'support-staff' ,
268- userId : '67890' ,
269- } ] ,
270- hasUnread : true ,
271- responseCount : 1 ,
272- responses : [ {
273- createdAt : '2026-08-07T01:30:00.000Z' ,
274- id : 'response-1' ,
275- markdown : 'We are investigating.' ,
276- readBy : [ ] ,
277- userHandle : 'support-staff' ,
278- userId : '67890' ,
279- } ] ,
280- }
281-
282- expect ( updateCachedTicket ( freshlyRevalidatedTicket ) )
283- . toEqual ( { ...freshlyRevalidatedTicket , hasUnread : false } )
284- expect ( updateCachedTicket ( undefined ) )
285- . toBeUndefined ( )
259+ expect ( mockMutate . mock . calls [ 0 ] )
260+ . toEqual ( [ ] )
286261 } )
287262
288263 it ( 'identifies support team replies without labelling the ticket owner' , ( ) => {
0 commit comments