diff --git a/static/app/views/alerts/rules/issue/index.spec.tsx b/static/app/views/alerts/rules/issue/index.spec.tsx index ba5b4a66bd4948..3121ddf5d44382 100644 --- a/static/app/views/alerts/rules/issue/index.spec.tsx +++ b/static/app/views/alerts/rules/issue/index.spec.tsx @@ -193,6 +193,30 @@ describe('IssueRuleEditor', function () { expect(await screen.findByLabelText('Save Rule')).toBeEnabled(); expect(screen.queryByTestId('project-permission-alert')).not.toBeInTheDocument(); }); + + it('allows test notifications', async () => { + const {organization, project} = createWrapper(); + const mockTestNotification = MockApiClient.addMockResponse({ + url: `/projects/${organization.slug}/${project.slug}/rule-actions/`, + method: 'POST', + body: {}, + }); + await userEvent.click(screen.getByText('Send Test Notification')); + expect(mockTestNotification).toHaveBeenCalledWith( + `/projects/${organization.slug}/${project.slug}/rule-actions/`, + expect.objectContaining({ + data: { + actions: [ + { + id: 'sentry.rules.actions.notify_event.NotifyEventAction', + name: 'Send a notification (for all legacy integrations)', + }, + ], + name: 'My alert rule', + }, + }) + ); + }); }); describe('Edit Rule', function () { diff --git a/static/app/views/alerts/rules/issue/index.tsx b/static/app/views/alerts/rules/issue/index.tsx index 37786c2b5709f3..8361b783a4df5b 100644 --- a/static/app/views/alerts/rules/issue/index.tsx +++ b/static/app/views/alerts/rules/issue/index.tsx @@ -433,6 +433,7 @@ class IssueRuleEditor extends DeprecatedAsyncComponent { method: 'POST', data: { actions: rule?.actions ?? [], + name: rule?.name, }, }) .then(() => {