From f6ebadcf63ade16259416512c03271e2941e526e Mon Sep 17 00:00:00 2001 From: Joe <104938042+lrljoe@users.noreply.github.com> Date: Sun, 1 Dec 2024 02:50:48 +0000 Subject: [PATCH] Add Lazy Search Tests (#2106) --- .../Traits/Configuration/SearchConfigurationTest.php | 10 +++++----- tests/Unit/Traits/Helpers/SearchHelpersTest.php | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/Unit/Traits/Configuration/SearchConfigurationTest.php b/tests/Unit/Traits/Configuration/SearchConfigurationTest.php index cc55f8362..6b6635533 100644 --- a/tests/Unit/Traits/Configuration/SearchConfigurationTest.php +++ b/tests/Unit/Traits/Configuration/SearchConfigurationTest.php @@ -96,23 +96,23 @@ public function test_cant_set_search_defer_with_other_search_modifiers(): void $this->basicTable->setSearchDebounce(1000); } - /*public function test_can_set_search_lazy(): void + public function test_can_set_search_lazy(): void { $this->assertFalse($this->basicTable->hasSearchLazy()); $this->basicTable->setSearchLazy(); $this->assertTrue($this->basicTable->hasSearchLazy()); - $this->assertSame('.lazy', $this->basicTable->getSearchOptions()); - }*/ + $this->assertSame('.live.lazy', $this->basicTable->getSearchOptions()); + } - /*public function test_cant_set_search_lazy_with_other_search_modifiers(): void + public function test_cant_set_search_lazy_with_other_search_modifiers(): void { $this->expectException(DataTableConfigurationException::class); $this->basicTable->setSearchLazy(); $this->basicTable->setSearchDebounce(1000); - }*/ + } public function test_can_set_search_live(): void { diff --git a/tests/Unit/Traits/Helpers/SearchHelpersTest.php b/tests/Unit/Traits/Helpers/SearchHelpersTest.php index f2d58597c..b9c0d153f 100644 --- a/tests/Unit/Traits/Helpers/SearchHelpersTest.php +++ b/tests/Unit/Traits/Helpers/SearchHelpersTest.php @@ -86,14 +86,14 @@ public function test_can_check_if_search_blur_is_set(): void $this->assertTrue($this->basicTable->hasSearchBlur()); } - /*public function test_can_check_if_search_lazy_is_set(): void + public function test_can_check_if_search_lazy_is_set(): void { $this->assertFalse($this->basicTable->hasSearchLazy()); $this->basicTable->setSearchLazy(); $this->assertTrue($this->basicTable->hasSearchLazy()); - }*/ + } public function test_can_check_if_search_throttle_is_set(): void {