Skip to content

Commit

Permalink
remove unused tests
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardgou-sentry committed Nov 28, 2024
1 parent 05c2958 commit cff25a7
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 60 deletions.
47 changes: 0 additions & 47 deletions static/app/views/alerts/rules/metric/triggers/chart/index.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -245,51 +245,4 @@ describe('Incident Rules Create', () => {
})
);
});

it('queries insights metrics using the metricsEnhanced dataset and without the metrics layer', async () => {
const {organization, project, router} = initializeOrg({
organization: {features: ['custom-metrics']},
});

render(
<TriggersChart
api={api}
location={router.location}
organization={organization}
projects={[project]}
query="span.module:db"
timeWindow={1}
aggregate="spm()"
dataset={Dataset.GENERIC_METRICS}
triggers={[]}
environment={null}
comparisonType={AlertRuleComparisonType.COUNT}
resolveThreshold={null}
thresholdType={AlertRuleThresholdType.BELOW}
newAlertOrQuery
onDataLoaded={() => {}}
isQueryValid
showTotalCount
/>
);

expect(await screen.findByTestId('area-chart')).toBeInTheDocument();
expect(await screen.findByTestId('alert-total-events')).toBeInTheDocument();

expect(eventStatsMock).toHaveBeenCalledWith(
expect.anything(),
expect.objectContaining({
query: {
interval: '1m',
project: [2],
query: 'span.module:db',
statsPeriod: '9998m',
yAxis: 'spm()',
referrer: 'api.organization-event-stats',
forceMetricsLayer: undefined,
dataset: 'metricsEnhanced',
},
})
);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,4 @@ describe('isOnDemandMetricAlert', () => {
)
).toBeFalsy();
});

it('should return false for an alert that uses insights metrics', () => {
const dataset = Dataset.GENERIC_METRICS;

expect(
isOnDemandMetricAlert(
dataset,
'avg(d:spans/exclusive_time@millisecond)',
'span.module:db'
)
).toBeFalsy();
expect(isOnDemandMetricAlert(dataset, 'spm()', 'browser.name:chrome')).toBeFalsy();
});
});

0 comments on commit cff25a7

Please sign in to comment.