diff --git a/packages/framework/tests/Unit/Views/NavigationMenuViewTest.php b/packages/framework/tests/Unit/Views/NavigationMenuViewTest.php index 2890e8b8067..f9b4c76ed2c 100644 --- a/packages/framework/tests/Unit/Views/NavigationMenuViewTest.php +++ b/packages/framework/tests/Unit/Views/NavigationMenuViewTest.php @@ -78,6 +78,32 @@ public function testNavigationMenuWithDropdownPages() { config(['hyde.navigation.subdirectories' => 'dropdown']); + $page = new MarkdownPage('page'); + $bar = new MarkdownPage('foo/bar'); + $baz = new MarkdownPage('foo/baz'); + + Hyde::routes()->add($page->getRoute()); + Hyde::routes()->add($bar->getRoute()); + Hyde::routes()->add($baz->getRoute()); + + $this->mockRoute($page->getRoute()); + $this->mockPage($page); + + $contents = $page->compile(); + + $this->assertStringContainsString('dropdown-container', $contents); + $this->assertStringContainsString('dropdown-button', $contents); + + $dropdown = Str::between($contents, '