Hide Care Pro upgrade banner from team members.
Deploy Ladill Care / deploy (push) Successful in 38s
Deploy Ladill Care / deploy (push) Successful in 38s
Only account owners with billing access see the View plans CTA. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -75,6 +75,37 @@ class CareProTest extends TestCase
|
||||
->assertSee('View plans');
|
||||
}
|
||||
|
||||
public function test_team_member_does_not_see_upgrade_banner(): void
|
||||
{
|
||||
$member = User::create([
|
||||
'public_id' => 'care-doctor-001',
|
||||
'name' => 'Doctor',
|
||||
'email' => 'doctor@example.com',
|
||||
]);
|
||||
|
||||
Member::create([
|
||||
'owner_ref' => $this->owner->public_id,
|
||||
'organization_id' => $this->organization->id,
|
||||
'user_ref' => $member->public_id,
|
||||
'role' => 'doctor',
|
||||
]);
|
||||
|
||||
$this->actingAs($member);
|
||||
\App\Support\StaffUx::remember([
|
||||
'full_access' => false,
|
||||
'apps' => ['care'],
|
||||
'show_hub' => false,
|
||||
'show_billing' => false,
|
||||
]);
|
||||
|
||||
$this->get(route('care.dashboard'))
|
||||
->assertOk()
|
||||
->assertDontSee('Unlock Care Pro or Enterprise')
|
||||
->assertDontSee('View plans')
|
||||
->assertDontSee('Upgrade to Pro')
|
||||
->assertSee('Report Issue');
|
||||
}
|
||||
|
||||
public function test_subscribe_upgrades_organization_to_pro(): void
|
||||
{
|
||||
Http::fake([
|
||||
|
||||
Reference in New Issue
Block a user