Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions static/app/views/organizationStats/index.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -460,9 +460,9 @@ describe('OrganizationStats', () => {
expect(screen.getByRole('option', {name: 'Profiles'})).toBeInTheDocument();
});

it('shows Seer categories when seer-billing feature flag is enabled', async () => {
it('shows Seer categories for old usage-based Seer plan (seer-added)', async () => {
const newOrg = OrganizationFixture({
features: ['team-insights', 'seer-billing'],
features: ['team-insights', 'seer-billing', 'seer-added'],
});

render(<OrganizationStats />, {
Expand All @@ -488,6 +488,20 @@ describe('OrganizationStats', () => {
expect(screen.queryByRole('option', {name: 'Issue Scans'})).not.toBeInTheDocument();
});

it('does not show Seer categories for seat-based Seer plan', async () => {
const newOrg = OrganizationFixture({
features: ['team-insights', 'seer-billing', 'seat-based-seer-enabled'],
});

render(<OrganizationStats />, {
organization: newOrg,
});

await userEvent.click(await screen.findByText('Category'));
expect(screen.queryByRole('option', {name: 'Issue Fixes'})).not.toBeInTheDocument();
expect(screen.queryByRole('option', {name: 'Issue Scans'})).not.toBeInTheDocument();
});

it('shows size analysis when billing feature flag is enabled', async () => {
const newOrg = OrganizationFixture({
features: ['size-analysis-billing'],
Expand Down
5 changes: 4 additions & 1 deletion static/app/views/organizationStats/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,10 @@ export class OrganizationStatsInner extends Component<OrganizationStatsProps> {
return !organization.features.includes('spans-usage-tracking');
}
if ([DataCategory.SEER_AUTOFIX, DataCategory.SEER_SCANNER].includes(opt.value)) {
return organization.features.includes('seer-billing');
return (
organization.features.includes('seer-billing') &&
organization.features.includes('seer-added')
);
}
if ([DataCategory.LOG_BYTE].includes(opt.value)) {
return organization.features.includes('ourlogs-enabled');
Expand Down
Loading