Skip to content

Commit

Permalink
[Entity Analytics] MKI test failure fixes (elastic#190182)
Browse files Browse the repository at this point in the history
## Summary

closes [elastic#10176](elastic/security-team#10176)

I've been looking into a few of our flaky tests and come up with a
couple of actions, I will comment on them individually.

Co-authored-by: Elastic Machine <[email protected]>
  • Loading branch information
hop-dev and elasticmachine authored Sep 5, 2024
1 parent fabe07d commit 8be089b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
7 changes: 7 additions & 0 deletions packages/kbn-test/src/kbn_client/kbn_client_version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ export class KbnClientVersion {
}

const status = await this.status.get();

if (!status.version) {
throw new Error(
`Unable to get version from Kibana, invalid response from server: ${JSON.stringify(status)}`
);
}

this.versionCache = status.version.number + (status.version.build_snapshot ? '-SNAPSHOT' : '');
return this.versionCache;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ import { REFRESH_BUTTON } from '../screens/security_header';
export const updateDashboardTimeRange = () => {
// eslint-disable-next-line cypress/no-force
cy.get(GET_DATE_PICKER_APPLY_BUTTON(GLOBAL_FILTERS_CONTAINER)).click({ force: true }); // Force to fix global timerange flakiness
cy.get(REFRESH_BUTTON).click();
// eslint-disable-next-line cypress/no-force
cy.get(REFRESH_BUTTON).click({ force: true }); // Force to fix even more global timerange flakiness
cy.get(REFRESH_BUTTON).should('not.have.attr', 'aria-label', 'Needs updating');
};

Expand Down

0 comments on commit 8be089b

Please sign in to comment.