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
24 changes: 4 additions & 20 deletions static/app/utils/seer/showNewSeer.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ describe('showNewSeer', () => {

it('returns false even with launch flags when seer-added is present', () => {
const organization = OrganizationFixture({
features: ['seer-added', 'seer-user-billing', 'seer-user-billing-launch'],
features: ['seer-added', 'seer-user-billing-launch'],
});

expect(showNewSeer(organization)).toBe(false);
Expand All @@ -42,36 +42,20 @@ describe('showNewSeer', () => {

it('returns false even with launch flags when code-review-beta is present', () => {
const organization = OrganizationFixture({
features: ['code-review-beta', 'seer-user-billing', 'seer-user-billing-launch'],
features: ['code-review-beta', 'seer-user-billing-launch'],
});

expect(showNewSeer(organization)).toBe(false);
});
});

describe('seer-user-billing-launch flag', () => {
it('returns true when both seer-user-billing and seer-user-billing-launch are present', () => {
const organization = OrganizationFixture({
features: ['seer-user-billing', 'seer-user-billing-launch'],
});

expect(showNewSeer(organization)).toBe(true);
});

it('returns false when only seer-user-billing is present', () => {
const organization = OrganizationFixture({
features: ['seer-user-billing'],
});

expect(showNewSeer(organization)).toBe(false);
});

it('returns false when only seer-user-billing-launch is present', () => {
it('returns true when seer-user-billing-launch is present', () => {
const organization = OrganizationFixture({
features: ['seer-user-billing-launch'],
});

expect(showNewSeer(organization)).toBe(false);
expect(showNewSeer(organization)).toBe(true);
});
});

Expand Down
5 changes: 1 addition & 4 deletions static/app/utils/seer/showNewSeer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,7 @@ export default function showNewSeer(organization: Organization) {
}

// This is the launch flag
if (
organization.features.includes('seer-user-billing') &&
organization.features.includes('seer-user-billing-launch')
) {
if (organization.features.includes('seer-user-billing-launch')) {
return true;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,6 @@ describe('NotificationSettingsByType', () => {
'continuous-profiling-billing',
'seer-billing',
'logs-billing',
'seer-user-billing',
'seer-user-billing-launch',
],
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,10 +212,8 @@ export function NotificationSettingsByType({notificationType}: Props) {
organization.features?.includes('logs-billing')
);

const hasSeerUserBilling = organizations.some(
organization =>
organization.features?.includes('seer-user-billing') &&
organization.features?.includes('seer-user-billing-launch')
const hasSeerUserBilling = organizations.some(organization =>
organization.features?.includes('seer-user-billing-launch')
);

const excludeTransactions = hasOrgWithAm3 && !hasOrgWithoutAm3;
Expand Down
Loading