Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add icon column #1902

Merged
merged 12 commits into from
Aug 27, 2024
Prev Previous commit
Next Next commit
Fix broken FrontendAssetsTest - Remove superfluous getAttributes method
lrljoe committed Aug 27, 2024
commit 84369043b254ca562893dcd45522eda508fe6fff
6 changes: 0 additions & 6 deletions src/Views/Traits/Core/HasAttributes.php
Original file line number Diff line number Diff line change
@@ -28,12 +28,6 @@ public function hasAttributesCallback(): bool
return $this->attributesCallback !== null;
}

// TODO: Test
public function getAttributes(Model $row): array
{
return app()->call($this->getAttributesCallback(), ['row' => $row, 'value' => $this->getValue($row)]) ?? [];
}

// TODO: Test
public function getAttributeBag(Model $row): ComponentAttributeBag
{
8 changes: 4 additions & 4 deletions tests/Mechanisms/RappasoftFrontendAssetsTest.php
Original file line number Diff line number Diff line change
@@ -132,7 +132,7 @@

$this->assertFalse($assets->hasRenderedRappsoftTableStyles);

$this->assertStringStartsWith('<link href="/rappasoft/laravel-livewire-tables/core.min.css" rel="stylesheet" />', ltrim($assets->tableStyles()));
$this->assertStringStartsWith('<link href="/rappasoft/laravel-livewire-tables/core.min.css" rel="stylesheet" />', trim(ltrim($assets->tableStyles(), '<!-- Rappasoft Core Table Styles -->')));

Check failure on line 135 in tests/Mechanisms/RappasoftFrontendAssetsTest.php

GitHub Actions / PCOV - ubuntu-latest - P8.3 - L10 - prefer-dist

Failed asserting that 'ink href="/rappasoft/laravel-livewire-tables/core.min.css" rel="stylesheet" />' starts with "<link href="/rappasoft/laravel-livewire-tables/core.min.css" rel="stylesheet" />".

Check failure on line 135 in tests/Mechanisms/RappasoftFrontendAssetsTest.php

GitHub Actions / PULL PHP-8.1 - Laravel-10

Failed asserting that 'ink href="/rappasoft/laravel-livewire-tables/core.min.css" rel="stylesheet" />' starts with "<link href="/rappasoft/laravel-livewire-tables/core.min.css" rel="stylesheet" />".

Check failure on line 135 in tests/Mechanisms/RappasoftFrontendAssetsTest.php

GitHub Actions / PULL PHP-8.2 - Laravel-11

Failed asserting that 'ink href="/rappasoft/laravel-livewire-tables/core.min.css" rel="stylesheet" />' starts with "<link href="/rappasoft/laravel-livewire-tables/core.min.css" rel="stylesheet" />".

Check failure on line 135 in tests/Mechanisms/RappasoftFrontendAssetsTest.php

GitHub Actions / PULL PHP-8.2 - Laravel-10

Failed asserting that 'ink href="/rappasoft/laravel-livewire-tables/core.min.css" rel="stylesheet" />' starts with "<link href="/rappasoft/laravel-livewire-tables/core.min.css" rel="stylesheet" />".

Check failure on line 135 in tests/Mechanisms/RappasoftFrontendAssetsTest.php

GitHub Actions / PULL PHP-8.3 - Laravel-11

Failed asserting that 'ink href="/rappasoft/laravel-livewire-tables/core.min.css" rel="stylesheet" />' starts with "<link href="/rappasoft/laravel-livewire-tables/core.min.css" rel="stylesheet" />".

Check failure on line 135 in tests/Mechanisms/RappasoftFrontendAssetsTest.php

GitHub Actions / PULL PHP-8.3 - Laravel-10

Failed asserting that 'ink href="/rappasoft/laravel-livewire-tables/core.min.css" rel="stylesheet" />' starts with "<link href="/rappasoft/laravel-livewire-tables/core.min.css" rel="stylesheet" />".

$this->assertTrue($assets->hasRenderedRappsoftTableStyles);
}
@@ -143,7 +143,7 @@

$this->assertFalse($assets->hasRenderedRappsoftTableScripts);

$this->assertStringStartsWith('<script src="', $assets->tableScripts());
$this->assertStringStartsWith('<script src="', trim(ltrim($assets->tableScripts(), '<!-- Rappasoft Core Table Scripts -->')));

Check failure on line 146 in tests/Mechanisms/RappasoftFrontendAssetsTest.php

GitHub Actions / PCOV - ubuntu-latest - P8.3 - L10 - prefer-dist

Failed asserting that '="/rappasoft/laravel-livewire-tables/core.min.js" ></script>' starts with "<script src="".

Check failure on line 146 in tests/Mechanisms/RappasoftFrontendAssetsTest.php

GitHub Actions / PULL PHP-8.1 - Laravel-10

Failed asserting that '="/rappasoft/laravel-livewire-tables/core.min.js" ></script>' starts with "<script src="".

Check failure on line 146 in tests/Mechanisms/RappasoftFrontendAssetsTest.php

GitHub Actions / PULL PHP-8.2 - Laravel-11

Failed asserting that '="/rappasoft/laravel-livewire-tables/core.min.js" ></script>' starts with "<script src="".

Check failure on line 146 in tests/Mechanisms/RappasoftFrontendAssetsTest.php

GitHub Actions / PULL PHP-8.2 - Laravel-10

Failed asserting that '="/rappasoft/laravel-livewire-tables/core.min.js" ></script>' starts with "<script src="".

Check failure on line 146 in tests/Mechanisms/RappasoftFrontendAssetsTest.php

GitHub Actions / PULL PHP-8.3 - Laravel-11

Failed asserting that '="/rappasoft/laravel-livewire-tables/core.min.js" ></script>' starts with "<script src="".

Check failure on line 146 in tests/Mechanisms/RappasoftFrontendAssetsTest.php

GitHub Actions / PULL PHP-8.3 - Laravel-10

Failed asserting that '="/rappasoft/laravel-livewire-tables/core.min.js" ></script>' starts with "<script src="".

$this->assertTrue($assets->hasRenderedRappsoftTableScripts);
}
@@ -154,7 +154,7 @@

$this->assertFalse($assets->hasRenderedRappsoftTableThirdPartyStyles);

$this->assertStringStartsWith('<link href="/rappasoft/laravel-livewire-tables/thirdparty.css" rel="stylesheet" />', ltrim($assets->tableThirdPartyStyles()));
$this->assertStringStartsWith('<link href="/rappasoft/laravel-livewire-tables/thirdparty.css" rel="stylesheet" />', trim(ltrim($assets->tableThirdPartyStyles(), '<!-- Rappasoft Table Third Party Styles -->')));

Check failure on line 157 in tests/Mechanisms/RappasoftFrontendAssetsTest.php

GitHub Actions / PCOV - ubuntu-latest - P8.3 - L10 - prefer-dist

Failed asserting that 'nk href="/rappasoft/laravel-livewire-tables/thirdparty.css" rel="stylesheet" />' starts with "<link href="/rappasoft/laravel-livewire-tables/thirdparty.css" rel="stylesheet" />".

Check failure on line 157 in tests/Mechanisms/RappasoftFrontendAssetsTest.php

GitHub Actions / PULL PHP-8.1 - Laravel-10

Failed asserting that 'nk href="/rappasoft/laravel-livewire-tables/thirdparty.css" rel="stylesheet" />' starts with "<link href="/rappasoft/laravel-livewire-tables/thirdparty.css" rel="stylesheet" />".

Check failure on line 157 in tests/Mechanisms/RappasoftFrontendAssetsTest.php

GitHub Actions / PULL PHP-8.2 - Laravel-11

Failed asserting that 'nk href="/rappasoft/laravel-livewire-tables/thirdparty.css" rel="stylesheet" />' starts with "<link href="/rappasoft/laravel-livewire-tables/thirdparty.css" rel="stylesheet" />".

Check failure on line 157 in tests/Mechanisms/RappasoftFrontendAssetsTest.php

GitHub Actions / PULL PHP-8.2 - Laravel-10

Failed asserting that 'nk href="/rappasoft/laravel-livewire-tables/thirdparty.css" rel="stylesheet" />' starts with "<link href="/rappasoft/laravel-livewire-tables/thirdparty.css" rel="stylesheet" />".

Check failure on line 157 in tests/Mechanisms/RappasoftFrontendAssetsTest.php

GitHub Actions / PULL PHP-8.3 - Laravel-11

Failed asserting that 'nk href="/rappasoft/laravel-livewire-tables/thirdparty.css" rel="stylesheet" />' starts with "<link href="/rappasoft/laravel-livewire-tables/thirdparty.css" rel="stylesheet" />".

Check failure on line 157 in tests/Mechanisms/RappasoftFrontendAssetsTest.php

GitHub Actions / PULL PHP-8.3 - Laravel-10

Failed asserting that 'nk href="/rappasoft/laravel-livewire-tables/thirdparty.css" rel="stylesheet" />' starts with "<link href="/rappasoft/laravel-livewire-tables/thirdparty.css" rel="stylesheet" />".

$this->assertTrue($assets->hasRenderedRappsoftTableThirdPartyStyles);
}
@@ -165,7 +165,7 @@

$this->assertFalse($assets->hasRenderedRappsoftTableThirdPartyScripts);

$this->assertStringStartsWith('<script src="', $assets->tableThirdPartyScripts());
$this->assertStringStartsWith('<script src="', trim(ltrim($assets->tableThirdPartyScripts(), '<!-- Rappasoft Third Party Scripts -->')));

Check failure on line 168 in tests/Mechanisms/RappasoftFrontendAssetsTest.php

GitHub Actions / PCOV - ubuntu-latest - P8.3 - L10 - prefer-dist

Failed asserting that '="/rappasoft/laravel-livewire-tables/thirdparty.min.js" ></script>' starts with "<script src="".

Check failure on line 168 in tests/Mechanisms/RappasoftFrontendAssetsTest.php

GitHub Actions / PULL PHP-8.1 - Laravel-10

Failed asserting that '="/rappasoft/laravel-livewire-tables/thirdparty.min.js" ></script>' starts with "<script src="".

Check failure on line 168 in tests/Mechanisms/RappasoftFrontendAssetsTest.php

GitHub Actions / PULL PHP-8.2 - Laravel-11

Failed asserting that '="/rappasoft/laravel-livewire-tables/thirdparty.min.js" ></script>' starts with "<script src="".

Check failure on line 168 in tests/Mechanisms/RappasoftFrontendAssetsTest.php

GitHub Actions / PULL PHP-8.2 - Laravel-10

Failed asserting that '="/rappasoft/laravel-livewire-tables/thirdparty.min.js" ></script>' starts with "<script src="".

Check failure on line 168 in tests/Mechanisms/RappasoftFrontendAssetsTest.php

GitHub Actions / PULL PHP-8.3 - Laravel-11

Failed asserting that '="/rappasoft/laravel-livewire-tables/thirdparty.min.js" ></script>' starts with "<script src="".

Check failure on line 168 in tests/Mechanisms/RappasoftFrontendAssetsTest.php

GitHub Actions / PULL PHP-8.3 - Laravel-10

Failed asserting that '="/rappasoft/laravel-livewire-tables/thirdparty.min.js" ></script>' starts with "<script src="".

$this->assertTrue($assets->hasRenderedRappsoftTableThirdPartyScripts);
}