Skip to content
This repository was archived by the owner on Mar 18, 2025. It is now read-only.

Commit 34b3d4e

Browse files
committed
Fix switch-toggle test
1 parent 1bfb74e commit 34b3d4e

File tree

2 files changed

+18
-43
lines changed

2 files changed

+18
-43
lines changed

tests/Components/Choice/SwitchToggleTest.php

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,9 @@
55
namespace Rawilk\FormComponents\Tests\Components\Choice;
66

77
use Rawilk\FormComponents\Tests\Components\ComponentTestCase;
8-
use Spatie\Snapshots\MatchesSnapshots;
98

109
final class SwitchToggleTest extends ComponentTestCase
1110
{
12-
use MatchesSnapshots;
13-
1411
/** @test */
1512
public function can_be_rendered(): void
1613
{
@@ -32,9 +29,24 @@ public function accepts_a_container_class(): void
3229
/** @test */
3330
public function custom_attributes_are_applied_to_the_button(): void
3431
{
35-
$this->assertMatchesSnapshot(
36-
(string) $this->blade('<x-switch-toggle id="foo" class="foo-class" data-foo="bar" />')
37-
);
32+
$this->blade('<x-switch-toggle id="foo" class="foo-class" data-foo="bar" />')
33+
->assertSeeInOrder([
34+
'<button',
35+
'id="foo"',
36+
'>',
37+
], false)
38+
->assertSeeInOrder([
39+
'<button',
40+
'class="',
41+
'foo-class',
42+
'"',
43+
'>',
44+
], false)
45+
->assertSeeInOrder([
46+
'<button',
47+
'data-foo="bar"',
48+
'>',
49+
], false);
3850
}
3951

4052
/** @test */

tests/Components/Choice/__snapshots__/SwitchToggleTest__custom_attributes_are_applied_to_the_button__1.txt

Lines changed: 0 additions & 37 deletions
This file was deleted.

0 commit comments

Comments
 (0)