@@ -133,6 +133,44 @@ describe('SeerSection', () => {
133133 expect ( screen . getByRole ( 'button' , { name : 'Fix with Seer' } ) ) . toBeInTheDocument ( ) ;
134134 } ) ;
135135
136+ it ( 'shows issue summary and "Fix with Seer" when consent flow is removed and there is no autofix quota' , async ( ) => {
137+ const orgWithConsentFlowRemoved = OrganizationFixture ( {
138+ hideAiFeatures : false ,
139+ features : [ 'gen-ai-features' , 'gen-ai-consent-flow-removal' ] ,
140+ } ) ;
141+
142+ MockApiClient . addMockResponse ( {
143+ url : `/organizations/${ mockProject . organization . slug } /issues/${ mockGroup . id } /autofix/setup/` ,
144+ body : AutofixSetupFixture ( {
145+ setupAcknowledgement : {
146+ orgHasAcknowledged : true ,
147+ userHasAcknowledged : true ,
148+ } ,
149+ integration : { ok : true , reason : null } ,
150+ githubWriteIntegration : { ok : true , repos : [ ] } ,
151+ billing : { hasAutofixQuota : false } ,
152+ } ) ,
153+ } ) ;
154+ MockApiClient . addMockResponse ( {
155+ url : `/organizations/${ mockProject . organization . slug } /issues/${ mockGroup . id } /summarize/` ,
156+ method : 'POST' ,
157+ body : { whatsWrong : 'Test summary' , possibleCause : 'You did it wrong' } ,
158+ } ) ;
159+
160+ render ( < SeerSection event = { mockEvent } group = { mockGroup } project = { mockProject } /> , {
161+ organization : orgWithConsentFlowRemoved ,
162+ } ) ;
163+
164+ await waitFor ( ( ) => {
165+ expect ( screen . queryByTestId ( 'loading-placeholder' ) ) . not . toBeInTheDocument ( ) ;
166+ } ) ;
167+
168+ expect ( screen . getByText ( / i n i t i a l g u e s s / i) ) . toBeInTheDocument ( ) ;
169+ // Should show issue summary
170+ expect ( await screen . findByText ( 'You did it wrong' ) ) . toBeInTheDocument ( ) ;
171+ expect ( screen . getByRole ( 'button' , { name : 'Fix with Seer' } ) ) . toBeInTheDocument ( ) ;
172+ } ) ;
173+
136174 it ( 'shows "Find Root Cause" even when autofix needs setup' , async ( ) => {
137175 MockApiClient . addMockResponse ( {
138176 url : `/organizations/${ mockProject . organization . slug } /issues/${ mockGroup . id } /autofix/setup/` ,
0 commit comments