From 9c223ca1336cd9c7f7967c56e5b5ad6eb30d8610 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Thu, 11 Aug 2022 21:44:10 +0200 Subject: [PATCH 01/14] Always return string --- packages/framework/src/Services/RssFeedService.php | 4 ++-- packages/framework/src/Services/SitemapService.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/framework/src/Services/RssFeedService.php b/packages/framework/src/Services/RssFeedService.php index 7b659e60611..992f8801b68 100644 --- a/packages/framework/src/Services/RssFeedService.php +++ b/packages/framework/src/Services/RssFeedService.php @@ -44,9 +44,9 @@ public function generate(): static return $this; } - public function getXML(): string|bool + public function getXML(): string { - return $this->feed->asXML(); + return (string) $this->feed->asXML(); } protected function addItem(MarkdownPost $post): void diff --git a/packages/framework/src/Services/SitemapService.php b/packages/framework/src/Services/SitemapService.php index bbb15e59440..de96af30682 100644 --- a/packages/framework/src/Services/SitemapService.php +++ b/packages/framework/src/Services/SitemapService.php @@ -44,11 +44,11 @@ public function generate(): static return $this; } - public function getXML(): string|bool + public function getXML(): string { $this->xmlElement->addAttribute('processing_time_ms', (string) round((microtime(true) - $this->time_start) * 1000, 2)); - return $this->xmlElement->asXML(); + return (string) $this->xmlElement->asXML(); } public function addRoute(RouteContract $route): void From dd7be92ff4144a790307083590e618c02f5f2837 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Thu, 11 Aug 2022 22:10:26 +0200 Subject: [PATCH 02/14] Use less specific assertion to prevent false negatives --- packages/framework/tests/Feature/MetadataTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/framework/tests/Feature/MetadataTest.php b/packages/framework/tests/Feature/MetadataTest.php index ad9bc620193..b7f8d820018 100644 --- a/packages/framework/tests/Feature/MetadataTest.php +++ b/packages/framework/tests/Feature/MetadataTest.php @@ -400,7 +400,7 @@ public function test_adds_title_property_when_title_is_set_in_post() public function test_does_not_add_title_property_when_title_is_not_set_in_post() { $page = new MarkdownPost(); - $this->assertPageDoesNotHaveMetadata($page, ''); + $this->assertPageDoesNotHaveMetadata($page, ' Date: Thu, 11 Aug 2022 22:11:51 +0200 Subject: [PATCH 03/14] Use the same opengraph title format for pages and posts --- RELEASE_NOTES.md | 2 +- packages/framework/src/Models/Metadata/Metadata.php | 8 ++++---- packages/framework/tests/Feature/MetadataTest.php | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index e3d1b60364c..448363b3ec6 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -13,7 +13,7 @@ This serves two purposes: - for new features. ### Changed -- for changes in existing functionality. +- Blog posts now have the same opengraph title format as other pages ### Deprecated - for soon-to-be removed features. diff --git a/packages/framework/src/Models/Metadata/Metadata.php b/packages/framework/src/Models/Metadata/Metadata.php index 111b98c1f75..e404e45f2d9 100644 --- a/packages/framework/src/Models/Metadata/Metadata.php +++ b/packages/framework/src/Models/Metadata/Metadata.php @@ -100,6 +100,10 @@ protected function addMetadataForMarkdownPost(MarkdownPost $page): void $this->add(Meta::name('author', $page->get('author'))); } + if ($page->has('title')) { + $this->add(Meta::property('title', $page->htmlTitle())); + } + if ($page->has('category')) { $this->add(Meta::name('keywords', $page->get('category'))); } @@ -108,10 +112,6 @@ protected function addMetadataForMarkdownPost(MarkdownPost $page): void $this->add(Meta::property('url', $page->get('canonicalUrl'))); } - if ($page->has('title')) { - $this->add(Meta::property('title', $page->get('title'))); - } - if ($page->has('date')) { $this->add(Meta::property('og:article:published_time', $page->date->datetime)); } diff --git a/packages/framework/tests/Feature/MetadataTest.php b/packages/framework/tests/Feature/MetadataTest.php index b7f8d820018..4162a2fec7e 100644 --- a/packages/framework/tests/Feature/MetadataTest.php +++ b/packages/framework/tests/Feature/MetadataTest.php @@ -394,7 +394,7 @@ public function test_does_not_add_url_property_when_canonical_url_is_null() public function test_adds_title_property_when_title_is_set_in_post() { $page = MarkdownPost::make(matter: ['title' => 'My Title']); - $this->assertPageHasMetadata($page, ''); + $this->assertPageHasMetadata($page, ''); } public function test_does_not_add_title_property_when_title_is_not_set_in_post() From 84786af87d083c13587008222017f6edb97c8bdc Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Thu, 11 Aug 2022 22:12:07 +0200 Subject: [PATCH 04/14] Remove redundant override --- packages/framework/src/Models/Metadata/Metadata.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/packages/framework/src/Models/Metadata/Metadata.php b/packages/framework/src/Models/Metadata/Metadata.php index e404e45f2d9..6fa4dacca21 100644 --- a/packages/framework/src/Models/Metadata/Metadata.php +++ b/packages/framework/src/Models/Metadata/Metadata.php @@ -100,10 +100,6 @@ protected function addMetadataForMarkdownPost(MarkdownPost $page): void $this->add(Meta::name('author', $page->get('author'))); } - if ($page->has('title')) { - $this->add(Meta::property('title', $page->htmlTitle())); - } - if ($page->has('category')) { $this->add(Meta::name('keywords', $page->get('category'))); } From a310d863b3ae6e0ae541facb10259b1d2922bf26 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Thu, 11 Aug 2022 22:17:08 +0200 Subject: [PATCH 05/14] Create helper method to reduce repeated code --- .../src/Models/Metadata/Metadata.php | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/packages/framework/src/Models/Metadata/Metadata.php b/packages/framework/src/Models/Metadata/Metadata.php index 6fa4dacca21..8de694b533f 100644 --- a/packages/framework/src/Models/Metadata/Metadata.php +++ b/packages/framework/src/Models/Metadata/Metadata.php @@ -92,17 +92,10 @@ protected function generate(): void protected function addMetadataForMarkdownPost(MarkdownPost $page): void { - if ($page->has('description')) { - $this->add(Meta::name('description', $page->get('description'))); - } - - if ($page->has('author')) { - $this->add(Meta::name('author', $page->get('author'))); - } - - if ($page->has('category')) { - $this->add(Meta::name('keywords', $page->get('category'))); - } + $this->addPostMetadataIfExists($page, 'description'); + $this->addPostMetadataIfExists($page, 'author'); + $this->addPostMetadataIfExists($page, 'category', 'keywords'); + $this->addPostMetadataIfExists($page, 'canonicalUrl', 'url'); if ($page->has('canonicalUrl')) { $this->add(Meta::property('url', $page->get('canonicalUrl'))); @@ -119,6 +112,13 @@ protected function addMetadataForMarkdownPost(MarkdownPost $page): void $this->add(Meta::property('type', 'article')); } + protected function addPostMetadataIfExists(MarkdownPost $page, string $property, ?string $name = null): void + { + if ($page->has($property)) { + $this->add(Meta::name($name ?? $property, $page->get($property))); + } + } + protected function getPrefixedArray(string $group): array { $array = []; From fc78e124237d0613212ac5f6b7a49cc0465ef880 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Thu, 11 Aug 2022 22:23:12 +0200 Subject: [PATCH 06/14] Expect the same opengraph title format for pages and posts --- packages/framework/tests/Feature/MetadataViewTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/framework/tests/Feature/MetadataViewTest.php b/packages/framework/tests/Feature/MetadataViewTest.php index 36478c90fba..94979dceaef 100644 --- a/packages/framework/tests/Feature/MetadataViewTest.php +++ b/packages/framework/tests/Feature/MetadataViewTest.php @@ -137,7 +137,7 @@ public function test_metadata_tags_in_empty_markdown_post() '', '', '', - '', + '', '', '', '', @@ -175,7 +175,7 @@ public function test_metadata_tags_in_markdown_post_with_flat_front_matter() '', '', '', - '', + '', '', '', '', From 3fe66411797b4041ae130a7a5962fe278bd3355f Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Thu, 11 Aug 2022 22:31:29 +0200 Subject: [PATCH 07/14] Split assertions to make it easier to debug --- .../framework/tests/Feature/MetadataViewTest.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/packages/framework/tests/Feature/MetadataViewTest.php b/packages/framework/tests/Feature/MetadataViewTest.php index 94979dceaef..0c41a27d6b8 100644 --- a/packages/framework/tests/Feature/MetadataViewTest.php +++ b/packages/framework/tests/Feature/MetadataViewTest.php @@ -60,9 +60,15 @@ protected function assertAllTagsWereCovered(string $page, array $tags): void $actualMeta = substr_count($haystack, 'assertEquals( - $links + $meta, - $actualLinks + $actualMeta, - "Failed asserting that all tags were covered in the page '$page'" + $meta, + $actualMeta, + "Failed asserting that all meta tags were covered in the page '$page'" + ); + + $this->assertEquals( + $links, + $actualLinks, + "Failed asserting that all link tags were covered in the page '$page'" ); } From 1be49df3c4bfeb4e669ac460cfc57fc12a32cb4a Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Thu, 11 Aug 2022 22:32:45 +0200 Subject: [PATCH 08/14] Inline unnecessary local test variables --- .../tests/Feature/MetadataViewTest.php | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/packages/framework/tests/Feature/MetadataViewTest.php b/packages/framework/tests/Feature/MetadataViewTest.php index 0c41a27d6b8..5da795a6692 100644 --- a/packages/framework/tests/Feature/MetadataViewTest.php +++ b/packages/framework/tests/Feature/MetadataViewTest.php @@ -51,23 +51,18 @@ protected function assertSee(string $page, string|array $text): string|array protected function assertAllTagsWereCovered(string $page, array $tags): void { - $haystack = file_get_contents(Hyde::path("_site/$page.html")); - $links = substr_count($haystack, 'assertEquals( - $meta, - $actualMeta, + substr_count($expected, 'assertEquals( - $links, - $actualLinks, + substr_count($expected, ' Date: Thu, 11 Aug 2022 22:36:40 +0200 Subject: [PATCH 09/14] Add missing URL assertions --- packages/framework/tests/Feature/MetadataViewTest.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/framework/tests/Feature/MetadataViewTest.php b/packages/framework/tests/Feature/MetadataViewTest.php index 5da795a6692..5bddabaa6c4 100644 --- a/packages/framework/tests/Feature/MetadataViewTest.php +++ b/packages/framework/tests/Feature/MetadataViewTest.php @@ -138,6 +138,7 @@ public function test_metadata_tags_in_empty_markdown_post() '', '', '', + '', '', '', '', @@ -176,6 +177,7 @@ public function test_metadata_tags_in_markdown_post_with_flat_front_matter() '', '', '', + '', '', '', '', From 96f45d602eedeb5de9a62620635a1298cecc87d3 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Thu, 11 Aug 2022 22:41:22 +0200 Subject: [PATCH 10/14] Expect the same opengraph title format for pages and posts --- .../tests/Feature/Commands/StaticSiteBuilderPostModuleTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/framework/tests/Feature/Commands/StaticSiteBuilderPostModuleTest.php b/packages/framework/tests/Feature/Commands/StaticSiteBuilderPostModuleTest.php index 69c21c3004b..be12bc1552f 100644 --- a/packages/framework/tests/Feature/Commands/StaticSiteBuilderPostModuleTest.php +++ b/packages/framework/tests/Feature/Commands/StaticSiteBuilderPostModuleTest.php @@ -95,7 +95,7 @@ public function test_post_contains_expected_meta_tags() '', '', '', - '', + '', '', ]); } From fd90ee98700915fa391fb9c2937378d730af54fd Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Thu, 11 Aug 2022 22:46:38 +0200 Subject: [PATCH 11/14] Extract to helper method --- .../src/Models/Metadata/Metadata.php | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/packages/framework/src/Models/Metadata/Metadata.php b/packages/framework/src/Models/Metadata/Metadata.php index 8de694b533f..c6445f68960 100644 --- a/packages/framework/src/Models/Metadata/Metadata.php +++ b/packages/framework/src/Models/Metadata/Metadata.php @@ -76,17 +76,22 @@ protected function generate(): void ])); } - if ($this->page->has('canonicalUrl')) { - $this->add(Meta::link('canonical', $this->page->get('canonicalUrl'))); + $this->addDynamicPageMetadata($this->page); + } + + protected function addDynamicPageMetadata(AbstractPage $page): void + { + if ($page->has('canonicalUrl')) { + $this->add(Meta::link('canonical', $page->get('canonicalUrl'))); } - if ($this->page->has('title')) { - $this->add(Meta::name('twitter:title', $this->page->htmlTitle())); - $this->add(Meta::property('title', $this->page->htmlTitle())); + if ($page->has('title')) { + $this->add(Meta::name('twitter:title', $page->htmlTitle())); + $this->add(Meta::property('title', $page->htmlTitle())); } - if ($this->page instanceof MarkdownPost) { - $this->addMetadataForMarkdownPost($this->page); + if ($page instanceof MarkdownPost) { + $this->addMetadataForMarkdownPost($page); } } From ae9f995d1fa8703ea589997ced04f7a66a50769f Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Thu, 11 Aug 2022 22:54:13 +0200 Subject: [PATCH 12/14] Update benchmark results history --- tests/Benchmarks/MarkdownBenchmark.php | 6 ++++-- tests/Benchmarks/PageParserBenchmark.php | 4 ++++ tests/Benchmarks/SearchIndexBenchmark.php | 14 ++++++++------ tests/Benchmarks/StaticSiteBuilderBenchmark.php | 3 ++- 4 files changed, 18 insertions(+), 9 deletions(-) diff --git a/tests/Benchmarks/MarkdownBenchmark.php b/tests/Benchmarks/MarkdownBenchmark.php index 3fb82990984..3d7387c4510 100644 --- a/tests/Benchmarks/MarkdownBenchmark.php +++ b/tests/Benchmarks/MarkdownBenchmark.php @@ -8,7 +8,8 @@ class MarkdownBenchmark extends BenchCase { /** * Results history: - * #f4d8d452b 'avg_iteration_time': '0.42493788ms',. + * - #f4d8d452b: 0.42493788ms + * - #fd90ee987: 0.09853745ms */ public function testMarkdownParserFacadeShort() { @@ -19,7 +20,8 @@ public function testMarkdownParserFacadeShort() /** * Results history: - * #f4d8d452b 'avg_iteration_time': '2.62538815ms',. + * - #f4d8d452b 2.62538815ms + * - #fd90ee987: 2.07124043ms */ public function testMarkdownParserFacadeFull() { diff --git a/tests/Benchmarks/PageParserBenchmark.php b/tests/Benchmarks/PageParserBenchmark.php index 346c077d2a7..7482e961e81 100644 --- a/tests/Benchmarks/PageParserBenchmark.php +++ b/tests/Benchmarks/PageParserBenchmark.php @@ -15,6 +15,7 @@ class PageParserBenchmark extends BenchCase * Results history: * - #14c34beb1: 0.17022841ms. * - #0db04eaef: 0.2702086ms. + * - #fd90ee987: 0.28220031ms */ public function testParseBladePageFile() { @@ -34,6 +35,7 @@ public function testParseBladePageFile() * Results history: * - #8e165366a: 0.1986541ms. * - #0db04eaef: 0.29952221ms. + * - #fd90ee987: 0.30080938ms */ public function testParseMarkdownPageFile() { @@ -53,6 +55,7 @@ public function testParseMarkdownPageFile() * Results history: * - #5d044679b: 0.30337441ms. * - #0db04eaef: 0.39583502ms. + * - #fd90ee987: 0.41671791ms */ public function testParseMarkdownPostFile() { @@ -72,6 +75,7 @@ public function testParseMarkdownPostFile() * Results history: * - #6f63f5016: 0.16660199ms. * - #0db04eaef: 0.2729635ms. + * - #fd90ee987: 0.27649839ms */ public function testParseDocumentationPageFile() { diff --git a/tests/Benchmarks/SearchIndexBenchmark.php b/tests/Benchmarks/SearchIndexBenchmark.php index 73e8624de20..4d60c0f0be6 100644 --- a/tests/Benchmarks/SearchIndexBenchmark.php +++ b/tests/Benchmarks/SearchIndexBenchmark.php @@ -7,9 +7,10 @@ class SearchIndexBenchmark extends BenchCase { /** - * Results history: (with xdebug) - * #5555b676b 'avg_iteration_time': '26.75ms' - * #2d73931ad 'avg_iteration_time': '19.41ms'. + * Results history: + * - #5555b676b: 26.75ms (with xdebug) + * - #2d73931ad: 19.41ms (with xdebug) + * - #fd90ee987: 10.0887394ms */ public function testBuildSearchIndexCommandNoFiles() { @@ -22,9 +23,10 @@ public function testBuildSearchIndexCommandNoFiles() } /** - * Results history: (with xdebug) - * #5555b676b 'avg_iteration_time': '120.45ms' - * #2d73931ad 'avg_iteration_time': '105.91ms'. + * Results history: + * - #5555b676b: 120.45ms (with xdebug) + * - #2d73931ad: 105.91ms (with xdebug) + * - #fd90ee987: 36.29438877ms */ public function testBuildSearchIndexCommandWithFiles() { diff --git a/tests/Benchmarks/StaticSiteBuilderBenchmark.php b/tests/Benchmarks/StaticSiteBuilderBenchmark.php index 8b69c49c075..6b3f148488a 100644 --- a/tests/Benchmarks/StaticSiteBuilderBenchmark.php +++ b/tests/Benchmarks/StaticSiteBuilderBenchmark.php @@ -10,7 +10,8 @@ class StaticSiteBuilderBenchmark extends BenchCase /** * Results history: * - #49834e374: 76.05051994ms - * - #1cf136fc0: 85.29273033ms. + * - #1cf136fc0: 85.29273033ms + * - #fd90ee987: 49.32703972ms */ public function testParseBladePageFile() { From 1ce0ea399b78256229233ce15ff577a9c55db5f6 Mon Sep 17 00:00:00 2001 From: StyleCI Bot Date: Thu, 11 Aug 2022 21:02:02 +0000 Subject: [PATCH 13/14] Apply fixes from StyleCI --- tests/Benchmarks/MarkdownBenchmark.php | 4 ++-- tests/Benchmarks/PageParserBenchmark.php | 8 ++++---- tests/Benchmarks/SearchIndexBenchmark.php | 4 ++-- tests/Benchmarks/StaticSiteBuilderBenchmark.php | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/Benchmarks/MarkdownBenchmark.php b/tests/Benchmarks/MarkdownBenchmark.php index 3d7387c4510..9c6b03fa911 100644 --- a/tests/Benchmarks/MarkdownBenchmark.php +++ b/tests/Benchmarks/MarkdownBenchmark.php @@ -9,7 +9,7 @@ class MarkdownBenchmark extends BenchCase /** * Results history: * - #f4d8d452b: 0.42493788ms - * - #fd90ee987: 0.09853745ms + * - #fd90ee987: 0.09853745ms. */ public function testMarkdownParserFacadeShort() { @@ -21,7 +21,7 @@ public function testMarkdownParserFacadeShort() /** * Results history: * - #f4d8d452b 2.62538815ms - * - #fd90ee987: 2.07124043ms + * - #fd90ee987: 2.07124043ms. */ public function testMarkdownParserFacadeFull() { diff --git a/tests/Benchmarks/PageParserBenchmark.php b/tests/Benchmarks/PageParserBenchmark.php index 7482e961e81..0a0739355a0 100644 --- a/tests/Benchmarks/PageParserBenchmark.php +++ b/tests/Benchmarks/PageParserBenchmark.php @@ -15,7 +15,7 @@ class PageParserBenchmark extends BenchCase * Results history: * - #14c34beb1: 0.17022841ms. * - #0db04eaef: 0.2702086ms. - * - #fd90ee987: 0.28220031ms + * - #fd90ee987: 0.28220031ms. */ public function testParseBladePageFile() { @@ -35,7 +35,7 @@ public function testParseBladePageFile() * Results history: * - #8e165366a: 0.1986541ms. * - #0db04eaef: 0.29952221ms. - * - #fd90ee987: 0.30080938ms + * - #fd90ee987: 0.30080938ms. */ public function testParseMarkdownPageFile() { @@ -55,7 +55,7 @@ public function testParseMarkdownPageFile() * Results history: * - #5d044679b: 0.30337441ms. * - #0db04eaef: 0.39583502ms. - * - #fd90ee987: 0.41671791ms + * - #fd90ee987: 0.41671791ms. */ public function testParseMarkdownPostFile() { @@ -75,7 +75,7 @@ public function testParseMarkdownPostFile() * Results history: * - #6f63f5016: 0.16660199ms. * - #0db04eaef: 0.2729635ms. - * - #fd90ee987: 0.27649839ms + * - #fd90ee987: 0.27649839ms. */ public function testParseDocumentationPageFile() { diff --git a/tests/Benchmarks/SearchIndexBenchmark.php b/tests/Benchmarks/SearchIndexBenchmark.php index 4d60c0f0be6..2028f1bf58e 100644 --- a/tests/Benchmarks/SearchIndexBenchmark.php +++ b/tests/Benchmarks/SearchIndexBenchmark.php @@ -10,7 +10,7 @@ class SearchIndexBenchmark extends BenchCase * Results history: * - #5555b676b: 26.75ms (with xdebug) * - #2d73931ad: 19.41ms (with xdebug) - * - #fd90ee987: 10.0887394ms + * - #fd90ee987: 10.0887394ms. */ public function testBuildSearchIndexCommandNoFiles() { @@ -26,7 +26,7 @@ public function testBuildSearchIndexCommandNoFiles() * Results history: * - #5555b676b: 120.45ms (with xdebug) * - #2d73931ad: 105.91ms (with xdebug) - * - #fd90ee987: 36.29438877ms + * - #fd90ee987: 36.29438877ms. */ public function testBuildSearchIndexCommandWithFiles() { diff --git a/tests/Benchmarks/StaticSiteBuilderBenchmark.php b/tests/Benchmarks/StaticSiteBuilderBenchmark.php index 6b3f148488a..05a9988162e 100644 --- a/tests/Benchmarks/StaticSiteBuilderBenchmark.php +++ b/tests/Benchmarks/StaticSiteBuilderBenchmark.php @@ -11,7 +11,7 @@ class StaticSiteBuilderBenchmark extends BenchCase * Results history: * - #49834e374: 76.05051994ms * - #1cf136fc0: 85.29273033ms - * - #fd90ee987: 49.32703972ms + * - #fd90ee987: 49.32703972ms. */ public function testParseBladePageFile() { From 49e886d079d9e94c2fc77b00f57d3e24f4d1e02f Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Thu, 11 Aug 2022 23:09:30 +0200 Subject: [PATCH 14/14] Sleep one second after each test Hoping this will resolve the false negatives that sometimes happen --- tests/Browser/HighLevelViewTest.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/Browser/HighLevelViewTest.php b/tests/Browser/HighLevelViewTest.php index 6f8040b470f..f0f0d51edc0 100644 --- a/tests/Browser/HighLevelViewTest.php +++ b/tests/Browser/HighLevelViewTest.php @@ -18,6 +18,12 @@ class HighLevelViewTest extends DuskTestCase { public $mockConsoleOutput = false; + protected function tearDown(): void + { + parent::tearDown(); + sleep(1); + } + public function test_welcome_homepage() { $this->browse(function (Browser $browser) {