Skip to content

Commit a8c8cca

Browse files
authored
feat(alerts): Remove "Related issues" from incidents (#16379)
This removes the UI components that fetch and render related issues on the Incidents details view.
1 parent 7f451b2 commit a8c8cca

File tree

4 files changed

+0
-221
lines changed

4 files changed

+0
-221
lines changed

src/sentry/static/sentry/app/views/incidents/details/body.tsx

-3
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import space from 'app/styles/space';
1616
import theme from 'app/utils/theme';
1717

1818
import Activity from './activity';
19-
import RelatedIssues from './relatedIssues';
2019
import Suspects from './suspects';
2120

2221
import {Incident} from '../types';
@@ -87,8 +86,6 @@ export default class DetailsBody extends React.Component<Props> {
8786
</div>
8887

8988
<Suspects {...this.props} />
90-
91-
<RelatedIssues params={params} incident={incident} />
9289
</PageContent>
9390
</Sidebar>
9491
</StyledPageContent>

src/sentry/static/sentry/app/views/incidents/details/relatedIssues/index.tsx

-85
This file was deleted.

src/sentry/static/sentry/app/views/incidents/details/relatedIssues/issuesFetcher.tsx

-67
This file was deleted.

tests/js/spec/views/incidents/details/index.spec.jsx

-66
Original file line numberDiff line numberDiff line change
@@ -174,70 +174,4 @@ describe('IncidentDetails', function() {
174174
wrapper.find('SubscribeButton').simulate('click');
175175
expect(subscribe).toHaveBeenCalled();
176176
});
177-
178-
it('loads related incidents', async function() {
179-
MockApiClient.addMockResponse({
180-
url: '/issues/1/',
181-
body: TestStubs.Group({
182-
id: '1',
183-
organization,
184-
}),
185-
});
186-
MockApiClient.addMockResponse({
187-
url: '/issues/2/',
188-
body: TestStubs.Group({
189-
id: '2',
190-
organization,
191-
}),
192-
});
193-
MockApiClient.addMockResponse({
194-
url: '/organizations/org-slug/incidents/123/',
195-
body: {
196-
...mockIncident,
197-
198-
groups: ['1', '2'],
199-
},
200-
});
201-
202-
const wrapper = createWrapper();
203-
204-
await tick();
205-
wrapper.update();
206-
207-
expect(wrapper.find('RelatedItem')).toHaveLength(2);
208-
209-
expect(
210-
wrapper
211-
.find('RelatedItem Title')
212-
.at(0)
213-
.text()
214-
).toBe('RequestErrorfetchData(app/components/group/suggestedOwners)');
215-
216-
expect(
217-
wrapper
218-
.find('RelatedItem GroupShortId')
219-
.at(0)
220-
.text()
221-
).toBe('JAVASCRIPT-6QS');
222-
});
223-
224-
it('renders incident without issues', async function() {
225-
MockApiClient.addMockResponse({
226-
url: '/organizations/org-slug/incidents/123/',
227-
body: {
228-
...mockIncident,
229-
groups: [],
230-
},
231-
});
232-
233-
const wrapper = createWrapper();
234-
235-
expect(wrapper.find('RelatedIssues Placeholder')).toHaveLength(1);
236-
237-
await tick();
238-
wrapper.update();
239-
240-
expect(wrapper.find('RelatedItem')).toHaveLength(0);
241-
expect(wrapper.find('RelatedIssues Placeholder')).toHaveLength(0);
242-
});
243177
});

0 commit comments

Comments
 (0)