Show Care Enterprise upgrade banner to Pro users.
Deploy Ladill Care / deploy (push) Successful in 1m2s
Deploy Ladill Care / deploy (push) Successful in 1m2s
Pro dashboards now pitch Enterprise instead of the Free unlock copy, and plan context is shared with the banner so Pro tenants no longer see Free messaging. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -179,6 +179,40 @@ class CareProTest extends TestCase
|
||||
->assertSee('View plans');
|
||||
}
|
||||
|
||||
public function test_pro_dashboard_shows_enterprise_upgrade_banner(): void
|
||||
{
|
||||
$settings = $this->organization->settings ?? [];
|
||||
$settings['plan'] = 'pro';
|
||||
$settings['plan_expires_at'] = now()->addMonth()->toIso8601String();
|
||||
$settings['billed_branches'] = 1;
|
||||
$this->organization->update(['settings' => $settings]);
|
||||
|
||||
$this->actingAs($this->owner)
|
||||
->get(route('care.dashboard'))
|
||||
->assertOk()
|
||||
->assertSee('Upgrade to Care Enterprise')
|
||||
->assertSee('View Enterprise')
|
||||
->assertDontSee('Unlock Care Pro or Enterprise')
|
||||
->assertSee('Care Pro');
|
||||
}
|
||||
|
||||
public function test_enterprise_dashboard_hides_upgrade_banner(): void
|
||||
{
|
||||
$settings = $this->organization->settings ?? [];
|
||||
$settings['plan'] = 'enterprise';
|
||||
$settings['plan_expires_at'] = now()->addMonth()->toIso8601String();
|
||||
$settings['billed_branches'] = 1;
|
||||
$this->organization->update(['settings' => $settings]);
|
||||
|
||||
$this->actingAs($this->owner)
|
||||
->get(route('care.dashboard'))
|
||||
->assertOk()
|
||||
->assertDontSee('Unlock Care Pro or Enterprise')
|
||||
->assertDontSee('Upgrade to Care Enterprise')
|
||||
->assertDontSee('View Enterprise')
|
||||
->assertSee('Care Enterprise');
|
||||
}
|
||||
|
||||
public function test_team_member_does_not_see_upgrade_banner(): void
|
||||
{
|
||||
$member = User::create([
|
||||
@@ -205,6 +239,7 @@ class CareProTest extends TestCase
|
||||
$this->get(route('care.dashboard'))
|
||||
->assertOk()
|
||||
->assertDontSee('Unlock Care Pro or Enterprise')
|
||||
->assertDontSee('Upgrade to Care Enterprise')
|
||||
->assertDontSee('View plans')
|
||||
->assertDontSee('Upgrade to Pro')
|
||||
->assertSee('Report Issue');
|
||||
|
||||
Reference in New Issue
Block a user