Skip to content

Commit

Permalink
fix tests from isSentryPlan addition on usePlanData hook, and 1 or 2 …
Browse files Browse the repository at this point in the history
…trailing test fixes
  • Loading branch information
ajay-sentry committed Dec 23, 2024
1 parent ffb3f92 commit 031bea6
Show file tree
Hide file tree
Showing 44 changed files with 119 additions and 17 deletions.
1 change: 1 addition & 0 deletions src/pages/AccountSettings/AccountSettings.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ describe('AccountSettings', () => {
planValue === Plans.USERS_TEAMM ||
planValue === Plans.USERS_TEAMY,
isTrialPlan: false,
isSentryPlan: false,
},
},
},
Expand Down
1 change: 1 addition & 0 deletions src/pages/AccountSettings/AccountSettingsSideMenu.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ describe('AccountSettingsSideMenu', () => {
planValue === Plans.USERS_TEAMM ||
planValue === Plans.USERS_TEAMY,
isTrialPlan: false,
isSentryPlan: false,
},
},
},
Expand Down
1 change: 1 addition & 0 deletions src/pages/DefaultOrgSelector/DefaultOrgSelector.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ describe('DefaultOrgSelector', () => {
isTeamPlan:
value === Plans.USERS_TEAMM || value === Plans.USERS_TEAMY,
isTrialPlan: value === Plans.USERS_TRIAL,
isSentryPlan: false,
trialStatus,
value,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const mockPlanData = {
isEnterprisePlan: false,
isFreePlan: true,
isProPlan: false,
isSentryPlan: false,
isTeamPlan: false,
isTrialPlan: false,
baseUnitPrice: 10,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ const mockPlanData = {
isEnterprisePlan: false,
isFreePlan: false,
isProPlan: false,
isSentryPlan: false,
isTeamPlan: false,
isTrialPlan: false,
}
Expand Down
1 change: 1 addition & 0 deletions src/pages/MembersPage/MembersList/MembersList.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ const mockActiveUserRequest = {
const mockPlanData = {
isEnterprisePlan: false,
isProPlan: false,
isSentryPlan: false,
isTrialPlan: false,
baseUnitPrice: 10,
benefits: [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ const queryClient = new QueryClient({
const mockPlanData = {
isEnterprisePlan: false,
isProPlan: false,
isSentryPlan: false,
isTrialPlan: false,
baseUnitPrice: 10,
benefits: [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ const mockPlanDataResponse = {
isEnterprisePlan: false,
isFreePlan: false,
isProPlan: false,
isSentryPlan: false,
isTeamPlan: false,
isTrialPlan: false,
}
Expand Down
1 change: 1 addition & 0 deletions src/pages/OwnerPage/HeaderBanners/HeaderBanners.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ const mockPlanDataResponse = {
isEnterprisePlan: false,
isFreePlan: false,
isProPlan: false,
isSentryPlan: false,
isTeamPlan: false,
isTrialPlan: false,
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ const mockPlanDataResponse = {
isEnterprisePlan: false,
isFreePlan: false,
isProPlan: false,
isSentryPlan: false,
isTeamPlan: false,
isTrialPlan: false,
trialStatus: TrialStatuses.NOT_STARTED,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ const mockResponse = {
planUserCount: 1,
hasSeatsLeft: true,
isEnterprisePlan: false,
isSentryPlan: false,
isProPlan: false,
isTrialPlan: false,
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ const mockPlanData = {
isEnterprisePlan: false,
isFreePlan: false,
isProPlan: false,
isSentryPlan: false,
isTeamPlan: false,
isTrialPlan: false,
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const mockPlanData = {
isEnterprisePlan: false,
isFreePlan: true,
isProPlan: false,
isSentryPlan: false,
isTeamPlan: false,
isTrialPlan: false,
baseUnitPrice: 10,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ const mockPlanDataResponse = {
isEnterprisePlan: false,
isFreePlan: false,
isProPlan: false,
isSentryPlan: false,
isTeamPlan: false,
isTrialPlan: false,
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ const proPlanDetails = {
isEnterprisePlan: false,
isFreePlan: false,
isProPlan: true,
isSentryPlan: false,
isTeamPlan: true,
isTrialPlan: false,
},
Expand All @@ -46,6 +47,7 @@ const freePlanDetails = {
isEnterprisePlan: false,
isFreePlan: true,
isProPlan: false,
isSentryPlan: false,
isTeamPlan: false,
isTrialPlan: false,
},
Expand All @@ -65,6 +67,7 @@ const enterprisePlan = {
isEnterprisePlan: true,
isFreePlan: false,
isProPlan: false,
isSentryPlan: false,
isTeamPlan: false,
isTrialPlan: false,
},
Expand All @@ -84,6 +87,7 @@ const usesInvoiceTeamPlan = {
isEnterprisePlan: false,
isFreePlan: false,
isProPlan: false,
isSentryPlan: false,
isTeamPlan: true,
isTrialPlan: false,
},
Expand All @@ -103,6 +107,7 @@ const trialPlanDetails = {
isProPlan: false,
isTeamPlan: true,
isTrialPlan: true,
isSentryPlan: false,
},
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ const freePlan = {
isFreePlan: true,
isEnterprisePlan: false,
isProPlan: false,
isSentryPlan: false,
isTeamPlan: false,
isTrialPlan: false,
}
Expand All @@ -172,6 +173,7 @@ const mockPlanData = {
hasSeatsLeft: true,
isEnterprisePlan: false,
isProPlan: false,
isSentryPlan: false,
isTrialPlan: false,
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const mockPlanBasic = {
isEnterprisePlan: false,
isFreePlan: true,
isProPlan: false,
isSentryPlan: false,
isTeamPlan: false,
isTrialPlan: false,
baseUnitPrice: 0,
Expand All @@ -37,6 +38,7 @@ const mockPlanPro = {
isEnterprisePlan: false,
isProPlan: true,
isFreePlan: false,
isSentryPlan: false,
isTeamPlan: false,
isTrialPlan: false,
baseUnitPrice: 10,
Expand All @@ -58,6 +60,7 @@ const mockPlanTrialing = {
isEnterprisePlan: false,
isFreePlan: false,
isProPlan: false,
isSentryPlan: false,
isTeamPlan: false,
isTrialPlan: true,
baseUnitPrice: 10,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ const mockResponse = {
planUserCount: 1,
hasSeatsLeft: true,
isEnterprisePlan: false,
isProPlan: false,
isFreePlan: true,
isProPlan: false,
isSentryPlan: false,
isTeamPlan: false,
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const mockProPlan = {
isEnterprisePlan: false,
isProPlan: true,
isFreePlan: false,
isSentryPlan: false,
isTeamPlan: false,
isTrialPlan: false,
marketingName: 'Pro',
Expand All @@ -52,6 +53,7 @@ const mockTeamPlan = {
isEnterprisePlan: false,
isFreePlan: false,
isProPlan: false,
isSentryPlan: false,
isTeamPlan: true,
isTrialPlan: false,
marketingName: 'Team',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ const mockTrialData = {
isEnterprisePlan: false,
isFreePlan: true,
isProPlan: false,
isSentryPlan: false,
isTeamPlan: false,
isTrialPlan: false,
},
Expand Down Expand Up @@ -249,6 +250,7 @@ describe('Actions Billing', () => {
accountDetails.plan.value === Plans.USERS_TEAMM ||
accountDetails.plan.value === Plans.USERS_TEAMY,
isTrialPlan: accountDetails.plan.value === Plans.USERS_TRIAL,
isSentryPlan: accountDetails.plan.value === Plans.USERS_SENTRYM,
},
hasPrivateRepos,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ const mockPlanData = {
hasSeatsLeft: true,
isEnterprisePlan: false,
isProPlan: false,
isSentryPlan: false,
isTrialPlan: false,
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ const mockPlanData = {
hasSeatsLeft: true,
isEnterprisePlan: false,
isProPlan: false,
isSentryPlan: false,
isTrialPlan: false,
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ const mockPlanData = {
isEnterprisePlan: false,
isFreePlan: false,
isProPlan: false,
isSentryPlan: false,
isTeamPlan: false,
isTrialPlan: false,
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ const proPlanYear = {
'Priority Support',
],
monthlyUploadLimit: null,
isTeamPlan: false,
isSentryPlan: false,
}

const proPlanMonth = {
Expand All @@ -42,6 +44,8 @@ const proPlanMonth = {
'Priority Support',
],
monthlyUploadLimit: null,
isTeamPlan: false,
isSentryPlan: false,
}

const sentryPlanYear = {
Expand All @@ -56,6 +60,8 @@ const sentryPlanYear = {
'Priority Support',
],
monthlyUploadLimit: null,
isTeamPlan: false,
isSentryPlan: true,
}

const sentryPlanMonth = {
Expand All @@ -70,6 +76,8 @@ const sentryPlanMonth = {
'Priority Support',
],
monthlyUploadLimit: null,
isSentryPlan: true,
isTeamPlan: false,
}

const teamPlanYear = {
Expand All @@ -79,6 +87,8 @@ const teamPlanYear = {
marketingName: 'Users Team',
monthlyUploadLimit: 2500,
value: Plans.USERS_TEAMY,
isTeamPlan: true,
isSentryPlan: false,
}

const teamPlanMonth = {
Expand All @@ -88,6 +98,8 @@ const teamPlanMonth = {
marketingName: 'Users Team',
monthlyUploadLimit: 2500,
value: Plans.USERS_TEAMM,
isTeamPlan: true,
isSentryPlan: false,
}

type WrapperClosure = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ const proPlanMonth = {
],
quantity: 10,
monthlyUploadLimit: null,
isTeamPlan: false,
isSentryPlan: false,
}

const proPlanYear = {
Expand All @@ -40,6 +42,8 @@ const proPlanYear = {
],
monthlyUploadLimit: null,
quantity: 13,
isTeamPlan: false,
isSentryPlan: false,
}

const sentryPlanMonth = {
Expand All @@ -56,6 +60,8 @@ const sentryPlanMonth = {
monthlyUploadLimit: null,
trialDays: 14,
quantity: 10,
isTeamPlan: false,
isSentryPlan: true,
}

const sentryPlanYear = {
Expand All @@ -72,6 +78,8 @@ const sentryPlanYear = {
monthlyUploadLimit: null,
trialDays: 14,
quantity: 21,
isTeamPlan: false,
isSentryPlan: true,
}

const teamPlanMonth = {
Expand All @@ -81,6 +89,8 @@ const teamPlanMonth = {
marketingName: 'Users Team',
monthlyUploadLimit: 2500,
value: Plans.USERS_TEAMM,
isTeamPlan: true,
isSentryPlan: false,
}

const teamPlanYear = {
Expand All @@ -90,6 +100,8 @@ const teamPlanYear = {
marketingName: 'Users Team',
monthlyUploadLimit: 2500,
value: Plans.USERS_TEAMY,
isTeamPlan: true,
isSentryPlan: false,
}

describe('Controller', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ const mockPlanDataResponse = {
isEnterprisePlan: false,
isFreePlan: false,
isProPlan: true,
isSentryPlan: false,
isTeamPlan: true,
isTrialPlan: false,
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ const mockPlanDataResponseMonthly = {
isEnterprisePlan: false,
isProPlan: true,
isFreePlan: false,
isSentryPlan: false,
isTeamPlan: false,
isTrialPlan: false,
}
Expand All @@ -160,6 +161,7 @@ const mockPlanDataResponseYearly = {
isEnterprisePlan: false,
isProPlan: true,
isFreePlan: false,
isSentryPlan: false,
isTeamPlan: false,
isTrialPlan: false,
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ const mockPlanDataResponse = {
isEnterprisePlan: false,
isFreePlan: false,
isProPlan: true,
isSentryPlan: true,
isTeamPlan: false,
isTrialPlan: false,
}
Expand Down
Loading

0 comments on commit 031bea6

Please sign in to comment.