From 8d638363da19f24cbd9596e730d4ec6b2e064567 Mon Sep 17 00:00:00 2001 From: Lauryn Menard Date: Mon, 13 Jan 2025 21:09:35 +0100 Subject: [PATCH] corporate: Update self-hosted complimentary access plan name. Updates the name for the self-hosted complimentary access plan to "Zulip Basic (complimentary)" instead of "Free (legacy plan)". Since these plans are never billed in Stripe, we don't need to hold to the 22 character limit for the plan name. --- corporate/models.py | 4 +++- corporate/tests/test_support_views.py | 12 ++++++------ templates/corporate/billing/billing.html | 2 +- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/corporate/models.py b/corporate/models.py index 00e7567d25..69eb4b4ad5 100644 --- a/corporate/models.py +++ b/corporate/models.py @@ -451,10 +451,12 @@ class CustomerPlan(AbstractCustomerPlan): CustomerPlan.TIER_CLOUD_STANDARD: "Zulip Cloud Standard", CustomerPlan.TIER_CLOUD_PLUS: "Zulip Cloud Plus", CustomerPlan.TIER_CLOUD_ENTERPRISE: "Zulip Enterprise", - CustomerPlan.TIER_SELF_HOSTED_LEGACY: "Free (legacy plan)", CustomerPlan.TIER_SELF_HOSTED_BASIC: "Zulip Basic", CustomerPlan.TIER_SELF_HOSTED_BUSINESS: "Zulip Business", CustomerPlan.TIER_SELF_HOSTED_COMMUNITY: "Community", + # Complimentary access plans should never be billed through Stripe, + # so the tier name can exceed the 22 character limit noted above. + CustomerPlan.TIER_SELF_HOSTED_LEGACY: "Zulip Basic (complimentary)", }[tier] @property diff --git a/corporate/tests/test_support_views.py b/corporate/tests/test_support_views.py index b429cc67b3..c9c46a7679 100644 --- a/corporate/tests/test_support_views.py +++ b/corporate/tests/test_support_views.py @@ -286,11 +286,11 @@ class TestRemoteServerSupportEndpoint(ZulipTestCase): result, ) - def check_legacy_plan_with_upgrade(result: "TestHttpResponse") -> None: + def check_complimentary_access_plan_with_upgrade(result: "TestHttpResponse") -> None: self.assert_in_success_response( [ "Current plan information:", - "Plan name: Free (legacy plan)
", + "Plan name: Zulip Basic (complimentary)
", "Status: New plan scheduled
", "End date: 01 February 2050
", "⏱️ Next plan information:", @@ -305,11 +305,11 @@ class TestRemoteServerSupportEndpoint(ZulipTestCase): result, ) - def check_legacy_plan_without_upgrade(result: "TestHttpResponse") -> None: + def check_complimentary_access_plan_without_upgrade(result: "TestHttpResponse") -> None: self.assert_in_success_response( [ "Current plan information:", - "Plan name: Free (legacy plan)
", + "Plan name: Zulip Basic (complimentary)
", "Status: Active
", "End date: 01 February 2050
", ], @@ -414,14 +414,14 @@ class TestRemoteServerSupportEndpoint(ZulipTestCase): assert_server_details_in_response(result, f"zulip-{server}.example.com") assert_realm_details_in_response(result, f"realm-name-{server}", f"realm-host-{server}") check_no_sponsorship_request(result) - check_legacy_plan_with_upgrade(result) + check_complimentary_access_plan_with_upgrade(result) server = 5 result = self.client_get("/activity/remote/support", {"q": f"zulip-{server}.example.com"}) assert_server_details_in_response(result, f"zulip-{server}.example.com") assert_realm_details_in_response(result, f"realm-name-{server}", f"realm-host-{server}") check_no_sponsorship_request(result) - check_legacy_plan_without_upgrade(result) + check_complimentary_access_plan_without_upgrade(result) # search for UUIDs remote_server = RemoteZulipServer.objects.get(hostname=f"zulip-{server}.example.com") diff --git a/templates/corporate/billing/billing.html b/templates/corporate/billing/billing.html index 9ff4da4310..ea384ae6d9 100644 --- a/templates/corporate/billing/billing.html +++ b/templates/corporate/billing/billing.html @@ -50,7 +50,7 @@ {% elif complimentary_access_plan %} - Zulip Basic + {{ plan_name.replace(" (complimentary)", "") -}} (complimentary access) {% else %}