|
| 1 | +/* |
| 2 | + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one |
| 3 | + * or more contributor license agreements. Licensed under the "Elastic License |
| 4 | + * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side |
| 5 | + * Public License v 1"; you may not use this file except in compliance with, at |
| 6 | + * your election, the "Elastic License 2.0", the "GNU Affero General Public |
| 7 | + * License v3.0 only", or the "Server Side Public License, v 1". |
| 8 | + */ |
| 9 | + |
| 10 | +describe('Expanded mode', () => { |
| 11 | + describe('Solution logo', () => { |
| 12 | + /** |
| 13 | + * GIVEN the side navigation is in expanded mode |
| 14 | + * WHEN the navigation renders the solution logo |
| 15 | + * THEN I should see the solution label |
| 16 | + */ |
| 17 | + it.todo('should display the solution label next to the logo', () => {}); |
| 18 | + }); |
| 19 | + |
| 20 | + describe('Primary menu', () => { |
| 21 | + describe('Primary menu item', () => { |
| 22 | + /** |
| 23 | + * GIVEN the side navigation is in expanded mode |
| 24 | + * AND a primary menu item has a submenu (has children) |
| 25 | + * WHEN I hover over it |
| 26 | + * THEN I should see a popover with the submenu |
| 27 | + */ |
| 28 | + it.todo( |
| 29 | + '(with submenu) should show a popover with the submenu on hover (with submenu)', |
| 30 | + () => {} |
| 31 | + ); |
| 32 | + |
| 33 | + /** |
| 34 | + * GIVEN the side navigation is in expanded mode |
| 35 | + * AND a primary menu item with a submenu is in an active state |
| 36 | + * WHEN I hover over it |
| 37 | + * THEN a popover with the submenu should not be displayed |
| 38 | + */ |
| 39 | + it.todo( |
| 40 | + '(with submenu) should NOT show a popover if the item with submenu is already active', |
| 41 | + () => {} |
| 42 | + ); |
| 43 | + |
| 44 | + /** |
| 45 | + * GIVEN the side navigation is in expanded mode |
| 46 | + * AND a primary menu item has a submenu (has children) |
| 47 | + * WHEN I click on it |
| 48 | + * THEN I should be redirected to its href |
| 49 | + * AND a side panel with the submenu should show |
| 50 | + */ |
| 51 | + it.todo( |
| 52 | + '(with submenu) should redirect and open side panel when clicking item with submenu', |
| 53 | + () => {} |
| 54 | + ); |
| 55 | + |
| 56 | + /** |
| 57 | + * GIVEN the side navigation is in expanded mode |
| 58 | + * AND a primary menu item with a submenu has focus |
| 59 | + * WHEN I press the Enter key |
| 60 | + * THEN focus should move to the popover |
| 61 | + */ |
| 62 | + it.todo( |
| 63 | + '(with submenu) should move focus to popover on Enter when focused item has submenu', |
| 64 | + () => {} |
| 65 | + ); |
| 66 | + |
| 67 | + /** |
| 68 | + * GIVEN the side navigation is in expanded mode |
| 69 | + * AND a primary menu item doesn’t have a submenu |
| 70 | + * WHEN I hover over it |
| 71 | + * THEN I should not see a popover |
| 72 | + */ |
| 73 | + it.todo('(without submenu) should NOT show a popover on hover (without submenu)', () => {}); |
| 74 | + |
| 75 | + /** |
| 76 | + * GIVEN the side navigation is in expanded mode |
| 77 | + * AND a primary menu item doesn’t have a submenu |
| 78 | + * WHEN I click on it |
| 79 | + * THEN I should be redirected to its href |
| 80 | + * AND I should not see a side panel |
| 81 | + */ |
| 82 | + it.todo( |
| 83 | + '(without submenu) should redirect and NOT open side panel when clicking item without submenu', |
| 84 | + () => {} |
| 85 | + ); |
| 86 | + |
| 87 | + /** |
| 88 | + * GIVEN the side navigation is in expanded mode |
| 89 | + * AND a primary menu item without a submenu has focus |
| 90 | + * WHEN I press the Enter key |
| 91 | + * THEN I should be redirected to its href |
| 92 | + */ |
| 93 | + it.todo( |
| 94 | + '(without submenu) should redirect on Enter when focused item has no submenu', |
| 95 | + () => {} |
| 96 | + ); |
| 97 | + }); |
| 98 | + |
| 99 | + describe('More menu', () => { |
| 100 | + /** |
| 101 | + * GIVEN not all primary menu items fit the menu height |
| 102 | + * AND the navigation renders in expanded mode |
| 103 | + * WHEN the navigation renders |
| 104 | + * THEN I should see a "More" primary menu item |
| 105 | + */ |
| 106 | + it.todo('should render the "More" primary menu item when items overflow', () => {}); |
| 107 | + |
| 108 | + /** |
| 109 | + * GIVEN not all primary menu items fit the menu height |
| 110 | + * AND the navigation renders in expanded mode |
| 111 | + * WHEN I hover over the "More" primary menu item |
| 112 | + * THEN I should see a popover with secondary menu |
| 113 | + */ |
| 114 | + it.todo('should show popover with secondary menu on hover over "More"', () => {}); |
| 115 | + |
| 116 | + /** |
| 117 | + * GIVEN not all primary menu items fit the menu height |
| 118 | + * AND the navigation renders in expanded mode |
| 119 | + * WHEN I hover over the "More" primary menu item |
| 120 | + * AND I click on the menu item that has a submenu |
| 121 | + * THEN I should see a side panel with that submenu |
| 122 | + */ |
| 123 | + it.todo('should open side panel when clicking submenu item inside "More" popover', () => {}); |
| 124 | + |
| 125 | + /** |
| 126 | + * GIVEN not all primary menu items fit the menu height |
| 127 | + * AND the navigation renders in expanded mode |
| 128 | + * WHEN I hover over the "More" primary menu item |
| 129 | + * AND I click on the menu item that doesn’t have a submenu |
| 130 | + * THEN I shouldn’t see a side panel |
| 131 | + */ |
| 132 | + it.todo( |
| 133 | + 'should NOT open side panel when clicking item without submenu in "More" popover', |
| 134 | + () => {} |
| 135 | + ); |
| 136 | + |
| 137 | + /** |
| 138 | + * GIVEN not all primary menu items fit the menu height |
| 139 | + * AND the navigation renders in expanded mode |
| 140 | + * WHEN I hover over the "More" primary menu item |
| 141 | + * AND I click on the menu item that has a submenu |
| 142 | + * THEN the popover should close |
| 143 | + * AND I should be redirected to that item’s href |
| 144 | + * AND I should a side panel should show with that submenu |
| 145 | + */ |
| 146 | + it.todo( |
| 147 | + 'should close popover, redirect, and open side panel after clicking on an item with submenu from "More"', |
| 148 | + () => {} |
| 149 | + ); |
| 150 | + |
| 151 | + /** |
| 152 | + * GIVEN not all primary menu items fit the menu height |
| 153 | + * AND the navigation renders in expanded mode |
| 154 | + * WHEN I hover over the "More" primary menu item |
| 155 | + * AND I click on the menu item that doesn’t have a submenu |
| 156 | + * THEN the popover should close |
| 157 | + * AND I should be redirected to that item’s href |
| 158 | + * AND I shouldn’t see a side panel |
| 159 | + */ |
| 160 | + it.todo( |
| 161 | + 'should close popover, redirect, and NOT open side panel after clicking on an item without submenu from "More"', |
| 162 | + () => {} |
| 163 | + ); |
| 164 | + |
| 165 | + /** |
| 166 | + * GIVEN the navigation renders in expanded mode |
| 167 | + * AND not all primary menu items fit the menu height |
| 168 | + * AND the initial active item is a submenu item of an item in the "More" menu |
| 169 | + * WHEN the navigation renders |
| 170 | + * THEN the "More" primary menu item itself is in an active state |
| 171 | + * AND its parent primary menu item is active within the "More" menu popover |
| 172 | + * AND a side panel with the submenu opens |
| 173 | + * AND the submenu item is in an active state |
| 174 | + */ |
| 175 | + it.todo( |
| 176 | + 'should have active state and open side panel when initial active submenu item is under "More"', |
| 177 | + () => {} |
| 178 | + ); |
| 179 | + }); |
| 180 | + }); |
| 181 | + |
| 182 | + describe('Secondary menu', () => { |
| 183 | + describe('Beta badge', () => { |
| 184 | + /** |
| 185 | + * GIVEN the side navigation is in expanded mode |
| 186 | + * AND a primary menu item is in beta |
| 187 | + * WHEN I hover over that item |
| 188 | + * THEN a tooltip shows up with "Beta" text |
| 189 | + * AND a beta badge with beta icon |
| 190 | + */ |
| 191 | + it.todo('should show tooltip with "Beta" and beta badge on hover', () => {}); |
| 192 | + }); |
| 193 | + |
| 194 | + describe('Tech preview badge', () => { |
| 195 | + /** |
| 196 | + * GIVEN the side navigation is in expanded mode |
| 197 | + * AND a primary menu item is in tech preview |
| 198 | + * WHEN I hover over that item |
| 199 | + * THEN a tooltip shows up with "Tech preview" text |
| 200 | + * AND a beta badge with flask icon |
| 201 | + */ |
| 202 | + it.todo('should show tooltip with "Tech preview" and flask badge on hover', () => {}); |
| 203 | + }); |
| 204 | + }); |
| 205 | +}); |
0 commit comments