-
-
Notifications
You must be signed in to change notification settings - Fork 344
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add NonArray setAdditionalSelects Test * Update for FrontendAssets Test * Add ThirdPartyScripts/Styles to Test * Add ThirdParty Tests * Fix AutoInjection Issue * Fix 3rd party test * Set default back to remote 3rd party assets * Add CodeCov YML * Update CodeCov - 80% minimum * Add Filter Custom Pills Blade Test * Fix styling * Add formatted column test * Column - Get Formatted Contents Test * Fix styling --------- Co-authored-by: lrljoe <[email protected]>
- Loading branch information
Showing
7 changed files
with
99 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
coverage: | ||
status: | ||
project: | ||
default: | ||
target: 80% | ||
threshold: 1% | ||
patch: | ||
default: | ||
target: 80% | ||
threshold: 1% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<?php | ||
|
||
namespace Rappasoft\LaravelLivewireTables\Tests\Features; | ||
|
||
use Rappasoft\LaravelLivewireTables\Features\AutoInjectRappasoftAssets; | ||
use Rappasoft\LaravelLivewireTables\Tests\TestCase; | ||
|
||
class AutoInjectRappasoftAssetsTest extends TestCase | ||
{ | ||
/** @test */ | ||
public function shouldInjectRappasoftAndThirdParty() | ||
{ | ||
config()->set('livewire-tables.inject_assets', true); | ||
config()->set('livewire-tables.inject_third_party_assets', true); | ||
config()->set('livewire-tables.published_third_party_assets', false); | ||
config()->set('livewire-tables.remote_third_party_assets', false); | ||
$this->assertEquals('<html><head> <link href="/rappasoft/laravel-livewire-tables/core.min.css" rel="stylesheet" /> <link href="/rappasoft/laravel-livewire-tables/thirdparty.css" rel="stylesheet" /><script src="/rappasoft/laravel-livewire-tables/core.min.js" ></script> <script src="/rappasoft/laravel-livewire-tables/thirdparty.min.js" type="module" ></script></head><body></body></html>', AutoInjectRappasoftAssets::injectAssets('<html><head></head><body></body></html>')); | ||
} | ||
|
||
/** @test */ | ||
public function shouldNotInjectRappasoftOrThirdParty() | ||
{ | ||
config()->set('livewire-tables.inject_assets', false); | ||
config()->set('livewire-tables.inject_third_party_assets', false); | ||
config()->set('livewire-tables.published_third_party_assets', false); | ||
config()->set('livewire-tables.remote_third_party_assets', false); | ||
$this->assertEquals('<html><head> </head><body></body></html>', AutoInjectRappasoftAssets::injectAssets('<html><head></head><body></body></html>')); | ||
} | ||
|
||
/** @test */ | ||
public function shouldOnlyInjectThirdParty() | ||
{ | ||
config()->set('livewire-tables.inject_assets', false); | ||
config()->set('livewire-tables.inject_third_party_assets', true); | ||
config()->set('livewire-tables.published_third_party_assets', false); | ||
config()->set('livewire-tables.remote_third_party_assets', false); | ||
|
||
$this->assertEquals('<html><head> <link href="/rappasoft/laravel-livewire-tables/thirdparty.css" rel="stylesheet" /> <script src="/rappasoft/laravel-livewire-tables/thirdparty.min.js" type="module" ></script></head><body></body></html>', AutoInjectRappasoftAssets::injectAssets('<html><head></head><body></body></html>')); | ||
} | ||
|
||
/** @test */ | ||
public function shouldOnlyInjectRappasoft() | ||
{ | ||
config()->set('livewire-tables.inject_assets', true); | ||
config()->set('livewire-tables.inject_third_party_assets', false); | ||
config()->set('livewire-tables.published_third_party_assets', false); | ||
config()->set('livewire-tables.remote_third_party_assets', false); | ||
|
||
$this->assertEquals('<html><head> <link href="/rappasoft/laravel-livewire-tables/core.min.css" rel="stylesheet" /> <script src="/rappasoft/laravel-livewire-tables/core.min.js" ></script> </head><body></body></html>', AutoInjectRappasoftAssets::injectAssets('<html><head></head><body></body></html>')); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters