File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33return [
44 'label ' => 'التعليقات ' ,
55 'placeholder ' => 'اكتب تعليقك… ' ,
6+ 'add_comment ' => 'أضف تعليقًا ' ,
67 'no_comments_yet ' => 'لا توجد تعليقات . ' ,
78
89 'user_avatar_alt ' => 'صورة المستخدم ' ,
Original file line number Diff line number Diff line change 33return [
44 'label ' => 'Comments ' ,
55 'placeholder ' => 'Type your comment… ' ,
6+ 'add_comment ' => 'Add a comment ' ,
67 'no_comments_yet ' => 'No comments yet. ' ,
78
89 'user_avatar_alt ' => 'User Avatar ' ,
Original file line number Diff line number Diff line change 33return [
44 'label ' => 'Comentarios ' ,
55 'placeholder ' => 'Escribe tu comentario... ' ,
6+ 'add_comment ' => 'Añadir un comentario ' ,
67 'no_comments_yet ' => 'Aún no hay comentarios. ' ,
78
89 'user_avatar_alt ' => 'Avatar de usuario ' ,
Original file line number Diff line number Diff line change 33return [
44 'label ' => 'Commentaires ' ,
55 'placeholder ' => 'Rédiger votre commentaire... ' ,
6+ 'add_comment ' => 'Ajouter un commentaire ' ,
67 'no_comments_yet ' => 'Aucun commentaire pour le moment. ' ,
78
89 'user_avatar_alt ' => 'Avatar de l \'utilisateur ' ,
Original file line number Diff line number Diff line change 22
33return [
44 'label ' => 'Opmerkingen ' ,
5+ 'add_comment ' => 'Een opmerking toevoegen ' ,
56 'no_comments_yet ' => 'Nog geen opmerkingen. ' ,
67
78 'user_avatar_alt ' => 'Profielfoto ' ,
Original file line number Diff line number Diff line change 33return [
44 'label ' => 'Comentarii ' ,
55 'placeholder ' => 'Scrie comentariul tău... ' ,
6+ 'add_comment ' => 'Adaugă un comentariu ' ,
67 'no_comments_yet ' => 'Niciun comentariu încă. ' ,
78
89 'user_avatar_alt ' => 'Avatar ' ,
Original file line number Diff line number Diff line change 44 {{-- Main Comments Area --}}
55 <div class =" comm:flex-1 comm:space-y-2" >
66 @if (Config:: resolveAuthenticatedUser ()?-> can (' create' , Config:: getCommentModel ()) )
7- <form wire:submit.prevent = " save " x-cloak >
7+ <div x-cloak role = " form " aria-label = " {{ __ ( ' commentions::comments.add_comment ' ) } } " >
88 {{-- tiptap editor --}}
99 <div class =" comm:relative tip-tap-container comm:mb-2" x-on:click =" wasFocused = true" wire:ignore >
1010 <div
2929 >{{ __ (' commentions::comments.cancel' ) } } </x-filament::button >
3030 </div >
3131 </template >
32- </form >
32+ </div >
3333 @endif
3434
3535 <livewire:dynamic-component
Original file line number Diff line number Diff line change 8383 Event::assertNotDispatched (CommentWasCreatedEvent::class);
8484});
8585
86+ test ('comments composer does not render a form element ' , function () {
87+ /** @var User $user */
88+ $ user = User::factory ()->create ();
89+ actingAs ($ user );
90+
91+ $ post = Post::factory ()->create ();
92+
93+ livewire (Comments::class, [
94+ 'record ' => $ post ,
95+ ])
96+ ->assertDontSeeHtml ('<form ' )
97+ ->assertSeeHtml ('role="form" ' )
98+ ->assertSeeHtml ('wire:click="save" ' );
99+ });
100+
86101test ('comments editor includes prefixed component alias ' , function () {
87102 /** @var User $user */
88103 $ user = User::factory ()->create ();
You can’t perform that action at this time.
0 commit comments