Skip to content

Commit

Permalink
Merge pull request #1536 from LowerRockLabs/v3-UnusedCleanup
Browse files Browse the repository at this point in the history
- Add additional Lifecycle Hook by @lrljoe in #1534
  - SettingColumns/ColumnsSet
- Migrate methods for pre-render out of render by @lrljoe in #1534
- Update tests to reflect hooks by @lrljoe in #1534
- Update tests to add invalid string tests for dates by @lrljoe in #1534
- Remove maps and minimise functions from FrontendAssets by @lrljoe in #1534
  • Loading branch information
lrljoe authored Nov 3, 2023
2 parents 3a3b42c + 642b435 commit f73b59e
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ All notable changes to `laravel-livewire-tables` will be documented in this file
- SettingColumns/ColumnsSet
- Migrate methods for pre-render out of render by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/1534
- Update tests to reflect hooks by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/1534
- Update tests to add invalid string tests for dates by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/1534
- Remove maps and minimise functions from FrontendAssets by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/1534

## [v3.1.2] - 2023-11-03
- Add Initial Lifecycle Hooks - Configuring/Configured by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/1520
Expand Down
3 changes: 2 additions & 1 deletion src/Mechanisms/RappasoftFrontendAssets.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ protected function pretendResponseIsCSS(string $file): \Symfony\Component\HttpFo
return response()->file($file, $headers);
}

/*
public function maps(): \Symfony\Component\HttpFoundation\Response
{
return Utils::pretendResponseIsFile(__DIR__.'/../../../resources/js/laravel-livewire-tables.min.js.map');
Expand All @@ -117,5 +118,5 @@ public function maps(): \Symfony\Component\HttpFoundation\Response
protected static function minify(string $subject): array|string|null
{
return preg_replace('~(\v|\t|\s{2,})~m', '', $subject);
}
}*/
}
10 changes: 10 additions & 0 deletions tests/Views/Filters/DateFilterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,4 +167,14 @@ public function test_can_get_filter_pills_value(): void

$this->assertSame($dateTime->format('d M Y'), self::$filterInstance->getFilterPillValue($dateTime->format('Y-m-d')));
}

/**
* @test
*/
public function test_can_not_get_filter_pills_invalid_value(): void
{
$dateTime = (new DateTime('now'));

$this->assertNull(self::$filterInstance->getFilterPillValue('2022-2111'));
}
}
10 changes: 10 additions & 0 deletions tests/Views/Filters/DateTimeFilterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,4 +146,14 @@ public function test_can_get_filter_pills_value(): void

$this->assertSame($dateTime->format('d M Y - H:i'), self::$filterInstance->getFilterPillValue($dateTime->format('Y-m-d\TH:i')));
}

/**
* @test
*/
public function test_can_not_get_filter_pills_invalid_value(): void
{
$dateTime = (new DateTime('now'));

$this->assertNull(self::$filterInstance->getFilterPillValue('2022-1111'));
}
}

0 comments on commit f73b59e

Please sign in to comment.