Strengthen expired subscription gate
This commit is contained in:
@@ -20,6 +20,10 @@ export function runTests() {
|
||||
source.indexOf("function UnauthenticatedGate"),
|
||||
source.indexOf("export function ProductAccessRequired"),
|
||||
);
|
||||
const subscriptionGate = source.slice(
|
||||
source.indexOf("function SubscriptionGate"),
|
||||
source.indexOf("// ─── Layer 1 fallback"),
|
||||
);
|
||||
|
||||
const accessCard = unauthenticatedGate.slice(
|
||||
unauthenticatedGate.indexOf('<section className="grid flex-1'),
|
||||
@@ -37,4 +41,18 @@ export function runTests() {
|
||||
accessCard.includes('href="/"'),
|
||||
"signed-out terminal gate must keep hard navigation targets for login, signup, and product overview",
|
||||
);
|
||||
assert(
|
||||
subscriptionGate.includes("订阅已过期") &&
|
||||
subscriptionGate.includes("终端访问已暂停") &&
|
||||
subscriptionGate.includes("已有付款但未恢复") &&
|
||||
subscriptionGate.includes("刷新权限") &&
|
||||
subscriptionGate.includes("账户中心") &&
|
||||
source.includes("续费并恢复访问"),
|
||||
"authenticated expired subscription gate must clearly say access is paused and show renewal/recovery actions",
|
||||
);
|
||||
assert(
|
||||
source.includes("subscriptionExpiresAt") &&
|
||||
source.includes("isExpiredSubscription"),
|
||||
"subscription gate must distinguish expired users from generic inactive accounts when an expiry timestamp is available",
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user