Merge branch 'tusharnain4578/development' into development
This commit is contained in:
commit
684a9dee8e
|
@ -20,20 +20,22 @@
|
|||
'label' => trans('preferences.notifications_opt_own_page_changes'),
|
||||
])
|
||||
</div>
|
||||
<div>
|
||||
@include('form.toggle-switch', [
|
||||
'name' => 'preferences[own-page-comments]',
|
||||
'value' => $preferences->notifyOnOwnPageComments(),
|
||||
'label' => trans('preferences.notifications_opt_own_page_comments'),
|
||||
])
|
||||
</div>
|
||||
<div>
|
||||
@include('form.toggle-switch', [
|
||||
'name' => 'preferences[comment-replies]',
|
||||
'value' => $preferences->notifyOnCommentReplies(),
|
||||
'label' => trans('preferences.notifications_opt_comment_replies'),
|
||||
])
|
||||
</div>
|
||||
@if (!setting('app-disable-comments'))
|
||||
<div>
|
||||
@include('form.toggle-switch', [
|
||||
'name' => 'preferences[own-page-comments]',
|
||||
'value' => $preferences->notifyOnOwnPageComments(),
|
||||
'label' => trans('preferences.notifications_opt_own_page_comments'),
|
||||
])
|
||||
</div>
|
||||
<div>
|
||||
@include('form.toggle-switch', [
|
||||
'name' => 'preferences[comment-replies]',
|
||||
'value' => $preferences->notifyOnCommentReplies(),
|
||||
'label' => trans('preferences.notifications_opt_comment_replies'),
|
||||
])
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="mt-auto">
|
||||
|
|
|
@ -156,6 +156,19 @@ class UserPreferencesTest extends TestCase
|
|||
$this->assertPermissionError($resp);
|
||||
}
|
||||
|
||||
public function test_notification_comment_options_only_exist_if_comments_active()
|
||||
{
|
||||
$resp = $this->asEditor()->get('/preferences/notifications');
|
||||
$resp->assertSee('Notify upon comments');
|
||||
$resp->assertSee('Notify upon replies');
|
||||
|
||||
setting()->put('app-disable-comments', true);
|
||||
|
||||
$resp = $this->get('/preferences/notifications');
|
||||
$resp->assertDontSee('Notify upon comments');
|
||||
$resp->assertDontSee('Notify upon replies');
|
||||
}
|
||||
|
||||
public function test_update_sort_preference()
|
||||
{
|
||||
$editor = $this->users->editor();
|
||||
|
|
Loading…
Reference in New Issue