groupActivity.spec.tsx 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767
  1. import {GroupFixture} from 'sentry-fixture/group';
  2. import {OrganizationFixture} from 'sentry-fixture/organization';
  3. import {ProjectFixture} from 'sentry-fixture/project';
  4. import {ReleaseFixture} from 'sentry-fixture/release';
  5. import {RepositoryFixture} from 'sentry-fixture/repository';
  6. import {TeamFixture} from 'sentry-fixture/team';
  7. import {UserFixture} from 'sentry-fixture/user';
  8. import {initializeOrg} from 'sentry-test/initializeOrg';
  9. import {
  10. act,
  11. render,
  12. renderGlobalModal,
  13. screen,
  14. userEvent,
  15. waitFor,
  16. } from 'sentry-test/reactTestingLibrary';
  17. import ConfigStore from 'sentry/stores/configStore';
  18. import GroupStore from 'sentry/stores/groupStore';
  19. import OrganizationStore from 'sentry/stores/organizationStore';
  20. import ProjectsStore from 'sentry/stores/projectsStore';
  21. import TeamStore from 'sentry/stores/teamStore';
  22. import type {Group, Organization as TOrganization, Project} from 'sentry/types';
  23. import {GroupActivityType, PriorityLevel} from 'sentry/types';
  24. import useOrganization from 'sentry/utils/useOrganization';
  25. import GroupActivity from 'sentry/views/issueDetails/groupActivity';
  26. jest.mock('sentry/utils/useOrganization');
  27. describe('GroupActivity', function () {
  28. let project!: Project;
  29. const dateCreated = '2021-10-01T15:31:38.950115Z';
  30. beforeEach(function () {
  31. project = ProjectFixture();
  32. ProjectsStore.loadInitialData([project]);
  33. ConfigStore.init();
  34. ConfigStore.set('user', UserFixture({id: '123'}));
  35. GroupStore.init();
  36. });
  37. afterEach(() => {
  38. MockApiClient.clearMockResponses();
  39. jest.clearAllMocks();
  40. });
  41. function createWrapper({
  42. activity,
  43. organization: additionalOrg,
  44. }: {
  45. activity?: Group['activity'];
  46. organization?: TOrganization;
  47. } = {}) {
  48. const group = GroupFixture({
  49. id: '1337',
  50. activity: activity ?? [
  51. {
  52. type: GroupActivityType.NOTE,
  53. id: 'note-1',
  54. data: {text: 'Test Note'},
  55. dateCreated: '2020-01-01T00:00:00',
  56. user: UserFixture(),
  57. project,
  58. },
  59. ],
  60. project,
  61. });
  62. const {organization, routerContext, routerProps} = initializeOrg({
  63. organization: additionalOrg,
  64. });
  65. jest.mocked(useOrganization).mockReturnValue(organization);
  66. GroupStore.add([group]);
  67. TeamStore.loadInitialData([TeamFixture({id: '999', slug: 'no-team'})]);
  68. OrganizationStore.onUpdate(organization, {replace: true});
  69. return render(
  70. <GroupActivity {...routerProps} params={{orgId: 'org-slug'}} group={group} />,
  71. {context: routerContext}
  72. );
  73. }
  74. it('renders a NoteInput', function () {
  75. createWrapper();
  76. expect(screen.getByTestId('activity-note-body')).toBeInTheDocument();
  77. });
  78. it('renders a marked reviewed activity', function () {
  79. const user = UserFixture({name: 'Samwise'});
  80. createWrapper({
  81. activity: [
  82. {
  83. type: GroupActivityType.MARK_REVIEWED,
  84. id: 'reviewed-1',
  85. dateCreated: '',
  86. project: ProjectFixture(),
  87. data: {},
  88. user,
  89. },
  90. ],
  91. });
  92. expect(screen.getByText('marked this issue as reviewed')).toBeInTheDocument();
  93. expect(screen.getByText(user.name)).toBeInTheDocument();
  94. });
  95. it('renders a pr activity', function () {
  96. const user = UserFixture({name: 'Test User'});
  97. const repository = RepositoryFixture();
  98. createWrapper({
  99. activity: [
  100. {
  101. dateCreated: '',
  102. project: ProjectFixture(),
  103. type: GroupActivityType.SET_RESOLVED_IN_PULL_REQUEST,
  104. id: 'pr-1',
  105. data: {
  106. pullRequest: {
  107. externalUrl: '',
  108. id: '',
  109. title: '',
  110. repository,
  111. },
  112. },
  113. user,
  114. },
  115. ],
  116. });
  117. expect(screen.getAllByTestId('activity-item').at(-1)).toHaveTextContent(
  118. 'Test User has created a PR for this issue:'
  119. );
  120. });
  121. it('renders a assigned to self activity', function () {
  122. const user = UserFixture({id: '123', name: 'Mark'});
  123. createWrapper({
  124. activity: [
  125. {
  126. data: {
  127. assignee: user.id,
  128. assigneeEmail: user.email,
  129. assigneeType: 'user',
  130. user,
  131. },
  132. user,
  133. dateCreated: '2021-10-01T15:31:38.950115Z',
  134. id: '117',
  135. project: ProjectFixture(),
  136. type: GroupActivityType.ASSIGNED,
  137. },
  138. ],
  139. });
  140. expect(screen.getAllByTestId('activity-item').at(-1)).toHaveTextContent(
  141. /Mark assigned this issue to themselves/
  142. );
  143. });
  144. it('renders an assigned via codeowners activity', function () {
  145. createWrapper({
  146. activity: [
  147. {
  148. data: {
  149. assignee: '123',
  150. assigneeEmail: 'anotheruser@sentry.io',
  151. assigneeType: 'user',
  152. integration: 'codeowners',
  153. rule: 'path:something/*.py #workflow',
  154. user: UserFixture(),
  155. },
  156. project: ProjectFixture(),
  157. dateCreated: '2021-10-01T15:31:38.950115Z',
  158. id: '117',
  159. type: GroupActivityType.ASSIGNED,
  160. user: null,
  161. },
  162. ],
  163. });
  164. expect(screen.getAllByTestId('activity-item').at(-1)).toHaveTextContent(
  165. /Sentry auto-assigned this issue to anotheruser@sentry.io/
  166. );
  167. });
  168. it('renders an assigned via slack activity', function () {
  169. const user = UserFixture({id: '301', name: 'Mark'});
  170. createWrapper({
  171. activity: [
  172. {
  173. data: {
  174. assignee: '123',
  175. assigneeEmail: 'anotheruser@sentry.io',
  176. assigneeType: 'user',
  177. integration: 'slack',
  178. user: UserFixture(),
  179. },
  180. project: ProjectFixture(),
  181. dateCreated: '2021-10-01T15:31:38.950115Z',
  182. id: '117',
  183. type: GroupActivityType.ASSIGNED,
  184. user,
  185. },
  186. ],
  187. });
  188. const item = screen.getAllByTestId('activity-item').at(-1);
  189. expect(item).toHaveTextContent(/Mark assigned this issue to anotheruser@sentry.io/);
  190. expect(item).toHaveTextContent(/Assigned via Slack/);
  191. });
  192. it('resolved in commit with no releases', function () {
  193. createWrapper({
  194. activity: [
  195. {
  196. type: GroupActivityType.SET_RESOLVED_IN_COMMIT,
  197. id: '123',
  198. project: ProjectFixture(),
  199. dateCreated: '',
  200. data: {
  201. commit: {
  202. dateCreated: '',
  203. message: '',
  204. id: 'komal-commit',
  205. repository: RepositoryFixture(),
  206. releases: [],
  207. },
  208. },
  209. user: UserFixture(),
  210. },
  211. ],
  212. });
  213. expect(screen.getAllByTestId('activity-item').at(-1)).toHaveTextContent(
  214. 'Foo Bar marked this issue as resolved in komal-commit'
  215. );
  216. });
  217. it('resolved in commit with one release', function () {
  218. createWrapper({
  219. activity: [
  220. {
  221. type: GroupActivityType.SET_RESOLVED_IN_COMMIT,
  222. id: '123',
  223. project: ProjectFixture(),
  224. dateCreated: '',
  225. data: {
  226. commit: {
  227. id: 'komal-commit',
  228. dateCreated: '',
  229. message: '',
  230. repository: RepositoryFixture(),
  231. releases: [
  232. ReleaseFixture({
  233. dateCreated: '2022-05-01',
  234. dateReleased: '2022-05-02',
  235. version: 'random',
  236. }),
  237. ],
  238. },
  239. },
  240. user: UserFixture(),
  241. },
  242. ],
  243. });
  244. expect(screen.getAllByTestId('activity-item').at(-1)).toHaveTextContent(
  245. 'Foo Bar marked this issue as resolved in komal-commit This commit was released in random'
  246. );
  247. });
  248. it('resolved in commit with multiple releases', function () {
  249. createWrapper({
  250. activity: [
  251. {
  252. type: GroupActivityType.SET_RESOLVED_IN_COMMIT,
  253. id: '123',
  254. project: ProjectFixture(),
  255. dateCreated: '',
  256. data: {
  257. commit: {
  258. id: 'komal-commit',
  259. dateCreated: '',
  260. message: '',
  261. repository: RepositoryFixture(),
  262. releases: [
  263. ReleaseFixture({
  264. dateCreated: '2022-05-01',
  265. dateReleased: '2022-05-02',
  266. version: 'random',
  267. }),
  268. ReleaseFixture({
  269. dateCreated: '2022-06-01',
  270. dateReleased: '2022-06-02',
  271. version: 'newest',
  272. }),
  273. ReleaseFixture({
  274. dateCreated: '2021-08-03',
  275. dateReleased: '2021-08-03',
  276. version: 'oldest-release',
  277. }),
  278. ReleaseFixture({
  279. dateCreated: '2022-04-21',
  280. dateReleased: '2022-04-21',
  281. version: 'randomTwo',
  282. }),
  283. ],
  284. },
  285. },
  286. user: UserFixture(),
  287. },
  288. ],
  289. });
  290. expect(screen.getAllByTestId('activity-item').at(-1)).toHaveTextContent(
  291. 'Foo Bar marked this issue as resolved in komal-commit This commit was released in oldest-release and 3 others'
  292. );
  293. });
  294. it('requests assignees that are not in the team store', async function () {
  295. const team = TeamFixture({id: '123', name: 'workflow'});
  296. const teamRequest = MockApiClient.addMockResponse({
  297. url: `/organizations/org-slug/teams/`,
  298. body: [team],
  299. });
  300. createWrapper({
  301. activity: [
  302. {
  303. id: '123',
  304. user: null,
  305. type: GroupActivityType.ASSIGNED,
  306. project: ProjectFixture(),
  307. data: {
  308. assignee: team.id,
  309. assigneeType: 'team',
  310. user: UserFixture(),
  311. },
  312. dateCreated: '2021-10-28T13:40:10.634821Z',
  313. },
  314. ],
  315. });
  316. await waitFor(() => expect(teamRequest).toHaveBeenCalledTimes(1));
  317. expect(
  318. await screen.findByText(`assigned this issue to #${team.slug}`)
  319. ).toBeInTheDocument();
  320. expect(screen.getAllByTestId('activity-item').at(-1)).toHaveTextContent(
  321. /Sentry assigned this issue to #team-slug/
  322. );
  323. });
  324. describe('Delete', function () {
  325. let deleteMock;
  326. beforeEach(function () {
  327. deleteMock = MockApiClient.addMockResponse({
  328. url: '/organizations/org-slug/issues/1337/comments/note-1/',
  329. method: 'DELETE',
  330. });
  331. ConfigStore.set('user', UserFixture({id: '123', isSuperuser: true}));
  332. });
  333. it('should do nothing if not present in GroupStore', async function () {
  334. createWrapper();
  335. renderGlobalModal();
  336. act(() => {
  337. // Remove note from group activity
  338. GroupStore.removeActivity('1337', 'note-1');
  339. });
  340. await userEvent.click(screen.getByRole('button', {name: 'Comment Actions'}));
  341. await userEvent.click(screen.getByRole('menuitemradio', {name: 'Remove'}));
  342. expect(
  343. screen.getByText('Are you sure you wish to delete this comment?')
  344. ).toBeInTheDocument();
  345. await userEvent.click(screen.getByRole('button', {name: 'Confirm'}));
  346. expect(deleteMock).not.toHaveBeenCalled();
  347. });
  348. it('should remove remove the item from the GroupStore make a DELETE API request', async function () {
  349. createWrapper();
  350. renderGlobalModal();
  351. await userEvent.click(screen.getByRole('button', {name: 'Comment Actions'}));
  352. await userEvent.click(screen.getByRole('menuitemradio', {name: 'Remove'}));
  353. expect(
  354. screen.getByText('Are you sure you wish to delete this comment?')
  355. ).toBeInTheDocument();
  356. await userEvent.click(screen.getByRole('button', {name: 'Confirm'}));
  357. expect(deleteMock).toHaveBeenCalledTimes(1);
  358. });
  359. });
  360. it('renders archived until escalating', function () {
  361. createWrapper({
  362. activity: [
  363. {
  364. id: '123',
  365. type: GroupActivityType.SET_IGNORED,
  366. project: ProjectFixture(),
  367. data: {
  368. ignoreUntilEscalating: true,
  369. },
  370. user: UserFixture(),
  371. dateCreated,
  372. },
  373. ],
  374. organization: OrganizationFixture({}),
  375. });
  376. expect(screen.getAllByTestId('activity-item').at(-1)).toHaveTextContent(
  377. 'Foo Bar archived this issue until it escalates'
  378. );
  379. });
  380. it('renders escalating with forecast and plural events', function () {
  381. createWrapper({
  382. activity: [
  383. {
  384. id: '123',
  385. type: GroupActivityType.SET_UNRESOLVED,
  386. project: ProjectFixture(),
  387. data: {
  388. forecast: 200,
  389. },
  390. user: null,
  391. dateCreated,
  392. },
  393. {
  394. id: '124',
  395. type: GroupActivityType.SET_ESCALATING,
  396. project: ProjectFixture(),
  397. data: {
  398. forecast: 400,
  399. },
  400. user: null,
  401. dateCreated: '2021-10-05T15:31:38.950115Z',
  402. },
  403. ],
  404. organization: OrganizationFixture({}),
  405. });
  406. expect(screen.getAllByTestId('activity-item').at(-1)).toHaveTextContent(
  407. 'Sentry flagged this issue as escalating because over 400 events happened in an hour'
  408. );
  409. expect(screen.getAllByTestId('activity-item').at(-2)).toHaveTextContent(
  410. 'Sentry flagged this issue as escalating because over 200 events happened in an hour'
  411. );
  412. });
  413. it('renders escalating with forecast and singular event', function () {
  414. createWrapper({
  415. activity: [
  416. {
  417. id: '123',
  418. type: GroupActivityType.SET_UNRESOLVED,
  419. project: ProjectFixture(),
  420. data: {
  421. forecast: 1,
  422. },
  423. user: null,
  424. dateCreated,
  425. },
  426. ],
  427. organization: OrganizationFixture({}),
  428. });
  429. expect(screen.getAllByTestId('activity-item').at(-1)).toHaveTextContent(
  430. 'Sentry flagged this issue as escalating because over 1 event happened in an hour'
  431. );
  432. });
  433. it('renders issue unresvoled via jira', function () {
  434. createWrapper({
  435. activity: [
  436. {
  437. id: '123',
  438. type: GroupActivityType.SET_UNRESOLVED,
  439. project: ProjectFixture(),
  440. data: {
  441. integration_id: '1',
  442. provider_key: 'jira',
  443. provider: 'Jira',
  444. },
  445. user: null,
  446. dateCreated,
  447. },
  448. ],
  449. });
  450. expect(screen.getAllByTestId('activity-item').at(-1)).toHaveTextContent(
  451. 'Sentry marked this issue as unresolved via Jira'
  452. );
  453. });
  454. it('renders issue resolved via jira', function () {
  455. createWrapper({
  456. activity: [
  457. {
  458. id: '123',
  459. type: GroupActivityType.SET_RESOLVED,
  460. project: ProjectFixture(),
  461. data: {
  462. integration_id: '1',
  463. provider_key: 'jira',
  464. provider: 'Jira',
  465. },
  466. user: null,
  467. dateCreated,
  468. },
  469. ],
  470. });
  471. expect(screen.getAllByTestId('activity-item').at(-1)).toHaveTextContent(
  472. 'Sentry marked this issue as resolved via Jira'
  473. );
  474. });
  475. it('renders escalating since it happened x times in time window', function () {
  476. createWrapper({
  477. activity: [
  478. {
  479. id: '123',
  480. type: GroupActivityType.SET_ESCALATING,
  481. project: ProjectFixture(),
  482. data: {
  483. expired_snooze: {
  484. count: 400,
  485. window: 1,
  486. until: null,
  487. user_count: null,
  488. user_window: null,
  489. },
  490. },
  491. dateCreated,
  492. },
  493. ],
  494. });
  495. expect(screen.getAllByTestId('activity-item').at(-1)).toHaveTextContent(
  496. 'Sentry flagged this issue as escalating because 400 events happened in 1 minute'
  497. );
  498. });
  499. it('renders escalating since x users were affected in time window', function () {
  500. createWrapper({
  501. activity: [
  502. {
  503. id: '123',
  504. type: GroupActivityType.SET_ESCALATING,
  505. project: ProjectFixture(),
  506. data: {
  507. expired_snooze: {
  508. user_count: 1,
  509. user_window: 1,
  510. until: null,
  511. count: null,
  512. window: null,
  513. },
  514. },
  515. dateCreated,
  516. },
  517. ],
  518. });
  519. expect(screen.getAllByTestId('activity-item').at(-1)).toHaveTextContent(
  520. 'Sentry flagged this issue as escalating because 1 user was affected in 1 minute'
  521. );
  522. });
  523. it('renders escalating since until date passed', function () {
  524. const date = new Date('2018-10-30');
  525. createWrapper({
  526. activity: [
  527. {
  528. id: '123',
  529. type: GroupActivityType.SET_ESCALATING,
  530. project: ProjectFixture(),
  531. data: {
  532. expired_snooze: {
  533. until: date,
  534. user_count: null,
  535. user_window: null,
  536. count: null,
  537. window: null,
  538. },
  539. },
  540. dateCreated,
  541. },
  542. ],
  543. });
  544. expect(screen.getAllByTestId('activity-item').at(-1)).toHaveTextContent(
  545. 'Sentry flagged this issue as escalating because Oct 30, 2018 12:00 AM passed'
  546. );
  547. });
  548. it('renders archived forever', function () {
  549. createWrapper({
  550. activity: [
  551. {
  552. id: '123',
  553. type: GroupActivityType.SET_IGNORED,
  554. project: ProjectFixture(),
  555. data: {},
  556. user: UserFixture(),
  557. dateCreated,
  558. },
  559. ],
  560. organization: OrganizationFixture({}),
  561. });
  562. expect(screen.getAllByTestId('activity-item').at(-1)).toHaveTextContent(
  563. 'Foo Bar archived this issue forever'
  564. );
  565. });
  566. it('renders resolved in release with semver information', function () {
  567. createWrapper({
  568. activity: [
  569. {
  570. id: '123',
  571. type: GroupActivityType.SET_RESOLVED_IN_RELEASE,
  572. project: ProjectFixture(),
  573. data: {
  574. version: 'frontend@1.0.0',
  575. },
  576. user: UserFixture(),
  577. dateCreated,
  578. },
  579. ],
  580. });
  581. expect(screen.getAllByTestId('activity-item').at(-1)).toHaveTextContent(
  582. 'Foo Bar marked this issue as resolved in 1.0.0 (semver)'
  583. );
  584. });
  585. it('renders resolved in next release with semver information', function () {
  586. createWrapper({
  587. activity: [
  588. {
  589. id: '123',
  590. type: GroupActivityType.SET_RESOLVED_IN_RELEASE,
  591. project: ProjectFixture(),
  592. data: {
  593. current_release_version: 'frontend@1.0.0',
  594. },
  595. user: UserFixture(),
  596. dateCreated,
  597. },
  598. ],
  599. });
  600. expect(screen.getAllByTestId('activity-item').at(-1)).toHaveTextContent(
  601. 'Foo Bar marked this issue as resolved in releases greater than 1.0.0 (semver)'
  602. );
  603. });
  604. describe('regression', function () {
  605. it('renders basic regression', function () {
  606. createWrapper({
  607. activity: [
  608. {
  609. id: '123',
  610. type: GroupActivityType.SET_REGRESSION,
  611. project: ProjectFixture(),
  612. data: {},
  613. dateCreated,
  614. },
  615. ],
  616. });
  617. expect(screen.getAllByTestId('activity-item').at(-1)).toHaveTextContent(
  618. 'Sentry marked this issue as a regression'
  619. );
  620. });
  621. it('renders regression with version', function () {
  622. createWrapper({
  623. activity: [
  624. {
  625. id: '123',
  626. type: GroupActivityType.SET_REGRESSION,
  627. project: ProjectFixture(),
  628. data: {
  629. version: 'frontend@1.0.0',
  630. },
  631. dateCreated,
  632. },
  633. ],
  634. });
  635. expect(screen.getAllByTestId('activity-item').at(-1)).toHaveTextContent(
  636. 'Sentry marked this issue as a regression in 1.0.0'
  637. );
  638. });
  639. it('renders regression with semver description', function () {
  640. createWrapper({
  641. activity: [
  642. {
  643. id: '123',
  644. type: GroupActivityType.SET_REGRESSION,
  645. project: ProjectFixture(),
  646. data: {
  647. version: 'frontend@2.0.0',
  648. resolved_in_version: 'frontend@1.0.0',
  649. follows_semver: true,
  650. },
  651. dateCreated,
  652. },
  653. ],
  654. });
  655. const activity = screen.getAllByTestId('activity-item').at(-1);
  656. expect(activity).toHaveTextContent(
  657. 'Sentry marked this issue as a regression in 2.0.0'
  658. );
  659. expect(activity).toHaveTextContent(
  660. '2.0.0 is greater than or equal to 1.0.0 compared via semver'
  661. );
  662. });
  663. it('renders regression with non-semver description', function () {
  664. createWrapper({
  665. activity: [
  666. {
  667. id: '123',
  668. type: GroupActivityType.SET_REGRESSION,
  669. project: ProjectFixture(),
  670. data: {
  671. version: 'frontend@abc1',
  672. resolved_in_version: 'frontend@abc2',
  673. follows_semver: false,
  674. },
  675. dateCreated,
  676. },
  677. ],
  678. });
  679. const activity = screen.getAllByTestId('activity-item').at(-1);
  680. expect(activity).toHaveTextContent(
  681. 'Sentry marked this issue as a regression in abc1'
  682. );
  683. expect(activity).toHaveTextContent(
  684. 'abc1 is greater than or equal to abc2 compared via release date'
  685. );
  686. });
  687. it('renders a set priority activity for escalating issues', function () {
  688. createWrapper({
  689. activity: [
  690. {
  691. id: '123',
  692. type: GroupActivityType.SET_PRIORITY,
  693. project: ProjectFixture(),
  694. data: {
  695. priority: PriorityLevel.HIGH,
  696. reason: 'escalating',
  697. },
  698. dateCreated,
  699. },
  700. ],
  701. organization: OrganizationFixture({features: ['issue-priority-ui']}),
  702. });
  703. expect(screen.getAllByTestId('activity-item').at(-1)).toHaveTextContent(
  704. 'Sentry updated the priority value of this issue to be high after it escalated'
  705. );
  706. });
  707. it('renders a set priority activity for ongoing issues', function () {
  708. createWrapper({
  709. activity: [
  710. {
  711. id: '123',
  712. type: GroupActivityType.SET_PRIORITY,
  713. project: ProjectFixture(),
  714. data: {
  715. priority: PriorityLevel.LOW,
  716. reason: 'ongoing',
  717. },
  718. dateCreated,
  719. },
  720. ],
  721. organization: OrganizationFixture({features: ['issue-priority-ui']}),
  722. });
  723. expect(screen.getAllByTestId('activity-item').at(-1)).toHaveTextContent(
  724. 'Sentry updated the priority value of this issue to be low after it was marked as ongoing'
  725. );
  726. });
  727. });
  728. });