Loading core/modules/system/tests/modules/olivero_test/olivero_test.links.menu.yml +6 −0 Original line number Diff line number Diff line Loading @@ -10,6 +10,12 @@ olivero_test.child: parent: olivero_test.front_page menu_name: main weight: 100 olivero_test.child_child: title: Child link route_name: <front> parent: olivero_test.child menu_name: main weight: 100 olivero_test.button: title: Button route_name: <button> Loading core/tests/Drupal/Nightwatch/Tests/Olivero/oliveroDesktopMenuTest.js +16 −4 Original line number Diff line number Diff line const headerNavSelector = '#header-nav'; const linkSubMenuId = 'home-submenu-1'; const buttonSubMenuId = 'button-submenu-2'; const linkSubMenuId = 'primary-menu-item-1'; const buttonSubMenuId = 'primary-menu-item-12'; module.exports = { '@tags': ['core', 'olivero'], before(browser) { browser.drupalInstall({ browser .drupalInstall({ setupFile: 'core/tests/Drupal/TestSite/TestSiteOliveroInstallTestScript.php', installProfile: 'minimal', }) // Login and change max-nesting depth so we can verify that menu levels // greater than 2 do not break the site. .drupalLoginAsAdmin(() => { browser .drupalRelativeURL('/admin/structure/block/manage/olivero_main_menu') .waitForElementVisible('[data-drupal-selector="edit-settings-depth"]') .setValue('[data-drupal-selector="edit-settings-depth"]', 'Unlimited') .click('[data-drupal-selector="edit-actions-submit"]') .waitForElementVisible('body'); }); browser.resizeWindow(1600, 800); }, Loading @@ -32,7 +43,8 @@ module.exports = { 'aria-expanded', 'true', ) // Verify tertiary menu item exists. .assert.visible('#primary-menu-item-11 .primary-nav__menu-link--level-3') // Test interactions for route:<button> menu links. .assert.not.visible(`#${buttonSubMenuId}`) .assert.attributeEquals( Loading core/tests/Drupal/Nightwatch/Tests/Olivero/oliveroMobileMenuTest.js +2 −2 Original line number Diff line number Diff line const mobileNavButtonSelector = 'button.mobile-nav-button'; const headerNavSelector = '#header-nav'; const linkSubMenuId = 'home-submenu-1'; const buttonSubMenuId = 'button-submenu-2'; const linkSubMenuId = 'primary-menu-item-1'; const buttonSubMenuId = 'primary-menu-item-12'; /** * Sends arbitrary number of tab keys, and then checks that the last focused Loading core/themes/olivero/css/components/navigation/nav-primary.css +11 −0 Original line number Diff line number Diff line Loading @@ -314,6 +314,17 @@ } } /* * Olivero doesn't officially support nested tertiary submenus, but this * ensures that it doesn't break all the way. * * @see https://www.drupal.org/project/drupal/issues/3221399 */ .primary-nav__menu--level-2 .primary-nav__menu-item--has-children { display: block; } .primary-nav__menu-link--level-2 { font-size: 1rem; font-weight: normal; Loading core/themes/olivero/css/components/navigation/nav-primary.pcss.css +10 −0 Original line number Diff line number Diff line Loading @@ -167,6 +167,16 @@ } } /* * Olivero doesn't officially support nested tertiary submenus, but this * ensures that it doesn't break all the way. * * @see https://www.drupal.org/project/drupal/issues/3221399 */ .primary-nav__menu--level-2 .primary-nav__menu-item--has-children { display: block; } .primary-nav__menu-link--level-2 { font-size: 16px; font-weight: normal; Loading Loading
core/modules/system/tests/modules/olivero_test/olivero_test.links.menu.yml +6 −0 Original line number Diff line number Diff line Loading @@ -10,6 +10,12 @@ olivero_test.child: parent: olivero_test.front_page menu_name: main weight: 100 olivero_test.child_child: title: Child link route_name: <front> parent: olivero_test.child menu_name: main weight: 100 olivero_test.button: title: Button route_name: <button> Loading
core/tests/Drupal/Nightwatch/Tests/Olivero/oliveroDesktopMenuTest.js +16 −4 Original line number Diff line number Diff line const headerNavSelector = '#header-nav'; const linkSubMenuId = 'home-submenu-1'; const buttonSubMenuId = 'button-submenu-2'; const linkSubMenuId = 'primary-menu-item-1'; const buttonSubMenuId = 'primary-menu-item-12'; module.exports = { '@tags': ['core', 'olivero'], before(browser) { browser.drupalInstall({ browser .drupalInstall({ setupFile: 'core/tests/Drupal/TestSite/TestSiteOliveroInstallTestScript.php', installProfile: 'minimal', }) // Login and change max-nesting depth so we can verify that menu levels // greater than 2 do not break the site. .drupalLoginAsAdmin(() => { browser .drupalRelativeURL('/admin/structure/block/manage/olivero_main_menu') .waitForElementVisible('[data-drupal-selector="edit-settings-depth"]') .setValue('[data-drupal-selector="edit-settings-depth"]', 'Unlimited') .click('[data-drupal-selector="edit-actions-submit"]') .waitForElementVisible('body'); }); browser.resizeWindow(1600, 800); }, Loading @@ -32,7 +43,8 @@ module.exports = { 'aria-expanded', 'true', ) // Verify tertiary menu item exists. .assert.visible('#primary-menu-item-11 .primary-nav__menu-link--level-3') // Test interactions for route:<button> menu links. .assert.not.visible(`#${buttonSubMenuId}`) .assert.attributeEquals( Loading
core/tests/Drupal/Nightwatch/Tests/Olivero/oliveroMobileMenuTest.js +2 −2 Original line number Diff line number Diff line const mobileNavButtonSelector = 'button.mobile-nav-button'; const headerNavSelector = '#header-nav'; const linkSubMenuId = 'home-submenu-1'; const buttonSubMenuId = 'button-submenu-2'; const linkSubMenuId = 'primary-menu-item-1'; const buttonSubMenuId = 'primary-menu-item-12'; /** * Sends arbitrary number of tab keys, and then checks that the last focused Loading
core/themes/olivero/css/components/navigation/nav-primary.css +11 −0 Original line number Diff line number Diff line Loading @@ -314,6 +314,17 @@ } } /* * Olivero doesn't officially support nested tertiary submenus, but this * ensures that it doesn't break all the way. * * @see https://www.drupal.org/project/drupal/issues/3221399 */ .primary-nav__menu--level-2 .primary-nav__menu-item--has-children { display: block; } .primary-nav__menu-link--level-2 { font-size: 1rem; font-weight: normal; Loading
core/themes/olivero/css/components/navigation/nav-primary.pcss.css +10 −0 Original line number Diff line number Diff line Loading @@ -167,6 +167,16 @@ } } /* * Olivero doesn't officially support nested tertiary submenus, but this * ensures that it doesn't break all the way. * * @see https://www.drupal.org/project/drupal/issues/3221399 */ .primary-nav__menu--level-2 .primary-nav__menu-item--has-children { display: block; } .primary-nav__menu-link--level-2 { font-size: 16px; font-weight: normal; Loading