Skip to content

Commit

Permalink
Fixes cypress flake across two tests (#105645) (#105682)
Browse files Browse the repository at this point in the history
## Summary

* Fixes flake where it looks like pre-built rules can take longer than 1 minute to load, so I increased that to 5 minutes
* There are problems with how the `cy.intercept` is not always working on CI we don't understand yet, so I am removing the failing call but keeping the rest of the test for the failure.

Backporting these two into `7.14` to add stability to `7.14` tests as well.

### Checklist

- [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios

Co-authored-by: Frank Hassanabad <[email protected]>
  • Loading branch information
kibanamachine and FrankHassanabad authored Jul 15, 2021
1 parent 474f414 commit 8d056b0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,26 +20,6 @@ import { populateTimeline } from '../../tasks/timeline';

import { HOSTS_URL } from '../../urls/navigation';

const RowRenderersId = [
'alerts',
'auditd',
'auditd_file',
'library',
'netflow',
'plain',
'registry',
'suricata',
'system',
'system_dns',
'system_endgame_process',
'system_file',
'system_fim',
'system_security_event',
'system_socket',
'threat_match',
'zeek',
];

describe('Row renderers', () => {
beforeEach(() => {
cleanKibana();
Expand Down Expand Up @@ -100,9 +80,5 @@ describe('Row renderers', () => {
.should('not.be.checked');

cy.wait('@updateTimeline').its('response.statusCode').should('eq', 200);

cy.wait('@updateTimeline').then((interception) => {
expect(interception.request.body.timeline.excludedRowRendererIds).to.eql(RowRenderersId);
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,8 @@ export const sortByActivatedRules = () => {

export const waitForRulesTableToBeLoaded = () => {
cy.get(RULES_TABLE_INITIAL_LOADING_INDICATOR).should('exist');
cy.get(RULES_TABLE_INITIAL_LOADING_INDICATOR).should('not.exist');
// Wait up to 5 minutes for the rules to load as in CI containers this can be very slow
cy.get(RULES_TABLE_INITIAL_LOADING_INDICATOR, { timeout: 300000 }).should('not.exist');
};

export const waitForRulesTableToBeRefreshed = () => {
Expand Down

0 comments on commit 8d056b0

Please sign in to comment.