@@ -41,18 +41,18 @@ describe('ProgressActivityTooltip', () => {
4141 } ) ;
4242
4343 it ( 'filters out non-progress activity' , async ( ) => {
44- const noteActivity : GroupActivity = {
44+ const mergeActivity : GroupActivity = {
4545 id : 'activity-2' ,
46- type : GroupActivityType . NOTE ,
47- data : { text : 'Hidden note activity' } ,
46+ type : GroupActivityType . MERGE ,
47+ data : { issues : [ { id : '99' } ] } ,
4848 dateCreated : '2024-01-02T00:00:00.000Z' ,
4949 user : null ,
5050 } ;
5151
5252 MockApiClient . clearMockResponses ( ) ;
5353 MockApiClient . addMockResponse ( {
5454 url : '/organizations/org-slug/issues/1337/activities/' ,
55- body : { activity : [ noteActivity , activity ] } ,
55+ body : { activity : [ mergeActivity , activity ] } ,
5656 } ) ;
5757
5858 render (
@@ -64,22 +64,22 @@ describe('ProgressActivityTooltip', () => {
6464 await userEvent . hover ( screen . getByRole ( 'button' , { name : 'Progress' } ) ) ;
6565
6666 expect ( await screen . findByText ( 'Unresolved' ) ) . toBeInTheDocument ( ) ;
67- expect ( screen . queryByText ( 'Hidden note activity' ) ) . not . toBeInTheDocument ( ) ;
67+ expect ( screen . queryByText ( / M e r g e / ) ) . not . toBeInTheDocument ( ) ;
6868 } ) ;
6969
7070 it ( 'falls back to recent activities when none match progress types' , async ( ) => {
71- const noteActivity : GroupActivity = {
71+ const mergeActivity : GroupActivity = {
7272 id : 'activity-3' ,
73- type : GroupActivityType . NOTE ,
74- data : { text : 'A comment' } ,
73+ type : GroupActivityType . MERGE ,
74+ data : { issues : [ { id : '99' } ] } ,
7575 dateCreated : '2024-01-03T00:00:00.000Z' ,
7676 user : null ,
7777 } ;
7878
7979 MockApiClient . clearMockResponses ( ) ;
8080 MockApiClient . addMockResponse ( {
8181 url : '/organizations/org-slug/issues/1337/activities/' ,
82- body : { activity : [ noteActivity ] } ,
82+ body : { activity : [ mergeActivity ] } ,
8383 } ) ;
8484
8585 render (
@@ -90,6 +90,6 @@ describe('ProgressActivityTooltip', () => {
9090
9191 await userEvent . hover ( screen . getByRole ( 'button' , { name : 'Progress' } ) ) ;
9292
93- expect ( await screen . findByText ( 'A comment' ) ) . toBeInTheDocument ( ) ;
93+ expect ( await screen . findByText ( / M e r g e / ) ) . toBeInTheDocument ( ) ;
9494 } ) ;
9595} ) ;
0 commit comments