Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
9fdcdfc
first pass, still need to run some tests and do a bit of cleanup
Supplementing Dec 3, 2025
9dd0412
renamed component/functions to be more clear
Supplementing Dec 3, 2025
d4b5009
moved single agent menu items to a hook with optional view item, remo…
Supplementing Dec 4, 2025
09d7483
changed restart upgrade to always render, but just be disabled
Supplementing Dec 5, 2025
532689a
added test coverage
Supplementing Dec 5, 2025
1fe3c20
Merge branch 'main' into enhancement-action-menus-redesign
elasticmachine Dec 5, 2025
8c152d5
Changes from node scripts/eslint_all_files --no-cache --fix
kibanamachine Dec 5, 2025
78efc8d
fixed some linting issues
Supplementing Dec 5, 2025
8b4a26b
merged upstream
Supplementing Dec 5, 2025
7032ae1
removed render import, used fleet renderer
Supplementing Dec 5, 2025
324c805
fixed top-level test file
Supplementing Dec 5, 2025
8a47003
fixed popover
Supplementing Dec 5, 2025
144b15a
added support for icon coloring
Supplementing Dec 8, 2025
3519b2f
hide upgrade menu when agents arent upgradeable
Supplementing Dec 8, 2025
eeb64fb
Merge branch 'main' into enhancement-action-menus-redesign
elasticmachine Dec 8, 2025
99d19f3
fix tests for menu change
Supplementing Dec 8, 2025
66b5d27
merged upstream
Supplementing Dec 8, 2025
34ff5cf
fixed the tests and the rendering
Supplementing Dec 8, 2025
e02dddf
simplified hierarchical component a bit, fixed verbiage
Supplementing Dec 8, 2025
876b7bb
Merge branch 'main' into enhancement-action-menus-redesign
Supplementing Dec 9, 2025
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,17 @@
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/
import type { CreateAgentPolicyRequest } from '@kbn/fleet-plugin/common/types';
import { API_VERSIONS } from '@kbn/fleet-plugin/common/constants';

import { FLEET_AGENT_LIST_PAGE } from '../../screens/fleet';

import { createAgentDoc } from '../../tasks/agents';
import { setupFleetServer } from '../../tasks/fleet_server';
import { deleteAgentDocs, cleanupAgentPolicies } from '../../tasks/cleanup';
import type { CreateAgentPolicyRequest } from '@kbn/fleet-plugin/common/types';

import { setUISettings } from '../../tasks/ui_settings';

import { API_VERSIONS } from '@kbn/fleet-plugin/common/constants';
import { request } from '../../tasks/common';
import { login } from '../../tasks/login';

Expand Down Expand Up @@ -397,5 +398,66 @@ describe('View agents list', () => {
cy.get('.euiModalBody select').select('Agent policy 3');
cy.get('.euiModalFooter button:enabled').contains('Assign policy').click();
});

it('should show hierarchical menu with submenus', () => {
cy.visit('/app/fleet/agents');

cy.getBySel(FLEET_AGENT_LIST_PAGE.POLICY_FILTER).click();
cy.get('li').contains('Agent policy 3').click();
waitForLoading();
assertTableContainsNAgents(15);
cy.getBySel(FLEET_AGENT_LIST_PAGE.CHECKBOX_SELECT_ALL).click();

// Open bulk actions menu
cy.getBySel(FLEET_AGENT_LIST_PAGE.BULK_ACTIONS_BUTTON).click();

// Check top-level items are visible
cy.get('button').contains('Add / remove tags').should('be.visible');
cy.get('button').contains('Assign to new policy').should('be.visible');
cy.get('button').contains('Upgrade 15 agents').should('be.visible');

// Check submenu triggers are visible
cy.get('button').contains('Upgrade management').should('be.visible');
cy.get('button').contains('Maintenance and diagnostics').should('be.visible');
cy.get('button').contains('Security and removal').should('be.visible');
});

it('should navigate to Security and removal submenu and show unenroll option', () => {
cy.visit('/app/fleet/agents');

cy.getBySel(FLEET_AGENT_LIST_PAGE.POLICY_FILTER).click();
cy.get('li').contains('Agent policy 3').click();
waitForLoading();
assertTableContainsNAgents(15);
cy.getBySel(FLEET_AGENT_LIST_PAGE.CHECKBOX_SELECT_ALL).click();

// Open bulk actions menu
cy.getBySel(FLEET_AGENT_LIST_PAGE.BULK_ACTIONS_BUTTON).click();

// Navigate to Security submenu
cy.get('button').contains('Security and removal').click();

// Check submenu items are visible
cy.get('button').contains('Unenroll 15 agents').should('be.visible');
});

it('should navigate to Maintenance and diagnostics submenu', () => {
cy.visit('/app/fleet/agents');

cy.getBySel(FLEET_AGENT_LIST_PAGE.POLICY_FILTER).click();
cy.get('li').contains('Agent policy 3').click();
waitForLoading();
assertTableContainsNAgents(15);
cy.getBySel(FLEET_AGENT_LIST_PAGE.CHECKBOX_SELECT_ALL).click();

// Open bulk actions menu
cy.getBySel(FLEET_AGENT_LIST_PAGE.BULK_ACTIONS_BUTTON).click();

// Navigate to Maintenance submenu
cy.get('button').contains('Maintenance and diagnostics').click();

// Check submenu items are visible
cy.get('button').contains('Request diagnostics for 15 agents').should('be.visible');
});
});
});
Loading
Loading