feat: rename portal brand to shopee circle

This commit is contained in:
QiuSW
2026-07-08 17:05:20 +08:00
parent d5aa29e4d5
commit 5c9f070d15
19 changed files with 88 additions and 30 deletions
+40 -1
View File
@@ -166,6 +166,13 @@ class PortalAccountFlowTests(TestCase):
html,
)
def assert_portal_branding(self, response):
self.assertContains(response, "虾皮圈")
self.assertNotContains(response, ">cmhub</a>")
self.assertNotContains(response, " - cmhub</title>")
self.assertNotContains(response, "cmhub AI 电商生成台")
self.assertNotContains(response, "cmhub API Key")
def test_signup_rate_limit_is_configured(self):
self.assertEqual(settings.ACCOUNT_RATE_LIMITS["signup"], "20/m/ip")
@@ -273,7 +280,8 @@ class PortalAccountFlowTests(TestCase):
self.assertEqual(response.status_code, 200)
self.assertEqual(response.resolver_match.url_name, "portal-home")
self.assertContains(response, "cmhub AI 电商生成台")
self.assertContains(response, "虾皮圈 AI 电商生成台")
self.assert_portal_branding(response)
self.assertContains(response, "注册领 100 点")
self.assertContains(response, "注册送 100 点")
self.assertContains(response, "登录")
@@ -299,6 +307,37 @@ class PortalAccountFlowTests(TestCase):
self.assertContains(response, "b" * 64)
self.assertContains(response, "修复下载入口并补充 SHA256")
self.assertContains(response, "未知发布者")
self.assertContains(response, "填入虾皮圈 API Key 使用")
self.assertNotContains(response, "填入 cmhub API Key 使用")
def test_portal_pages_use_shopee_circle_branding(self):
user = self.create_verified_user()
UserWallet.objects.create(user=user, points_balance=10)
public_paths = ("/", "/signup", "/login")
for path in public_paths:
with self.subTest(path=path):
response = self.client.get(path)
self.assertEqual(response.status_code, 200)
self.assert_portal_branding(response)
self.client.force_login(user)
authenticated_paths = (
"/dashboard",
"/recharge",
"/apikeys",
"/models",
"/records/recharge",
"/records/usage",
"/logout",
)
for path in authenticated_paths:
with self.subTest(path=path):
response = self.client.get(path)
self.assertEqual(response.status_code, 200)
self.assert_portal_branding(response)
def test_homepage_shows_current_import_template_download_link(self):
self.create_download_release()