Skip to content

Commit

Permalink
Fix cypress test + add filter number
Browse files Browse the repository at this point in the history
  • Loading branch information
luanfreitasdev committed Dec 18, 2023
1 parent 5d83cde commit 4188f72
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions tests/cypress/stubs/CypressTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,9 @@
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Support\Carbon;
use Livewire\Attributes\Url;
use PowerComponents\LivewirePowerGrid\Button;
use PowerComponents\LivewirePowerGrid\Column;
use PowerComponents\LivewirePowerGrid\Exportable;
use PowerComponents\LivewirePowerGrid\Facades\Filter;
use PowerComponents\LivewirePowerGrid\Footer;
use PowerComponents\LivewirePowerGrid\Header;
use PowerComponents\LivewirePowerGrid\PowerGrid;
use PowerComponents\LivewirePowerGrid\PowerGridColumns;
use PowerComponents\LivewirePowerGrid\PowerGridComponent;
use PowerComponents\LivewirePowerGrid\Traits\WithExport;
use PowerComponents\LivewirePowerGrid\{Button, Column, Exportable, Footer, Header, PowerGrid, PowerGridColumns, PowerGridComponent};

final class CypressTable extends PowerGridComponent
{
Expand Down Expand Up @@ -106,7 +99,7 @@ public function actions(User $row): array
{
return [
Button::add('edit')
->slot('Edit: '.$row->id)
->slot('Edit: ' . $row->id)
->id()
->class('pg-btn-white dark:ring-pg-primary-600 dark:border-pg-primary-600 dark:hover:bg-pg-primary-700 dark:ring-offset-pg-primary-800 dark:text-pg-primary-300 dark:bg-pg-primary-700')
->dispatch('edit', ['rowId' => $row->id]),
Expand Down Expand Up @@ -140,7 +133,7 @@ public function actionRules($row): array
$apply = null;

if ($this->dynamicRules && $this->applyRules) {
eval('$apply = ['.$this->dynamicRules.'];');
eval('$apply = [' . $this->dynamicRules . '];');

return $apply;
}
Expand Down

0 comments on commit 4188f72

Please sign in to comment.