From f52aef138c8a73eda4baa0e9bbbbf2a04ff43028 Mon Sep 17 00:00:00 2001 From: Bob den Otter Date: Sun, 31 Mar 2019 12:43:05 +0200 Subject: [PATCH] Add e2e test for menu --- config/bolt/menu.yaml | 4 ++-- public/theme/skeleton/partials/_sub_menu.twig | 2 +- src/Menu/FrontendMenuBuilder.php | 4 ++-- tests/e2e/features/frontend_menu.feature | 7 +++++++ tests/e2e/pages/homepage.js | 5 +++++ 5 files changed, 17 insertions(+), 5 deletions(-) create mode 100644 tests/e2e/features/frontend_menu.feature diff --git a/config/bolt/menu.yaml b/config/bolt/menu.yaml index 24651b64..6f6a58ab 100644 --- a/config/bolt/menu.yaml +++ b/config/bolt/menu.yaml @@ -5,7 +5,7 @@ main: - label: Home title: This is the first menu item. link: homepage - class: first + class: homepage - label: About link: blocks/about submenu: @@ -23,7 +23,7 @@ main: link: pages/ - label: The Bolt site link: https://bolt.cm - class: last + class: bolt-site title: Visit the excellent Bolt website! foo: bar \ No newline at end of file diff --git a/public/theme/skeleton/partials/_sub_menu.twig b/public/theme/skeleton/partials/_sub_menu.twig index 19791725..1269bb45 100644 --- a/public/theme/skeleton/partials/_sub_menu.twig +++ b/public/theme/skeleton/partials/_sub_menu.twig @@ -24,7 +24,7 @@ {{- item.label -}} - {% if item.submenu is defined and withsubmenus %} + {% if item.submenu and withsubmenus %}