@@ -161,7 +161,7 @@ describe('ProjectAlertsCreate', function () {
161
161
'The issue is older or newer than...' ,
162
162
] ) ;
163
163
164
- await userEvent . click ( screen . getAllByLabelText ( 'Delete Node' ) [ 2 ] ) ;
164
+ await userEvent . click ( screen . getAllByLabelText ( 'Delete Node' ) [ 1 ] ) ;
165
165
166
166
await userEvent . click ( screen . getByText ( 'Save Rule' ) ) ;
167
167
@@ -174,10 +174,7 @@ describe('ProjectAlertsCreate', function () {
174
174
actions : [ ] ,
175
175
conditions : [
176
176
expect . objectContaining ( {
177
- id : 'sentry.rules.conditions.high_priority_issue.NewHighPriorityIssueCondition' ,
178
- } ) ,
179
- expect . objectContaining ( {
180
- id : 'sentry.rules.conditions.high_priority_issue.ExistingHighPriorityIssueCondition' ,
177
+ id : 'sentry.rules.conditions.first_seen_event.FirstSeenEventCondition' ,
181
178
} ) ,
182
179
] ,
183
180
filterMatch : 'all' ,
@@ -200,7 +197,6 @@ describe('ProjectAlertsCreate', function () {
200
197
} ) ;
201
198
// delete node
202
199
await userEvent . click ( screen . getAllByLabelText ( 'Delete Node' ) [ 0 ] ) ;
203
- await userEvent . click ( screen . getAllByLabelText ( 'Delete Node' ) [ 0 ] ) ;
204
200
205
201
// Change name of alert rule
206
202
await userEvent . type ( screen . getByPlaceholderText ( 'Enter Alert Name' ) , 'myname' ) ;
@@ -267,7 +263,7 @@ describe('ProjectAlertsCreate', function () {
267
263
'Send a notification to all legacy integrations' ,
268
264
] ) ;
269
265
270
- await userEvent . click ( screen . getAllByLabelText ( 'Delete Node' ) [ 2 ] ) ;
266
+ await userEvent . click ( screen . getAllByLabelText ( 'Delete Node' ) [ 1 ] ) ;
271
267
272
268
await userEvent . click ( screen . getByText ( 'Save Rule' ) ) ;
273
269
@@ -280,10 +276,7 @@ describe('ProjectAlertsCreate', function () {
280
276
actions : [ ] ,
281
277
conditions : [
282
278
expect . objectContaining ( {
283
- id : 'sentry.rules.conditions.high_priority_issue.NewHighPriorityIssueCondition' ,
284
- } ) ,
285
- expect . objectContaining ( {
286
- id : 'sentry.rules.conditions.high_priority_issue.ExistingHighPriorityIssueCondition' ,
279
+ id : 'sentry.rules.conditions.first_seen_event.FirstSeenEventCondition' ,
287
280
} ) ,
288
281
] ,
289
282
filterMatch : 'all' ,
@@ -340,10 +333,7 @@ describe('ProjectAlertsCreate', function () {
340
333
filterMatch : 'any' ,
341
334
conditions : [
342
335
expect . objectContaining ( {
343
- id : 'sentry.rules.conditions.high_priority_issue.NewHighPriorityIssueCondition' ,
344
- } ) ,
345
- expect . objectContaining ( {
346
- id : 'sentry.rules.conditions.high_priority_issue.ExistingHighPriorityIssueCondition' ,
336
+ id : 'sentry.rules.conditions.first_seen_event.FirstSeenEventCondition' ,
347
337
} ) ,
348
338
] ,
349
339
actions : [ ] ,
@@ -392,10 +382,7 @@ describe('ProjectAlertsCreate', function () {
392
382
actions : [ ] ,
393
383
conditions : [
394
384
expect . objectContaining ( {
395
- id : 'sentry.rules.conditions.high_priority_issue.NewHighPriorityIssueCondition' ,
396
- } ) ,
397
- expect . objectContaining ( {
398
- id : 'sentry.rules.conditions.high_priority_issue.ExistingHighPriorityIssueCondition' ,
385
+ id : 'sentry.rules.conditions.first_seen_event.FirstSeenEventCondition' ,
399
386
} ) ,
400
387
] ,
401
388
filterMatch : 'all' ,
@@ -455,11 +442,7 @@ describe('ProjectAlertsCreate', function () {
455
442
} ,
456
443
] ,
457
444
actions : [ ] ,
458
- conditions : [
459
- expect . objectContaining ( {
460
- id : 'sentry.rules.conditions.high_priority_issue.ExistingHighPriorityIssueCondition' ,
461
- } ) ,
462
- ] ,
445
+ conditions : [ ] ,
463
446
frequency : 60 * 24 ,
464
447
name : 'myname' ,
465
448
owner : null ,
@@ -501,10 +484,7 @@ describe('ProjectAlertsCreate', function () {
501
484
] ,
502
485
conditions : [
503
486
expect . objectContaining ( {
504
- id : 'sentry.rules.conditions.high_priority_issue.NewHighPriorityIssueCondition' ,
505
- } ) ,
506
- expect . objectContaining ( {
507
- id : 'sentry.rules.conditions.high_priority_issue.ExistingHighPriorityIssueCondition' ,
487
+ id : 'sentry.rules.conditions.first_seen_event.FirstSeenEventCondition' ,
508
488
} ) ,
509
489
] ,
510
490
filterMatch : 'all' ,
@@ -551,10 +531,7 @@ describe('ProjectAlertsCreate', function () {
551
531
actionMatch : 'any' ,
552
532
conditions : [
553
533
expect . objectContaining ( {
554
- id : 'sentry.rules.conditions.high_priority_issue.NewHighPriorityIssueCondition' ,
555
- } ) ,
556
- expect . objectContaining ( {
557
- id : 'sentry.rules.conditions.high_priority_issue.ExistingHighPriorityIssueCondition' ,
534
+ id : 'sentry.rules.conditions.first_seen_event.FirstSeenEventCondition' ,
558
535
} ) ,
559
536
] ,
560
537
filterMatch : 'all' ,
@@ -585,7 +562,6 @@ describe('ProjectAlertsCreate', function () {
585
562
createWrapper ( ) ;
586
563
// delete existion conditions
587
564
await userEvent . click ( screen . getAllByLabelText ( 'Delete Node' ) [ 0 ] ) ;
588
- await userEvent . click ( screen . getAllByLabelText ( 'Delete Node' ) [ 0 ] ) ;
589
565
590
566
await waitFor ( ( ) => {
591
567
expect ( mock ) . toHaveBeenCalled ( ) ;
@@ -629,7 +605,6 @@ describe('ProjectAlertsCreate', function () {
629
605
it ( 'shows error for incompatible conditions' , async ( ) => {
630
606
createWrapper ( ) ;
631
607
await userEvent . click ( screen . getAllByLabelText ( 'Delete Node' ) [ 0 ] ) ;
632
- await userEvent . click ( screen . getAllByLabelText ( 'Delete Node' ) [ 0 ] ) ;
633
608
634
609
await selectEvent . select ( screen . getByText ( 'Add optional trigger...' ) , [
635
610
'A new issue is created' ,
@@ -656,7 +631,6 @@ describe('ProjectAlertsCreate', function () {
656
631
it ( 'test any filterMatch' , async ( ) => {
657
632
createWrapper ( ) ;
658
633
await userEvent . click ( screen . getAllByLabelText ( 'Delete Node' ) [ 0 ] ) ;
659
- await userEvent . click ( screen . getAllByLabelText ( 'Delete Node' ) [ 0 ] ) ;
660
634
661
635
await selectEvent . select ( screen . getByText ( 'Add optional trigger...' ) , [
662
636
'A new issue is created' ,
@@ -707,7 +681,6 @@ describe('ProjectAlertsCreate', function () {
707
681
708
682
createWrapper ( { organization : { features : [ 'noisy-alert-warning' ] } } ) ;
709
683
await userEvent . click ( ( await screen . findAllByLabelText ( 'Delete Node' ) ) [ 0 ] ) ;
710
- await userEvent . click ( ( await screen . findAllByLabelText ( 'Delete Node' ) ) [ 0 ] ) ;
711
684
712
685
await selectEvent . select ( screen . getByText ( 'Add action...' ) , [
713
686
'Suggested Assignees, Team, or Member' ,
@@ -740,7 +713,6 @@ describe('ProjectAlertsCreate', function () {
740
713
it ( 'does not display noisy alert banner for legacy integrations' , async function ( ) {
741
714
createWrapper ( { organization : { features : [ 'noisy-alert-warning' ] } } ) ;
742
715
await userEvent . click ( ( await screen . findAllByLabelText ( 'Delete Node' ) ) [ 0 ] ) ;
743
- await userEvent . click ( ( await screen . findAllByLabelText ( 'Delete Node' ) ) [ 0 ] ) ;
744
716
745
717
await selectEvent . select ( screen . getByText ( 'Add action...' ) , [
746
718
'Send a notification to all legacy integrations' ,
0 commit comments