[8.12] [Security Solution][Endpoint] Re enable endpoint permissions tests (#172540) (#175046)

# Backport

This will backport the following commits from `main` to `8.12`:
- [[Security Solution][Endpoint] Re enable endpoint permissions tests
(#172540)](https://github.com/elastic/kibana/pull/172540)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT
[{"author":{"name":"Ash","email":"1849116+ashokaditya@users.noreply.github.com"},"sourceCommit":{"committedDate":"2024-01-17T16:24:43Z","message":"[Security
Solution][Endpoint] Re enable endpoint permissions tests (#172540)\n\n##
Summary\r\n\r\nRe-enable tests\r\n\r\ncloses
elastic/kibana/issues/171649\r\ncloses
elastic/kibana/issues/171650\r\n\r\n\r\n## Flaky
runner\r\n-\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/4876\r\nx
100 ( all pass )\r\n### with all the FTR tests in the
suite\r\n-\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/4889\r\nx
50 ( 25 fails due to timeout loading http://localhost:5620/app/home,
1\r\nfail due to indexed data not being available for delete, rest
are\r\nskipped )\r\n### with conditional delete of loaded data and start
with login
screen\r\n(reorder)\r\n-\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/4894\r\nx
50 (all pass)\r\n\r\n### Checklist\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"267e62791449232b280b047a9f34b7d7cd0c4f8a","branchLabelMapping":{"^v8.13.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Defend
Workflows","OLM Sprint","v8.12.0","v8.13.0"],"title":"[Security
Solution][Endpoint] Re enable endpoint permissions
tests","number":172540,"url":"https://github.com/elastic/kibana/pull/172540","mergeCommit":{"message":"[Security
Solution][Endpoint] Re enable endpoint permissions tests (#172540)\n\n##
Summary\r\n\r\nRe-enable tests\r\n\r\ncloses
elastic/kibana/issues/171649\r\ncloses
elastic/kibana/issues/171650\r\n\r\n\r\n## Flaky
runner\r\n-\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/4876\r\nx
100 ( all pass )\r\n### with all the FTR tests in the
suite\r\n-\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/4889\r\nx
50 ( 25 fails due to timeout loading http://localhost:5620/app/home,
1\r\nfail due to indexed data not being available for delete, rest
are\r\nskipped )\r\n### with conditional delete of loaded data and start
with login
screen\r\n(reorder)\r\n-\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/4894\r\nx
50 (all pass)\r\n\r\n### Checklist\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"267e62791449232b280b047a9f34b7d7cd0c4f8a"}},"sourceBranch":"main","suggestedTargetBranches":["8.12"],"targetPullRequestStates":[{"branch":"8.12","label":"v8.12.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.13.0","branchLabelMappingKey":"^v8.13.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/172540","number":172540,"mergeCommit":{"message":"[Security
Solution][Endpoint] Re enable endpoint permissions tests (#172540)\n\n##
Summary\r\n\r\nRe-enable tests\r\n\r\ncloses
elastic/kibana/issues/171649\r\ncloses
elastic/kibana/issues/171650\r\n\r\n\r\n## Flaky
runner\r\n-\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/4876\r\nx
100 ( all pass )\r\n### with all the FTR tests in the
suite\r\n-\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/4889\r\nx
50 ( 25 fails due to timeout loading http://localhost:5620/app/home,
1\r\nfail due to indexed data not being available for delete, rest
are\r\nskipped )\r\n### with conditional delete of loaded data and start
with login
screen\r\n(reorder)\r\n-\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/4894\r\nx
50 (all pass)\r\n\r\n### Checklist\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"267e62791449232b280b047a9f34b7d7cd0c4f8a"}}]}]
BACKPORT-->

Co-authored-by: Ash <1849116+ashokaditya@users.noreply.github.com>
This commit is contained in:
Kibana Machine 2024-01-17 12:36:01 -05:00 committed by GitHub
parent 8373484378
commit def8bb1f9f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -17,9 +17,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
const testSubjects = getService('testSubjects');
const endpointTestResources = getService('endpointTestResources');
// FLAKY: https://github.com/elastic/kibana/issues/171649
// FLAKY: https://github.com/elastic/kibana/issues/171650
describe.skip('Endpoint permissions:', function () {
describe('Endpoint permissions:', function () {
targetTags(this, ['@ess']);
let indexedData: IndexedHostsAndAlertsResponse;
@ -30,10 +28,20 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
// Force a logout so that we start from the login page
await PageObjects.security.forceLogout();
// ensure Security Solution is properly initialized
await PageObjects.security.login('system_indices_superuser', 'changeme');
await PageObjects.detections.navigateToAlerts();
await testSubjects.existOrFail('manage-alert-detection-rules');
// logout again
await PageObjects.security.forceLogout();
});
after(async () => {
await endpointTestResources.unloadEndpointData(indexedData);
if (indexedData) {
await endpointTestResources.unloadEndpointData(indexedData);
}
});
// Run the same set of tests against all of the Security Solution roles