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
12 changes: 9 additions & 3 deletions packages/ui/src/utils/urls.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,16 @@ describe("getPostHogUrl", () => {

describe("getBillingUrl", () => {
it.each([
["us", "https://us.posthog.com/organization/billing/overview"],
["eu", "https://eu.posthog.com/organization/billing/overview"],
[
"us",
"https://us.posthog.com/organization/billing/overview?products=posthog_code_usage",
],
[
"eu",
"https://eu.posthog.com/organization/billing/overview?products=posthog_code_usage",
],
] as const)(
"points at /organization/billing/overview on %s",
"points at /organization/billing/overview?products=posthog_code_usage on %s",
(region, expected) => {
expect(getBillingUrl(region)).toBe(expected);
},
Expand Down
5 changes: 4 additions & 1 deletion packages/ui/src/utils/urls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,8 @@ export function getPostHogUrl(
export function getBillingUrl(
regionOverride?: CloudRegion | null,
): string | null {
return getPostHogUrl("/organization/billing/overview", regionOverride);
return getPostHogUrl(
"/organization/billing/overview?products=posthog_code_usage",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Billing URL Tests Expect Old Path

The parameterized getBillingUrl tests for US and EU still expect the billing overview URL without this query string. Both cases now receive ?products=posthog_code_usage, so the existing test suite fails until those expectations are updated.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did i fix them all coach

regionOverride,
);
}
Loading