Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions static/app/components/events/autofix/v3/nextStep.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,25 @@ describe('SeerDrawerNextStep', () => {
expect(autofix.startStep).toHaveBeenCalledWith('solution', 1);
});

it('shows coding agent dropdown with Add Integration CTA when no integrations exist', async () => {
const autofix = makeAutofix();
render(
<SeerDrawerNextStep
group={GroupFixture()}
sections={[makeSection('root_cause')]}
autofix={autofix}
/>
);
await userEvent.click(
await screen.findByRole('button', {name: 'More code fix options'})
);
const addIntegrationLink = screen.getByRole('button', {name: 'Add Integration'});
expect(addIntegrationLink).toHaveAttribute(
'href',
'/settings/org-slug/integrations/?category=coding%20agent'
);
});

it('shows coding agent dropdown when integrations exist', async () => {
MockApiClient.addMockResponse({
url: '/organizations/org-slug/integrations/coding-agents/',
Expand Down
5 changes: 3 additions & 2 deletions static/app/components/events/autofix/v3/nextStep.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -342,9 +342,10 @@ function NextStepTemplate({
<Button priority="primary" disabled={isProcessing} onClick={onClickYes}>
{labelYes}
</Button>
{codingAgentOptions?.length ? (
{codingAgentIntegrations === undefined ? null : (
<DropdownMenu
items={codingAgentOptions}
isDisabled={false}
trigger={(triggerProps, isOpen) => (
<Button
{...triggerProps}
Expand All @@ -367,7 +368,7 @@ function NextStepTemplate({
</DropdownMenuFooter>
}
/>
) : null}
)}
Comment thread
cursor[bot] marked this conversation as resolved.
</ButtonBar>
</Flex>
</Flex>
Expand Down
Loading