File tree Expand file tree Collapse file tree 5 files changed +53
-45
lines changed 
tests/Traits/Visuals/Themed Expand file tree Collapse file tree 5 files changed +53
-45
lines changed Original file line number Diff line number Diff line change 1+ <?php 
2+ 
3+ namespace  Rappasoft \LaravelLivewireTables \Tests \Traits \Visuals \Themed ;
4+ 
5+ use  Rappasoft \LaravelLivewireTables \Exceptions \DataTableConfigurationException ;
6+ 
7+ abstract  class  BasePaginationVisuals extends  ThemedTestCase
8+ {
9+     abstract  protected  function  setupBasicTableForBrowsing ();
10+ 
11+     abstract  protected  function  setupBasicTableSingleRecord ();
12+ 
13+     public  function  pagination_shows_by_default ()
14+     {
15+         return  $ this setupBasicTableForLivewire ();
16+     }
17+ 
18+     public  function  setupSingleRecordBasicTable ()
19+     {
20+         return  $ this setupBasicTableForLivewire ()
21+         ->call ('setPerPageAccepted ' , [1 ])
22+         ->call ('setPerPage ' , 1 );
23+     }
24+ 
25+     public  function  tableWithStandardDetailedPagination ()
26+     {
27+         return  $ this setupBasicTableSingleRecord ()
28+             ->call ('enableDetailedPagination ' , 'standard ' );
29+     }
30+ 
31+     public  function  tableWithSimpleDetailedPagination ()
32+     {
33+         return  $ this setupBasicTableSingleRecord ()
34+             ->call ('enableDetailedPagination ' , 'simple ' );
35+     }
36+ 
37+     public  function  test_per_page_dropdown_only_renders_with_accepted_values (): void 
38+     {
39+         $ this expectException (DataTableConfigurationException::class);
40+ 
41+         $ this setupBasicTableForBrowsing ()
42+             ->call ('setPerPage ' , 15 );
43+     }
44+ 
45+ 
46+ }
Original file line number Diff line number Diff line change 22
33namespace  Rappasoft \LaravelLivewireTables \Tests \Traits \Visuals \Themed \Bootstrap4 ;
44
5- use  Livewire \Livewire ;
6- use  Rappasoft \LaravelLivewireTables \Exceptions \DataTableConfigurationException ;
7- use  Rappasoft \LaravelLivewireTables \Tests \Http \Livewire \{PetsTable };
8- use  Rappasoft \LaravelLivewireTables \Tests \Traits \Visuals \Themed \ThemedTestCase ;
5+ use  Rappasoft \LaravelLivewireTables \Tests \Traits \Visuals \Themed \BasePaginationVisuals ;
96
10- final  class  BS4PaginationVisualsTest extends  ThemedTestCase 
7+ final  class  BS4PaginationVisualsTest extends  BasePaginationVisuals 
118{
129    protected  function  setupBasicTableForBrowsing ()
1310    {
Original file line number Diff line number Diff line change 22
33namespace  Rappasoft \LaravelLivewireTables \Tests \Traits \Visuals \Themed \Bootstrap5 ;
44
5- use  Livewire \Livewire ;
6- use  Rappasoft \LaravelLivewireTables \Exceptions \DataTableConfigurationException ;
7- use  Rappasoft \LaravelLivewireTables \Tests \Http \Livewire \{PetsTable };
8- use  Rappasoft \LaravelLivewireTables \Tests \Traits \Visuals \Themed \ThemedTestCase ;
5+ use  Rappasoft \LaravelLivewireTables \Tests \Traits \Visuals \Themed \BasePaginationVisuals ;
96
10- final  class  BS5PaginationVisualsTest extends  ThemedTestCase 
7+ final  class  BS5PaginationVisualsTest extends  BasePaginationVisuals 
118{
129    protected  function  setupBasicTableForBrowsing ()
1310    {
Original file line number Diff line number Diff line change 22
33namespace  Rappasoft \LaravelLivewireTables \Tests \Traits \Visuals \Themed \Tailwind ;
44
5- use  Livewire \Livewire ;
6- use  Rappasoft \LaravelLivewireTables \Exceptions \DataTableConfigurationException ;
7- use  Rappasoft \LaravelLivewireTables \Tests \Http \Livewire \{PetsTable };
8- use  Rappasoft \LaravelLivewireTables \Tests \Traits \Visuals \Themed \ThemedTestCase ;
5+ use  Rappasoft \LaravelLivewireTables \Tests \Traits \Visuals \Themed \BasePaginationVisuals ;
96
10- final  class  TWPaginationVisualsTest extends  ThemedTestCase 
7+ final  class  TWPaginationVisualsTest extends  BasePaginationVisuals 
118{
129    protected  function  setupBasicTableForBrowsing ()
1310    {
@@ -130,14 +127,6 @@ public function test_total_results_label_doesnt_show_with_pagination_hidden(): v
130127        ]); 
131128    }*/ 
132129
133-     public  function  test_per_page_dropdown_only_renders_with_accepted_values (): void 
134-     {
135-         $ this expectException (DataTableConfigurationException::class);
136- 
137-         $ this setupBasicTableForBrowsing ()
138-             ->call ('setPerPage ' , 15 );
139-     }
140- 
141130    public  function  test_can_get_currently_displayed_ids (): void 
142131    {
143132        $ this setupBasicTableForBrowsing ()
Original file line number Diff line number Diff line change 77use  Rappasoft \LaravelLivewireTables \Tests \Http \Livewire \{PetsTable };
88use  Rappasoft \LaravelLivewireTables \Tests \TestCase ;
99
10- abstract   class  ThemedTestCase extends  TestCase
10+ class  ThemedTestCase extends  TestCase
1111{
12-     abstract  protected  function  setupBasicTableForBrowsing ();
13- 
14-     abstract  protected  function  setupBasicTableSingleRecord ();
1512
1613    protected  function  setupBasicTableForLivewire ()
1714    {
@@ -23,22 +20,4 @@ public function pagination_shows_by_default()
2320        return  $ this setupBasicTableForLivewire ();
2421    }
2522
26-     public  function  setupSingleRecordBasicTable ()
27-     {
28-         return  $ this setupBasicTableForLivewire ()
29-             ->call ('setPerPageAccepted ' , [1 ])
30-             ->call ('setPerPage ' , 1 );
31-     }
32- 
33-     public  function  tableWithStandardDetailedPagination ()
34-     {
35-         return  $ this setupBasicTableSingleRecord ()
36-             ->call ('enableDetailedPagination ' , 'standard ' );
37-     }
38- 
39-     public  function  tableWithSimpleDetailedPagination ()
40-     {
41-         return  $ this setupBasicTableSingleRecord ()
42-             ->call ('enableDetailedPagination ' , 'simple ' );
43-     }
4423}
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments