feat: initial release of relaticle/comments
Filament comments package with: - Polymorphic commenting on any Eloquent model - Threaded replies with configurable depth - @mentions with autocomplete and user search - Emoji reactions with toggle and who-reacted tooltips - File attachments via Livewire uploads - Reply and mention notifications via Filament notification system - Thread subscriptions for notification control - Real-time broadcasting (opt-in Echo) with polling fallback - Dark mode support - CommentsAction, CommentsTableAction, CommentsEntry for Filament integration - 204 tests, 421 assertions
This commit is contained in:
33
tests/Feature/PollingConfigTest.php
Normal file
33
tests/Feature/PollingConfigTest.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
use Relaticle\Comments\Config;
|
||||
|
||||
it('returns false for isBroadcastingEnabled by default', function () {
|
||||
expect(Config::isBroadcastingEnabled())->toBeFalse();
|
||||
});
|
||||
|
||||
it('returns true for isBroadcastingEnabled when config overridden', function () {
|
||||
config()->set('comments.broadcasting.enabled', true);
|
||||
|
||||
expect(Config::isBroadcastingEnabled())->toBeTrue();
|
||||
});
|
||||
|
||||
it('returns comments as default broadcast channel prefix', function () {
|
||||
expect(Config::getBroadcastChannelPrefix())->toBe('comments');
|
||||
});
|
||||
|
||||
it('returns custom broadcast channel prefix when overridden', function () {
|
||||
config()->set('comments.broadcasting.channel_prefix', 'my-app-comments');
|
||||
|
||||
expect(Config::getBroadcastChannelPrefix())->toBe('my-app-comments');
|
||||
});
|
||||
|
||||
it('returns 10s as default polling interval', function () {
|
||||
expect(Config::getPollingInterval())->toBe('10s');
|
||||
});
|
||||
|
||||
it('returns custom polling interval when overridden', function () {
|
||||
config()->set('comments.polling.interval', '30s');
|
||||
|
||||
expect(Config::getPollingInterval())->toBe('30s');
|
||||
});
|
||||
Reference in New Issue
Block a user