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.
[Security Solution] Configure roles with AI Assistant (elastic#170160)
## Summary Adding `feature_securitySolutionAssistant.all` to all roles in Kibana. Cypress test added to check different tiers have different authorization to AI Assistant: `x-pack/test/security_solution_cypress/cypress/e2e/ai_assistant/` - `ai_assistant_feature_complete.cy.ts` - `ai_assistant_feature_essentials.cy.ts` Co-authored-by: Kibana Machine <[email protected]>
- Loading branch information
Showing
6 changed files
with
110 additions
and
0 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
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
35 changes: 35 additions & 0 deletions
35
...st/security_solution_cypress/cypress/e2e/ai_assistant/ai_assistant_feature_complete.cy.ts
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,35 @@ | ||
/* | ||
* 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 { AI_ASSISTANT_BUTTON } from '../../screens/ai_assistant'; | ||
import { login } from '../../tasks/login'; | ||
import { visitGetStartedPage } from '../../tasks/navigation'; | ||
|
||
describe( | ||
'App Features for Security Complete', | ||
{ | ||
tags: ['@serverless'], | ||
env: { | ||
ftrConfig: { | ||
productTypes: [ | ||
{ product_line: 'security', product_tier: 'complete' }, | ||
{ product_line: 'endpoint', product_tier: 'complete' }, | ||
], | ||
}, | ||
}, | ||
}, | ||
() => { | ||
beforeEach(() => { | ||
login(); | ||
}); | ||
|
||
it('should have have AI Assistant available', () => { | ||
visitGetStartedPage(); | ||
cy.get(AI_ASSISTANT_BUTTON).should('exist'); | ||
}); | ||
} | ||
); |
35 changes: 35 additions & 0 deletions
35
.../security_solution_cypress/cypress/e2e/ai_assistant/ai_assistant_feature_essentials.cy.ts
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,35 @@ | ||
/* | ||
* 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 { AI_ASSISTANT_BUTTON } from '../../screens/ai_assistant'; | ||
import { login } from '../../tasks/login'; | ||
import { visitGetStartedPage } from '../../tasks/navigation'; | ||
|
||
describe( | ||
'App Features for Security Essentials', | ||
{ | ||
tags: ['@serverless'], | ||
env: { | ||
ftrConfig: { | ||
productTypes: [ | ||
{ product_line: 'security', product_tier: 'essentials' }, | ||
{ product_line: 'endpoint', product_tier: 'essentials' }, | ||
], | ||
}, | ||
}, | ||
}, | ||
() => { | ||
beforeEach(() => { | ||
login(); | ||
}); | ||
|
||
it('should not have AI Assistant available', () => { | ||
visitGetStartedPage(); | ||
cy.get(AI_ASSISTANT_BUTTON).should('not.exist'); | ||
}); | ||
} | ||
); |
8 changes: 8 additions & 0 deletions
8
x-pack/test/security_solution_cypress/cypress/screens/ai_assistant.ts
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,8 @@ | ||
/* | ||
* 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. | ||
*/ | ||
|
||
export const AI_ASSISTANT_BUTTON = '[data-test-subj="assistantHeaderLink"]'; |
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