From 89faee6b65867a6aa4f0fad33528e6fdc80169b6 Mon Sep 17 00:00:00 2001 From: luanfreitasdev Date: Fri, 15 Nov 2024 09:24:35 -0300 Subject: [PATCH] Add toggle columns cypress tests --- resources/views/components/cols.blade.php | 28 ++++---- .../header/toggle-columns.blade.php | 4 +- .../tailwind/header/toggle-columns.blade.php | 4 +- resources/views/components/row.blade.php | 1 + .../e2e/setup/show-toggle-columns.cy.js | 64 +++++++++++++++++++ 5 files changed, 88 insertions(+), 13 deletions(-) create mode 100644 tests/cypress/cypress/e2e/setup/show-toggle-columns.cy.js diff --git a/resources/views/components/cols.blade.php b/resources/views/components/cols.blade.php index 615f086b..74ca0ffb 100644 --- a/resources/views/components/cols.blade.php +++ b/resources/views/components/cols.blade.php @@ -34,18 +34,24 @@ ? data_get($this->setUp, "responsive.sortOrder.{$field}", null) : null; @endphp - true, + data_get($column, 'headerClass') => true, + ]) + @style([ + 'display:none' => data_get($column, 'hidden') === true, + 'cursor:pointer' => data_get($column, 'enableSort'), + data_get($column, 'headerStyle') => filled(data_get($column, 'headerStyle')), + 'width: max-content !important', + ]) > -
+
{!! data_get($column, 'title') !!} @if (data_get($column, 'enableSort')) diff --git a/resources/views/components/frameworks/bootstrap5/header/toggle-columns.blade.php b/resources/views/components/frameworks/bootstrap5/header/toggle-columns.blade.php index e98d4a2b..ef16ed7b 100644 --- a/resources/views/components/frameworks/bootstrap5/header/toggle-columns.blade.php +++ b/resources/views/components/frameworks/bootstrap5/header/toggle-columns.blade.php @@ -2,6 +2,7 @@ @if (data_get($setUp, 'header.toggleColumns'))