From 9ec84f19c101d23a6e39b70ad6024ee48215738c Mon Sep 17 00:00:00 2001 From: Joe <104938042+lrljoe@users.noreply.github.com> Date: Sun, 3 Sep 2023 22:36:40 +0100 Subject: [PATCH] Add Third Party Tests (#1340) * Add NonArray setAdditionalSelects Test * Update for FrontendAssets Test * Add ThirdPartyScripts/Styles to Test * Fix styling --------- Co-authored-by: lrljoe --- .../WithRappasoftTableThirdPartyScripts.php | 2 +- .../RappasoftFrontendAssetsTest.php | 24 +++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/src/Traits/Mechanisms/WithRappasoftTableThirdPartyScripts.php b/src/Traits/Mechanisms/WithRappasoftTableThirdPartyScripts.php index 4640690d4..e6bc28408 100644 --- a/src/Traits/Mechanisms/WithRappasoftTableThirdPartyScripts.php +++ b/src/Traits/Mechanisms/WithRappasoftTableThirdPartyScripts.php @@ -73,7 +73,7 @@ public static function tableThirdpartyJs(array $options = []): string ); return << + HTML; } } diff --git a/tests/Mechanisms/RappasoftFrontendAssetsTest.php b/tests/Mechanisms/RappasoftFrontendAssetsTest.php index 505ce2f2c..34832e102 100644 --- a/tests/Mechanisms/RappasoftFrontendAssetsTest.php +++ b/tests/Mechanisms/RappasoftFrontendAssetsTest.php @@ -30,4 +30,28 @@ public function scripts() $this->assertTrue($assets->hasRenderedRappsoftTableScripts); } + + /** @test */ + public function thirdPartystyles() + { + $assets = app(RappasoftFrontendAssets::class); + + $this->assertFalse($assets->hasRenderedRappsoftTableThirdPartyStyles); + + $this->assertStringStartsWith('', ltrim($assets->tableThirdPartyStyles())); + + $this->assertTrue($assets->hasRenderedRappsoftTableThirdPartyStyles); + } + + /** @test */ + public function thirdPartyscripts() + { + $assets = app(RappasoftFrontendAssets::class); + + $this->assertFalse($assets->hasRenderedRappsoftTableThirdPartyScripts); + + $this->assertStringStartsWith('