From 649853d279966378f17522edf5ccfb6c01a80eb8 Mon Sep 17 00:00:00 2001 From: Kevin Logan <56395104+kevinlog@users.noreply.github.com> Date: Mon, 3 Jan 2022 16:30:04 -0500 Subject: [PATCH] [Security Solution] Fix and unskip Policy details tests (#122099) --- .../apps/endpoint/policy_details.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/x-pack/test/security_solution_endpoint/apps/endpoint/policy_details.ts b/x-pack/test/security_solution_endpoint/apps/endpoint/policy_details.ts index 7562f69f673c9b..ff881cddce48c2 100644 --- a/x-pack/test/security_solution_endpoint/apps/endpoint/policy_details.ts +++ b/x-pack/test/security_solution_endpoint/apps/endpoint/policy_details.ts @@ -337,8 +337,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); }); - // FLAKY: https://github.com/elastic/kibana/issues/92567 - describe.skip('and the save button is clicked', () => { + describe('and the save button is clicked', () => { let policyInfo: PolicyTestResourceInfo; beforeEach(async () => { @@ -367,7 +366,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { await pageObjects.policy.confirmAndSave(); await testSubjects.existOrFail('policyDetailsSuccessMessage'); - await pageObjects.common.closeToast(); + await testSubjects.waitForHidden('toastCloseButton'); await pageObjects.endpoint.navigateToEndpointList(); await pageObjects.policy.navigateToPolicyDetails(policyInfo.packagePolicy.id); @@ -395,6 +394,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { await pageObjects.policy.confirmAndSave(); await testSubjects.existOrFail('policyDetailsSuccessMessage'); + await testSubjects.waitForHidden('toastCloseButton'); const agentFullPolicy = await policyTestResources.getFullAgentPolicy( policyInfo.agentPolicy.id @@ -442,6 +442,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { await pageObjects.policy.confirmAndSave(); await testSubjects.existOrFail('policyDetailsSuccessMessage'); + await testSubjects.waitForHidden('toastCloseButton'); const agentFullPolicy = await policyTestResources.getFullAgentPolicy( policyInfo.agentPolicy.id @@ -476,7 +477,6 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { await advancedPolicyField.clearValueWithKeyboard(); // Make sure the toast button closes so the save button on the sticky footer is visible - await (await testSubjects.find('toastCloseButton')).click(); await testSubjects.waitForHidden('toastCloseButton'); await pageObjects.policy.confirmAndSave(); @@ -490,7 +490,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { getExpectedAgentPolicyEndpointInput({ id: policyInfo.packagePolicy.id, name: policyInfo.packagePolicy.name, - revision: 3, + revision: agentFullPolicyUpdated.inputs[0].revision, meta: { package: { version: policyInfo.packageInfo.version,