Skip to content

Commit

Permalink
[Security Solution][Endpoint] Fix policy_details flaky test (#156963)
Browse files Browse the repository at this point in the history
## Summary

- Increases timeout as element might take a bit to be displayed

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
  • Loading branch information
dasansol92 and kibanamachine committed May 30, 2023
1 parent 66f9ccd commit fd67e1b
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
const testSubjects = getService('testSubjects');
const policyTestResources = getService('policyTestResources');
const endpointTestResources = getService('endpointTestResources');
const retry = getService('retry');

describe('When on the Endpoint Policy Details Page', function () {
let indexedData: IndexedHostsAndAlertsResponse;
Expand All @@ -47,8 +48,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
});
});

// FLAKY: https://github.com/elastic/kibana/issues/154182
describe.skip('with a valid policy id', () => {
describe('with a valid policy id', () => {
let policyInfo: PolicyTestResourceInfo;

before(async () => {
Expand All @@ -63,6 +63,10 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
});

it('should display policy view', async () => {
this.timeout(150_000);
await retry.waitForWithTimeout('policy title is not empty', 120_000, async () => {
return (await testSubjects.getVisibleText('header-page-title')) !== '';
});
expect(await testSubjects.getVisibleText('header-page-title')).to.equal(
policyInfo.packagePolicy.name
);
Expand Down

0 comments on commit fd67e1b

Please sign in to comment.