Skip to content

Commit 8c0d088

Browse files
authored
Merge pull request #143 from musimana/bugfix/MinorTestSuiteFixesV11.10.1
fix: Minor Test Suite Fixes
2 parents 1b62929 + 0b4c9f4 commit 8c0d088

File tree

3 files changed

+20
-6
lines changed

3 files changed

+20
-6
lines changed

tests/Enums/ExampleBlock.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,13 @@ public function exampleData(): ?array
4444
],
4545
],
4646
],
47-
self::PRIVACY_POLICY => null,
48-
self::SECTION_DIVIDER => null,
49-
self::STACK => null,
5047
self::TABS => [
5148
'tabs' => ['Tab One', 'Tab Two'],
5249
'tabContents' => ['<p>Tab one content.</p>', '<p>Tab two content.</p>'],
5350
],
5451
self::WYSIWYG => ['html' => '<p>test</p>'],
55-
default => BlockType::from($this->value)->staticData(),
52+
self::UNKNOWN => BlockType::from($this->value)->staticData(),
53+
default => null,
5654
};
5755
}
5856

tests/Pest/Expectations/ToHaveCorrectHtmlHead.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
'<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />',
3939
'<!-- Fonts -->',
4040
'<link rel="preconnect" href="https://fonts.bunny.net">',
41-
'<link href="https://fonts.bunny.net/css?family=figtree:400,500,600&display=swap" rel="stylesheet" />',
4241
'<!-- Scripts -->',
4342
'<script type="text/javascript">',
4443
'Ziggy',

tests/Unit/App/Http/Resources/Views/Public/Content/PrivacyPolicyContentResourceTest.php

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,24 @@
1616

1717
expect($actual['blocks'])
1818
->toBeArray()
19-
->toHaveCount(3);
19+
->toHaveCount(3)
20+
->toMatchArray([
21+
[
22+
'type' => 'wysiwyg',
23+
'data' => [
24+
'html' => '<h2 class="text-page-title">PRIVACY POLICY</h2>
25+
<p class="text-page-subtitle">' . config('app.name') . '</p>',
26+
],
27+
],
28+
[
29+
'type' => 'section-divider',
30+
'data' => [],
31+
],
32+
[
33+
'type' => 'privacy-policy',
34+
'data' => ['html' => view('partials.static-blocks.privacy')->render()],
35+
],
36+
]);
2037

2138
expect($actual)
2239
->toHaveCamelCaseKeys()

0 commit comments

Comments
 (0)