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