groupEventDetails.spec.tsx 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714
  1. import type {Location} from 'history';
  2. import {CommitFixture} from 'sentry-fixture/commit';
  3. import {CommitAuthorFixture} from 'sentry-fixture/commitAuthor';
  4. import {EventFixture} from 'sentry-fixture/event';
  5. import {GroupFixture} from 'sentry-fixture/group';
  6. import {LocationFixture} from 'sentry-fixture/locationFixture';
  7. import {ProjectFixture} from 'sentry-fixture/project';
  8. import {RouterFixture} from 'sentry-fixture/routerFixture';
  9. import {SentryAppFixture} from 'sentry-fixture/sentryApp';
  10. import {SentryAppComponentFixture} from 'sentry-fixture/sentryAppComponent';
  11. import {SentryAppInstallationFixture} from 'sentry-fixture/sentryAppInstallation';
  12. import {initializeOrg} from 'sentry-test/initializeOrg';
  13. import {render, screen, waitFor, within} from 'sentry-test/reactTestingLibrary';
  14. import type {Event} from 'sentry/types/event';
  15. import {EntryType} from 'sentry/types/event';
  16. import type {Group} from 'sentry/types/group';
  17. import {IssueCategory, IssueType} from 'sentry/types/group';
  18. import type {InjectedRouter} from 'sentry/types/legacyReactRouter';
  19. import type {Organization} from 'sentry/types/organization';
  20. import type {Project} from 'sentry/types/project';
  21. import {browserHistory} from 'sentry/utils/browserHistory';
  22. import type {QuickTraceEvent} from 'sentry/utils/performance/quickTrace/types';
  23. import type {GroupEventDetailsProps} from 'sentry/views/issueDetails/groupEventDetails/groupEventDetails';
  24. import GroupEventDetails from 'sentry/views/issueDetails/groupEventDetails/groupEventDetails';
  25. import {ReprocessingStatus} from 'sentry/views/issueDetails/utils';
  26. import {RouteContext} from 'sentry/views/routeContext';
  27. const TRACE_ID = '797cda4e24844bdc90e0efe741616047';
  28. const makeDefaultMockData = (
  29. organization?: Organization,
  30. project?: Project,
  31. query?: Record<string, string | string[]>
  32. ): {
  33. event: Event;
  34. group: Group;
  35. organization: Organization;
  36. project: Project;
  37. router: InjectedRouter;
  38. } => {
  39. return {
  40. organization: organization ?? initializeOrg().organization,
  41. project: project ?? initializeOrg().project,
  42. group: GroupFixture(),
  43. router: RouterFixture({
  44. location: LocationFixture({
  45. query: query ?? {},
  46. }),
  47. }),
  48. event: EventFixture({
  49. size: 1,
  50. dateCreated: '2019-03-20T00:00:00.000Z',
  51. errors: [],
  52. entries: [],
  53. tags: [
  54. {key: 'environment', value: 'dev'},
  55. {key: 'mechanism', value: 'ANR'},
  56. ],
  57. contexts: {
  58. app: {
  59. app_start_time: '2021-08-31T15:14:21Z',
  60. device_app_hash: '0b77c3f2567d65fe816e1fa7013779fbe3b51633',
  61. build_type: 'test',
  62. app_identifier: 'io.sentry.sample.iOS-Swift',
  63. app_name: 'iOS-Swift',
  64. app_version: '7.2.3',
  65. app_build: '390',
  66. app_id: 'B2690307-FDD1-3D34-AA1E-E280A9C2406C',
  67. type: 'app',
  68. },
  69. device: {
  70. family: 'iOS',
  71. model: 'iPhone13,4',
  72. model_id: 'D54pAP',
  73. memory_size: 5987008512,
  74. free_memory: 154435584,
  75. usable_memory: 4706893824,
  76. storage_size: 127881465856,
  77. boot_time: '2021-08-29T06:05:51Z',
  78. timezone: 'CEST',
  79. type: 'device',
  80. },
  81. os: {
  82. name: 'iOS',
  83. version: '14.7.1',
  84. build: '18G82',
  85. kernel_version:
  86. 'Darwin Kernel Version 20.6.0: Mon Jun 21 21:23:35 PDT 2021; root:xnu-7195.140.42~10/RELEASE_ARM64_T8101',
  87. rooted: false,
  88. type: 'os',
  89. },
  90. trace: {
  91. trace_id: TRACE_ID,
  92. span_id: 'b0e6f15b45c36b12',
  93. op: 'ui.action.click',
  94. type: 'trace',
  95. },
  96. },
  97. }),
  98. };
  99. };
  100. function TestComponent(
  101. props: Partial<GroupEventDetailsProps> & {
  102. organization?: Organization;
  103. query?: Record<string, string | string[]>;
  104. }
  105. ) {
  106. const {organization, project, group, event, router} = makeDefaultMockData(
  107. props.organization,
  108. props.project,
  109. props.query ?? {environment: ['dev']}
  110. );
  111. const mergedProps: GroupEventDetailsProps = {
  112. group,
  113. event,
  114. project,
  115. params: {groupId: group.id, orgId: organization.slug, eventId: '1'},
  116. router,
  117. location: {} as Location<any>,
  118. route: {},
  119. eventError: props.eventError ?? false,
  120. groupReprocessingStatus:
  121. props.groupReprocessingStatus ?? ReprocessingStatus.NO_STATUS,
  122. onRetry: props?.onRetry ?? jest.fn(),
  123. loadingEvent: props.loadingEvent ?? false,
  124. routes: [],
  125. routeParams: {},
  126. ...props,
  127. };
  128. return (
  129. <RouteContext.Provider
  130. value={{
  131. router,
  132. location: router.location,
  133. params: router.params,
  134. routes: router.routes,
  135. }}
  136. >
  137. <GroupEventDetails {...mergedProps} />
  138. </RouteContext.Provider>
  139. );
  140. }
  141. const mockedTrace = (project: Project) => {
  142. return {
  143. event_id: '8806ea4691c24fc7b1c77ecd78df574f',
  144. span_id: 'b0e6f15b45c36b12',
  145. transaction: 'MainActivity.add_attachment',
  146. 'transaction.duration': 1000,
  147. 'transaction.op': 'navigation',
  148. project_id: parseInt(project.id, 10),
  149. project_slug: project.slug,
  150. parent_span_id: null,
  151. parent_event_id: null,
  152. generation: 0,
  153. errors: [
  154. {
  155. event_id: 'c6971a73454646338bc3ec80c70f8891',
  156. issue_id: 104,
  157. span: 'b0e6f15b45c36b12',
  158. project_id: parseInt(project.id, 10),
  159. project_slug: project.slug,
  160. title: 'ApplicationNotResponding: ANR for at least 5000 ms.',
  161. message: 'ANR for at least 5000 ms.',
  162. level: 'error',
  163. issue: '',
  164. },
  165. ],
  166. performance_issues: [
  167. {
  168. event_id: '8806ea4691c24fc7b1c77ecd78df574f',
  169. issue_id: 110,
  170. issue_short_id: 'SENTRY-ANDROID-1R',
  171. span: ['b0e6f15b45c36b12'],
  172. suspect_spans: ['89930aab9a0314d4'],
  173. project_id: parseInt(project.id, 10),
  174. project_slug: project.slug,
  175. title: 'File IO on Main Thread',
  176. message: 'File IO on Main Thread',
  177. level: 'info',
  178. culprit: 'MainActivity.add_attachment',
  179. type: 1008,
  180. end: 1678290375.15056,
  181. start: 1678290374.150562,
  182. },
  183. ],
  184. timestamp: 1678290375.150561,
  185. start_timestamp: 1678290374.150561,
  186. children: [],
  187. } as QuickTraceEvent;
  188. };
  189. const mockGroupApis = (
  190. organization: Organization,
  191. project: Project,
  192. group: Group,
  193. event: Event,
  194. replayId?: string,
  195. trace?: QuickTraceEvent
  196. ) => {
  197. MockApiClient.addMockResponse({
  198. url: `/organizations/${organization.slug}/issues/${group.id}/`,
  199. body: group,
  200. });
  201. MockApiClient.addMockResponse({
  202. url: `/organizations/${organization.slug}/replays/${replayId}/`,
  203. body: {},
  204. });
  205. MockApiClient.addMockResponse({
  206. url: `/projects/${organization.slug}/${project.slug}/issues/`,
  207. method: 'PUT',
  208. });
  209. MockApiClient.addMockResponse({
  210. url: `/projects/${organization.slug}/${project.slug}/events/${event.id}/committers/`,
  211. body: {committers: []},
  212. });
  213. MockApiClient.addMockResponse({
  214. url: `/projects/${organization.slug}/${project.slug}/events/${event.id}/owners/`,
  215. body: {owners: [], rules: []},
  216. });
  217. MockApiClient.addMockResponse({
  218. url: `/organizations/${organization.slug}/issues/${group.id}/tags/`,
  219. body: [],
  220. });
  221. MockApiClient.addMockResponse({
  222. url: `/organizations/${organization.slug}/events-trace/${TRACE_ID}/`,
  223. body: trace
  224. ? {transactions: [trace], orphan_errors: []}
  225. : {transactions: [], orphan_errors: []},
  226. });
  227. MockApiClient.addMockResponse({
  228. url: `/organizations/${organization.slug}/events-trace-light/${TRACE_ID}/`,
  229. body: trace
  230. ? {transactions: [trace], orphan_errors: []}
  231. : {transactions: [], orphan_errors: []},
  232. });
  233. MockApiClient.addMockResponse({
  234. url: `/organizations/${organization.slug}/issues/${group.id}/integrations/`,
  235. body: [],
  236. });
  237. MockApiClient.addMockResponse({
  238. url: `/organizations/${organization.slug}/issues/${group.id}/external-issues/`,
  239. body: [],
  240. });
  241. MockApiClient.addMockResponse({
  242. url: `/organizations/${organization.slug}/issues/${group.id}/current-release/`,
  243. body: {currentRelease: null},
  244. });
  245. MockApiClient.addMockResponse({
  246. url: `/organizations/${organization.slug}/prompts-activity/`,
  247. body: {data: {}, features: {['issue_feedback_hidden']: {}}},
  248. });
  249. MockApiClient.addMockResponse({
  250. url: `/organizations/${organization.slug}/prompts-activity/`,
  251. method: 'PUT',
  252. });
  253. MockApiClient.addMockResponse({
  254. url: `/organizations/${organization.slug}/has-mobile-app-events/`,
  255. body: null,
  256. });
  257. MockApiClient.addMockResponse({
  258. url: `/projects/${organization.slug}/${project.slug}/events/${event.id}/grouping-info/`,
  259. body: {},
  260. });
  261. MockApiClient.addMockResponse({
  262. url: `/projects/${organization.slug}/${project.slug}/codeowners/`,
  263. body: [],
  264. });
  265. MockApiClient.addMockResponse({
  266. url: `/organizations/${organization.slug}/code-mappings/`,
  267. method: 'GET',
  268. body: [],
  269. });
  270. MockApiClient.addMockResponse({
  271. url: `/projects/${organization.slug}/${project.slug}/events/${event.id}/actionable-items/`,
  272. body: {
  273. errors: [],
  274. },
  275. });
  276. // Sentry related mocks
  277. MockApiClient.addMockResponse({
  278. url: '/sentry-apps/',
  279. body: [],
  280. });
  281. MockApiClient.addMockResponse({
  282. url: `/organizations/${organization.slug}/sentry-apps/`,
  283. body: [],
  284. });
  285. MockApiClient.addMockResponse({
  286. url: `/organizations/${organization.slug}/sentry-app-installations/`,
  287. body: [],
  288. });
  289. MockApiClient.addMockResponse({
  290. url: `/organizations/${organization.slug}/sentry-app-components/`,
  291. body: [],
  292. match: [MockApiClient.matchQuery({projectId: project.id})],
  293. });
  294. MockApiClient.addMockResponse({
  295. url: '/projects/org-slug/project-slug/',
  296. body: project,
  297. });
  298. MockApiClient.addMockResponse({
  299. url: '/organizations/org-slug/users/',
  300. body: [],
  301. });
  302. MockApiClient.addMockResponse({
  303. url: '/organizations/org-slug/projects/',
  304. body: [project],
  305. });
  306. MockApiClient.addMockResponse({
  307. url: `/customers/org-slug/policies/`,
  308. body: {},
  309. });
  310. MockApiClient.addMockResponse({
  311. url: `/organizations/${organization.slug}/issues/${group.id}/first-last-release/`,
  312. method: 'GET',
  313. });
  314. MockApiClient.addMockResponse({
  315. url: `/organizations/${organization.slug}/events/`,
  316. body: {
  317. data: [],
  318. meta: {fields: {}, units: {}},
  319. },
  320. });
  321. MockApiClient.addMockResponse({
  322. url: `/projects/${organization.slug}/${project.slug}/`,
  323. body: project,
  324. });
  325. MockApiClient.addMockResponse({
  326. url: `/issues/${group.id}/autofix/setup/`,
  327. method: 'GET',
  328. body: {
  329. integration: {
  330. ok: true,
  331. },
  332. genAIConsent: {
  333. ok: true,
  334. },
  335. githubWriteIntegration: {
  336. ok: true,
  337. },
  338. },
  339. });
  340. };
  341. describe('groupEventDetails', () => {
  342. beforeEach(() => {
  343. MockApiClient.clearMockResponses();
  344. });
  345. afterEach(function () {
  346. MockApiClient.clearMockResponses();
  347. jest.mocked(browserHistory.replace).mockClear();
  348. });
  349. it('redirects on switching to an invalid environment selection for event', async function () {
  350. const props = makeDefaultMockData();
  351. mockGroupApis(props.organization, props.project, props.group, props.event);
  352. const {rerender} = render(<TestComponent {...props} />);
  353. expect(browserHistory.replace).not.toHaveBeenCalled();
  354. rerender(<TestComponent query={{environment: ['prod']}} />);
  355. await waitFor(() => expect(browserHistory.replace).toHaveBeenCalled());
  356. });
  357. it('does not redirect when switching to a valid environment selection for event', async function () {
  358. const props = makeDefaultMockData();
  359. mockGroupApis(props.organization, props.project, props.group, props.event);
  360. const {rerender} = render(<TestComponent {...props} />);
  361. expect(browserHistory.replace).not.toHaveBeenCalled();
  362. rerender(<TestComponent query={{environment: []}} />);
  363. expect(await screen.findByTestId('group-event-details')).toBeInTheDocument();
  364. expect(browserHistory.replace).not.toHaveBeenCalled();
  365. });
  366. it('displays error on event error', async function () {
  367. const props = makeDefaultMockData();
  368. mockGroupApis(
  369. props.organization,
  370. props.project,
  371. props.group,
  372. EventFixture({
  373. size: 1,
  374. dateCreated: '2019-03-20T00:00:00.000Z',
  375. errors: [],
  376. entries: [],
  377. tags: [{key: 'environment', value: 'dev'}],
  378. previousEventID: 'prev-event-id',
  379. nextEventID: 'next-event-id',
  380. })
  381. );
  382. render(<TestComponent event={undefined} eventError />);
  383. expect(
  384. await screen.findByText(/events for this issue could not be found/)
  385. ).toBeInTheDocument();
  386. });
  387. it('renders the Span Evidence and Resources section for Performance Issues', async function () {
  388. const props = makeDefaultMockData();
  389. const group: Group = GroupFixture({
  390. issueCategory: IssueCategory.PERFORMANCE,
  391. issueType: IssueType.PERFORMANCE_N_PLUS_ONE_DB_QUERIES,
  392. });
  393. const transaction = EventFixture({
  394. entries: [{type: EntryType.SPANS, data: []}],
  395. });
  396. mockGroupApis(
  397. props.organization,
  398. props.project,
  399. props.group,
  400. EventFixture({
  401. size: 1,
  402. dateCreated: '2019-03-20T00:00:00.000Z',
  403. errors: [],
  404. entries: [],
  405. tags: [{key: 'environment', value: 'dev'}],
  406. previousEventID: 'prev-event-id',
  407. nextEventID: 'next-event-id',
  408. })
  409. );
  410. render(<TestComponent group={group} event={transaction} />, {
  411. organization: props.organization,
  412. });
  413. expect(
  414. await screen.findByRole('heading', {
  415. name: /span evidence/i,
  416. })
  417. ).toBeInTheDocument();
  418. expect(
  419. screen.getByRole('heading', {
  420. name: /resources/i,
  421. })
  422. ).toBeInTheDocument();
  423. });
  424. it('renders the Function Evidence and Resources section for Profile Issues', async function () {
  425. const props = makeDefaultMockData();
  426. const group: Group = GroupFixture({
  427. issueCategory: IssueCategory.PERFORMANCE,
  428. issueType: IssueType.PROFILE_FILE_IO_MAIN_THREAD,
  429. });
  430. const transaction = EventFixture({
  431. entries: [],
  432. occurrence: {
  433. evidenceDisplay: [],
  434. evidenceData: {
  435. templateName: 'profile',
  436. },
  437. type: 2001,
  438. },
  439. });
  440. mockGroupApis(
  441. props.organization,
  442. props.project,
  443. props.group,
  444. EventFixture({
  445. size: 1,
  446. dateCreated: '2019-03-20T00:00:00.000Z',
  447. errors: [],
  448. entries: [],
  449. tags: [{key: 'environment', value: 'dev'}],
  450. previousEventID: 'prev-event-id',
  451. nextEventID: 'next-event-id',
  452. })
  453. );
  454. render(<TestComponent group={group} event={transaction} />, {});
  455. expect(
  456. await screen.findByRole('heading', {
  457. name: /function evidence/i,
  458. })
  459. ).toBeInTheDocument();
  460. expect(
  461. screen.getByRole('heading', {
  462. name: /resources/i,
  463. })
  464. ).toBeInTheDocument();
  465. });
  466. it('renders event tags ui', async () => {
  467. const props = makeDefaultMockData();
  468. mockGroupApis(props.organization, props.project, props.group, props.event);
  469. render(<TestComponent group={props.group} event={props.event} />, {});
  470. expect(await screen.findByText('Event ID:')).toBeInTheDocument();
  471. expect(screen.queryByTestId('context-summary')).not.toBeInTheDocument();
  472. expect(screen.getByTestId('event-tags')).toBeInTheDocument();
  473. const highlights = screen.getByTestId('event-highlights');
  474. expect(
  475. within(highlights).getByRole('button', {name: 'View All'})
  476. ).toBeInTheDocument();
  477. expect(within(highlights).getByRole('button', {name: 'Edit'})).toBeInTheDocument();
  478. // No highlights setup
  479. expect(
  480. within(highlights).getByRole('button', {name: 'Add Highlights'})
  481. ).toBeInTheDocument();
  482. expect(screen.getByText("There's nothing here...")).toBeInTheDocument();
  483. });
  484. });
  485. describe('EventCause', () => {
  486. beforeEach(() => {
  487. MockApiClient.clearMockResponses();
  488. });
  489. afterEach(function () {
  490. MockApiClient.clearMockResponses();
  491. jest.mocked(browserHistory.replace).mockClear();
  492. });
  493. it('renders suspect commit', async function () {
  494. const props = makeDefaultMockData(
  495. undefined,
  496. ProjectFixture({firstEvent: EventFixture().dateCreated})
  497. );
  498. mockGroupApis(
  499. props.organization,
  500. props.project,
  501. props.group,
  502. EventFixture({
  503. size: 1,
  504. dateCreated: '2019-03-20T00:00:00.000Z',
  505. errors: [],
  506. entries: [],
  507. tags: [{key: 'environment', value: 'dev'}],
  508. previousEventID: 'prev-event-id',
  509. nextEventID: 'next-event-id',
  510. })
  511. );
  512. MockApiClient.addMockResponse({
  513. url: `/projects/${props.organization.slug}/${props.project.slug}/events/${props.event.id}/committers/`,
  514. body: {
  515. committers: [
  516. {
  517. commits: [CommitFixture({author: CommitAuthorFixture()})],
  518. author: CommitAuthorFixture(),
  519. },
  520. ],
  521. },
  522. });
  523. render(<TestComponent project={props.project} />);
  524. expect(await screen.findByTestId(/suspect-commit/)).toBeInTheDocument();
  525. });
  526. });
  527. describe('Platform Integrations', () => {
  528. let componentsRequest;
  529. beforeEach(() => {
  530. MockApiClient.clearMockResponses();
  531. });
  532. it('loads Integration UI components', async () => {
  533. const props = makeDefaultMockData();
  534. const unpublishedIntegration = SentryAppFixture({status: 'unpublished'});
  535. const internalIntegration = SentryAppFixture({status: 'internal'});
  536. const unpublishedInstall = SentryAppInstallationFixture({
  537. app: {
  538. slug: unpublishedIntegration.slug,
  539. uuid: unpublishedIntegration.uuid,
  540. },
  541. });
  542. const internalInstall = SentryAppInstallationFixture({
  543. app: {
  544. slug: internalIntegration.slug,
  545. uuid: internalIntegration.uuid,
  546. },
  547. });
  548. mockGroupApis(
  549. props.organization,
  550. props.project,
  551. props.group,
  552. EventFixture({
  553. size: 1,
  554. dateCreated: '2019-03-20T00:00:00.000Z',
  555. errors: [],
  556. entries: [],
  557. tags: [{key: 'environment', value: 'dev'}],
  558. previousEventID: 'prev-event-id',
  559. nextEventID: 'next-event-id',
  560. })
  561. );
  562. const component = SentryAppComponentFixture({
  563. sentryApp: {
  564. uuid: unpublishedIntegration.uuid,
  565. slug: unpublishedIntegration.slug,
  566. name: unpublishedIntegration.name,
  567. },
  568. });
  569. MockApiClient.addMockResponse({
  570. url: `/organizations/${props.organization.slug}/sentry-app-installations/`,
  571. body: [unpublishedInstall, internalInstall],
  572. });
  573. componentsRequest = MockApiClient.addMockResponse({
  574. url: `/organizations/${props.organization.slug}/sentry-app-components/`,
  575. body: [component],
  576. match: [MockApiClient.matchQuery({projectId: props.project.id})],
  577. });
  578. render(<TestComponent />);
  579. expect(await screen.findByText('Sample App Issue')).toBeInTheDocument();
  580. expect(componentsRequest).toHaveBeenCalled();
  581. });
  582. describe('ANR Root Cause', () => {
  583. beforeEach(() => {
  584. MockApiClient.clearMockResponses();
  585. });
  586. it('shows anr root cause', async () => {
  587. const props = makeDefaultMockData();
  588. mockGroupApis(
  589. props.organization,
  590. props.project,
  591. props.group,
  592. props.event,
  593. undefined,
  594. mockedTrace(props.project)
  595. );
  596. render(<TestComponent group={props.group} event={props.event} />, {
  597. organization: props.organization,
  598. });
  599. expect(
  600. await screen.findByRole('heading', {
  601. name: /suspect root cause/i,
  602. })
  603. ).toBeInTheDocument();
  604. expect(screen.getByText('File IO on Main Thread')).toBeInTheDocument();
  605. });
  606. it('does not render root issues section if related perf issues do not exist', async () => {
  607. const props = makeDefaultMockData();
  608. const trace = mockedTrace(props.project);
  609. mockGroupApis(
  610. props.organization,
  611. props.project,
  612. props.group,
  613. props.event,
  614. undefined,
  615. {
  616. ...trace,
  617. performance_issues: [],
  618. }
  619. );
  620. render(<TestComponent group={props.group} event={props.event} />, {
  621. organization: props.organization,
  622. });
  623. // mechanism: ANR
  624. expect(await screen.findByText('ANR')).toBeInTheDocument();
  625. expect(
  626. screen.queryByRole('heading', {
  627. name: /suspect root issues/i,
  628. })
  629. ).not.toBeInTheDocument();
  630. expect(screen.queryByText('File IO on Main Thread')).not.toBeInTheDocument();
  631. });
  632. });
  633. });