test: 平台订单列表行级BMPA按钮在续费缺订阅时应禁用(并可引导关联订阅)

This commit is contained in:
萝卜
2026-03-18 00:02:32 +08:00
parent 504a2be530
commit ba7f43fef8

View File

@@ -38,7 +38,7 @@ class AdminPlatformOrderIndexRowMarkPaidAndActivateButtonShouldDisableWhenRenewa
'published_at' => now(),
]);
// 构造:续费单缺订阅(脏数据),列表页应禁用 BMPA 并给出“去关联订阅”最短治理入口
// 构造:续费单缺订阅(脏数据),列表页应禁用 BMPA。
$order = PlatformOrder::query()->create([
'merchant_id' => $merchant->id,
'plan_id' => $plan->id,
@@ -67,7 +67,8 @@ class AdminPlatformOrderIndexRowMarkPaidAndActivateButtonShouldDisableWhenRenewa
$pattern = '#/admin/platform-orders/' . $order->id . '/mark-paid-and-activate.*?<button[^>]*disabled#s';
$this->assertMatchesRegularExpression($pattern, $html);
// 并且应提供最短治理入口(续费缺订阅:去关联订阅)
// 续费缺订阅的治理入口在“同步订阅”阻断提示里(去关联订阅),因此这里断言文案与链接 fragment。
$this->assertStringContainsString('去关联订阅', $html);
$this->assertStringContainsString('#relation-subscription', $html);
}
}