Skip to content

Commit

Permalink
removed not working test-ids
Browse files Browse the repository at this point in the history
  • Loading branch information
christianpiske authored and daniele-mng committed Dec 17, 2024
1 parent 1ac08ac commit 27bad06
Showing 1 changed file with 0 additions and 61 deletions.
61 changes: 0 additions & 61 deletions src/web/components/menu/menu.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,183 +85,154 @@ const Menu = () => {
label: 'Tasks',
to: '/tasks',
activeCondition: useIsActive('/tasks'),
'data-testid': 'menu-tasks',
},
{
label: 'Reports',
to: '/reports',
activeCondition: useIsActive('/reports'),
'data-testid': 'menu-reports',
},
{
label: 'Results',
to: '/results',
activeCondition: useIsActive('/results'),
'data-testid': 'menu-results',
},
{
label: 'Vulnerabilities',
to: '/vulnerabilities',
activeCondition: useIsActive('/vulnerabilities'),
'data-testid': 'menu-vulnerabilities',
},
{
label: 'Notes',
to: '/notes',
activeCondition: useIsActive('/notes'),
'data-testid': 'menu-notes',
},
{
label: 'Overrides',
to: '/overrides',
activeCondition: useIsActive('/overrides'),
'data-testid': 'menu-overrides',
},
],
assets: [
{
label: 'Hosts',
to: '/hosts',
activeCondition: useIsActive('/hosts'),
'data-testid': 'menu-hosts',
},
{
label: 'Operating Systems',
to: '/operatingsystems',
activeCondition: useIsActive('/operatingsystems'),
'data-testid': 'menu-operating-systems',
},
{
label: 'TLS Certificates',
to: '/tlscertificates',
activeCondition: useIsActive('/tlscertificates'),
'data-testid': 'menu-tls-certificates',
},
],
resilience: [
{
label: 'Remediation Tickets',
to: '/tickets',
activeCondition: useIsActive('/tickets'),
'data-testid': 'menu-remediation-tickets',
},
{
label: 'Compliance Policies',
to: '/policies',
activeCondition: useIsActive('/policies'),
'data-testid': 'menu-policies',
},
{
label: 'Compliance Audits',
to: '/audits',
activeCondition: useIsActive('/audits'),
'data-testid': 'menu-audits',
},
{
label: 'Compliance Audit Reports',
to: '/auditreports',
activeCondition: useIsActive('/auditreports'),
'data-testid': 'menu-audit-reports',
},
],
secInfo: [
{
label: 'NVTs',
to: '/nvts',
activeCondition: useIsActive('/nvts'),
'data-testid': 'menu-nvts',
},
{
label: 'CVEs',
to: '/cves',
activeCondition: useIsActive('/cves'),
'data-testid': 'menu-cves',
},
{
label: 'CPEs',
to: '/cpes',
activeCondition: useIsActive('/cpes'),
'data-testid': 'menu-cpes',
},
{
label: 'CERT-Bund Advisories',
to: '/certbunds',
activeCondition: useIsActive('/certbunds'),
'data-testid': 'menu-certbunds',
},
{
label: 'DFN-CERT Advisories',
to: '/dfncerts',
activeCondition: useIsActive('/dfncerts'),
'data-testid': 'menu-dfncerts',
},
],
configuration: [
{
label: 'Targets',
to: '/targets',
activeCondition: useIsActive('/targets'),
'data-testid': 'menu-targets',
},
{
label: 'Port Lists',
to: '/portlists',
activeCondition: useIsActive('/portlists'),
'data-testid': 'menu-portlists',
},
{
label: 'Credentials',
to: '/credentials',
activeCondition: useIsActive('/credentials'),
'data-testid': 'menu-credentials',
},
{
label: 'Scan Configs',
to: '/scanconfigs',
activeCondition: useIsActive('/scanconfigs'),
'data-testid': 'menu-scanconfigs',
},
{
label: 'Alerts',
to: '/alerts',
activeCondition: useIsActive('/alerts'),
'data-testid': 'menu-alerts',
},
{
label: 'Schedules',
to: '/schedules',
activeCondition: useIsActive('/schedules'),
'data-testid': 'menu-schedules',
},
{
label: 'Report Configs',
to: '/reportconfigs',
activeCondition: useIsActive('/reportconfigs'),
'data-testid': 'menu-report-configs',
},
{
label: 'Report Formats',
to: '/reportformats',
activeCondition: useIsActive('/reportformats'),
'data-testid': 'menu-report-formats',
},
{
label: 'Scanners',
to: '/scanners',
activeCondition: useIsActive('/scanners'),
'data-testid': 'menu-scanners',
},
{
label: 'Filters',
to: '/filters',
activeCondition: useIsActive('/filters'),
'data-testid': 'menu-filters',
},
{
label: 'Tags',
to: '/tags',
activeCondition: useIsActive('/tags'),
'data-testid': 'menu-tags',
},
],
};
Expand All @@ -280,7 +251,6 @@ const Menu = () => {
capabilities.featureEnabled(featureEnabled),
}))
.filter(({visible}) => visible !== false),
...additionalProps,
});

const menuPoints = [
Expand All @@ -289,7 +259,6 @@ const Menu = () => {
label: _('Dashboards'),
to: '/dashboards',
icon: BarChart3,
'data-testid' : 'menu-dashboards',
},
],
[
Expand All @@ -299,137 +268,108 @@ const Menu = () => {
'scans',
ShieldCheck,
subNavConfigs.scans,
{
'data-testid': 'menu-scans',
}
),
mayOpAssets &&
createMenuItemWithSubNav(
'Assets',
'assets',
Server,
subNavConfigs.assets,
{
'data-testid': 'menu-assets',
}
),
mayOpResilience &&
createMenuItemWithSubNav(
'Resilience',
'resilience',
FileCheck,
subNavConfigs.resilience,
{
'data-testid': 'menu-resilience',
}
),
capabilities.mayAccess('info') &&
createMenuItemWithSubNav(
'Security Information',
'secInfo',
View,
subNavConfigs.secInfo,
{
'data-testid': 'menu-secinfo',
}
),
mayOpConfiguration &&
createMenuItemWithSubNav(
'Configuration',
'configuration',
Wrench,
subNavConfigs.configuration,
{
'data-testid': 'menu-configuration',
}
),
{
label: _('Administration'),
key: 'administration',
icon: SlidersHorizontal,
'data-testid' : 'menu-administration',
subNav: [
capabilities.mayAccess('users') && {
label: _('Users'),
to: '/users',
active: isUserActive,
'data-testid': 'menu-users',
},
capabilities.mayAccess('groups') && {
label: _('Groups'),
to: '/groups',
active: isGroupsActive,
'data-testid': 'menu-groups',
},
capabilities.mayAccess('roles') && {
label: _('Roles'),
to: '/roles',
active: isRolesActive,
'data-testid': 'menu-roles',
},
capabilities.mayAccess('permissions') && {
label: _('Permissions'),
to: '/permissions',
active: isPermissionsActive,
'data-testid': 'menu-permissions',
},
capabilities.mayAccess('system_reports') && {
label: _('Performance'),
to: '/performance',
active: isPerformanceActive,
'data-testid': 'menu-performance',
},
{
label: _('Trashcan'),
to: '/trashcan',
active: isTrashcanActive,
'data-testid': 'menu-trashcan',
},
capabilities.mayAccess('feeds') && {
label: _('Feed Status'),
to: '/feedstatus',
active: isFeedStatusActive,
'data-testid': 'menu-feed-status',
},
capabilities.mayOp('describe_auth') &&
capabilities.mayOp('modify_auth') && {
label: _('LDAP'),
to: '/ldap',
active: isLdapActive,
'data-testid': 'menu-ldap',
},
capabilities.mayOp('describe_auth') &&
capabilities.mayOp('modify_auth') && {
label: _('RADIUS'),
to: '/radius',
active: isRadiusActive,
'data-testid': 'menu-radius',
},
].filter(Boolean),
},
{
label: _('Help'),
key: 'help',
icon: CircleHelp,
'data-testid' : 'menu-help',
subNav: [
{
label: _('User Manual'),
to: 'https://docs.greenbone.net/GSM-Manual/gos-22.04/en/',
isExternal: true,
'data-testid': 'menu-user-manual',
},
{
label: _('CVSS Calculator'),
to: '/cvsscalculator',
active: isCvssCalculatorActive,
'data-testid': 'menu-cvss-calc',
},
{
label: _('About'),
to: '/about',
active: isAboutActive,
'data-testid': 'menu-about',
},
],
},
Expand All @@ -439,7 +379,6 @@ const Menu = () => {
label: _('Asset'),
to: '/asset-management',
isExternal: true,
'data-testid' : 'menu-asset-management',
},
].filter(Boolean),
];
Expand Down

0 comments on commit 27bad06

Please sign in to comment.