Skip to content

Commit

Permalink
fix(alerts): Use a real alert condition/action in tests (#57727)
Browse files Browse the repository at this point in the history
  • Loading branch information
scttcper authored Oct 6, 2023
1 parent 4eadd39 commit 96b4403
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
10 changes: 6 additions & 4 deletions fixtures/js-stubs/projectAlertRule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@ export function ProjectAlertRule(params: Partial<IssueAlertRule> = {}): IssueAle
actionMatch: 'all',
filterMatch: 'all',
conditions: [
{name: 'An alert is first seen', id: 'sentry.rules.conditions.1', label: ''},
{
id: 'sentry.rules.conditions.first_seen_event.FirstSeenEventCondition',
name: 'A new issue is created',
},
],
actions: [
{
name: 'Send a notification to all services',
id: 'sentry.rules.actions.notify1',
label: '',
id: 'sentry.rules.actions.notify_event.NotifyEventAction',
name: 'Send a notification (for all legacy integrations)',
},
],
filters: [],
Expand Down
4 changes: 2 additions & 2 deletions static/app/types/alerts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,15 @@ export type IssueAlertRuleConditionTemplate = IssueAlertRuleActionTemplate;
* These are the action or condition data that the user is editing or has saved.
*/
export interface IssueAlertRuleAction
extends Omit<IssueAlertRuleActionTemplate, 'formFields' | 'enabled'> {
extends Omit<IssueAlertRuleActionTemplate, 'formFields' | 'enabled' | 'label'> {
// These are the same values as the keys in `formFields` for a template
[key: string]: any;
dynamic_form_fields?: IssueConfigField[];
}

export type IssueAlertRuleCondition = Omit<
IssueAlertRuleConditionTemplate,
'formFields' | 'enabled'
'formFields' | 'enabled' | 'label'
> & {
dynamic_form_fields?: IssueConfigField[];
} & {
Expand Down

0 comments on commit 96b4403

Please sign in to comment.