-
-
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 Basic Tests for Loading Placeholder
- Loading branch information
Showing
2 changed files
with
58 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
|
||
namespace Rappasoft\LaravelLivewireTables\Tests\Traits\Configuration; | ||
|
||
use Rappasoft\LaravelLivewireTables\Tests\TestCase; | ||
|
||
class LoadingConfigurationTest extends TestCase | ||
{ | ||
/** @test */ | ||
public function can_set_loading_placeholder_status_enabled(): void | ||
{ | ||
$this->assertFalse($this->basicTable->hasDisplayLoadingPlaceholder()); | ||
|
||
$this->basicTable->setLoadingPlaceholderEnabled(); | ||
|
||
$this->assertTrue($this->basicTable->hasDisplayLoadingPlaceholder()); | ||
|
||
} | ||
|
||
/** @test */ | ||
public function can_set_loading_placeholder_status_disabled(): void | ||
{ | ||
$this->assertFalse($this->basicTable->hasDisplayLoadingPlaceholder()); | ||
|
||
$this->basicTable->setLoadingPlaceholderEnabled(); | ||
|
||
$this->assertTrue($this->basicTable->hasDisplayLoadingPlaceholder()); | ||
|
||
$this->basicTable->setLoadingPlaceholderDisabled(); | ||
|
||
$this->assertFalse($this->basicTable->hasDisplayLoadingPlaceholder()); | ||
|
||
} | ||
|
||
} |
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,23 @@ | ||
<?php | ||
|
||
namespace Rappasoft\LaravelLivewireTables\Tests\Traits\Helpers; | ||
|
||
use Rappasoft\LaravelLivewireTables\Tests\TestCase; | ||
|
||
class LoadingHelpersTest extends TestCase | ||
{ | ||
/** @test */ | ||
public function can_get_loading_placeholder_status(): void | ||
{ | ||
$this->assertFalse($this->basicTable->hasDisplayLoadingPlaceholder()); | ||
|
||
$this->basicTable->setLoadingPlaceholderEnabled(); | ||
|
||
$this->assertTrue($this->basicTable->getDisplayLoadingPlaceholder()); | ||
|
||
$this->assertTrue($this->basicTable->hasDisplayLoadingPlaceholder()); | ||
|
||
} | ||
|
||
|
||
} |