import {render} from 'sentry-test/reactTestingLibrary'; import { TextAction, TextCondition, } from 'sentry/views/alerts/rules/issue/details/textRule'; describe('AlertRuleDetails', () => { it('displays EventFrequencyCondition percentage', () => { const wrapper = render( ); expect(wrapper.container).toHaveTextContent( 'Number of events in an issue is more than 1000 in 1h' ); }); it('displays EventFrequencyCondition count', () => { const wrapper = render( ); expect(wrapper.container).toHaveTextContent( 'Number of events in an issue is 150% higher in 1h compared to 1w ago' ); }); it('displays EventFrequencyPercentCondition count', () => { const wrapper = render( ); expect(wrapper.container).toHaveTextContent( 'Percent of sessions affected by an issue is 150% higher in 1h compared to 1d ago' ); }); it('displays EventUniqueUserFrequencyCondition count', () => { const wrapper = render( ); expect(wrapper.container).toHaveTextContent( 'Number of users affected by an issue is more than 89 in 1d' ); }); it('hides slack id and empty tags', () => { const wrapper = render( ); expect(wrapper.container).toHaveTextContent( 'Send a notification to the Sentry Slack workspace to #my-channel' ); }); it('shows slack tags', () => { const wrapper = render( ); expect(wrapper.container).toHaveTextContent( 'Send a notification to the Sentry Slack workspace to #my-channel and show tags [tag1, tag2] in notification' ); }); });