forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Cloud Security] Remove
Add integration
button from agent policy de…
…tails page when the agent policy `supports_agentless` (elastic#202211)
- Loading branch information
1 parent
94f4f66
commit 3520e69
Showing
2 changed files
with
80 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import { ADD_PACKAGE_POLICY_BTN } from '../../screens/fleet'; | ||
import { login } from '../../tasks/login'; | ||
|
||
describe('View agentless policy details', () => { | ||
beforeEach(() => { | ||
login(); | ||
cy.intercept('/api/fleet/agent_policies/policy-1', { | ||
item: { | ||
id: 'policy-1', | ||
name: 'Agentless policy for cspm-1', | ||
description: '', | ||
namespace: 'default', | ||
monitoring_enabled: ['logs', 'metrics'], | ||
status: 'active', | ||
supports_agentless: true, | ||
package_policies: [ | ||
{ | ||
id: 'cspm-1', | ||
name: 'cspm-1', | ||
policy_id: 'policy-1', | ||
policy_ids: ['policy-1'], | ||
inputs: [], | ||
}, | ||
], | ||
}, | ||
}); | ||
}); | ||
|
||
it('should not show the add integration button if the policy support agentless', () => { | ||
cy.visit('/app/fleet/policies/policy-1'); | ||
cy.getBySel(ADD_PACKAGE_POLICY_BTN).should('not.exist'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters