feat(settings): add development sponsorship reminder preview

This commit is contained in:
Andras Bacsai
2026-08-31 13:16:35 +02:00
parent e514a2d61f
commit 44bb132833
3 changed files with 34 additions and 8 deletions
+18
View File
@@ -36,3 +36,21 @@ test('non-critical reminders collapse after ten seconds', function () {
->toContain('reminders.sponsorship.compact = true')
->toContain('reminders.notification.compact = true');
});
test('sponsorship reminder is disabled in development', function () {
$view = file_get_contents(resource_path('views/livewire/layout-popups.blade.php'));
expect($view)
->toContain('this.popups.sponsorship = !this.isDevelopment && this.shouldShowMonthlyPopup')
->toContain('@show-sponsorship-reminder.window="popups.sponsorship = true')
->toContain('@show-sponsorship-reminder.window="bannerVisible = true"');
});
test('advanced settings provides a development-only sponsorship reminder preview', function () {
$view = file_get_contents(resource_path('views/livewire/settings/advanced.blade.php'));
expect($view)
->toContain('@if (isDev())')
->toContain("@click=\"\$dispatch('show-sponsorship-reminder')\"")
->toContain('Show sponsorship reminder');
});