From 1e5d809f7dfed3cd0b062a648907c52d0462efea Mon Sep 17 00:00:00 2001 From: LRLJoe Date: Mon, 16 Dec 2024 03:15:02 +0000 Subject: [PATCH] Add label fixes --- tests/Unit/Views/ColumnTest.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/Unit/Views/ColumnTest.php b/tests/Unit/Views/ColumnTest.php index 544a3b273..875b0f5c9 100644 --- a/tests/Unit/Views/ColumnTest.php +++ b/tests/Unit/Views/ColumnTest.php @@ -115,6 +115,18 @@ public function test_cannot_collapse_on_tablet_and_mobile(): void $contents = $column->renderContents($rows->first()); } + public function test_custom_sorting_pills_defaults_correctly(): void + { + $column = Column::make('Name', 'name'); + $defaultString = __($this->basicTable->getLocalisationPath().'not_applicable'); + + $this->assertSame('A-Z', $column->getCustomSortingPillDirections('asc')); + $this->assertSame('Z-A', $column->getCustomSortingPillDirections('desc')); + $this->assertSame($defaultString, $column->getCustomSortingPillDirections('faulty_string')); + + } + + public function test_custom_sorting_pills_label_defaults_correctly(): void { $column = Column::make('Name', 'name');