Skip to content

Commit

Permalink
[Cypress][Flake] Fix manage_exceptions flake (elastic#171699)
Browse files Browse the repository at this point in the history
## Summary

Addresses elastic#171242,
elastic#171235

Seems it was related to not deleting rules on cleanup.

Co-authored-by: Kibana Machine <[email protected]>
  • Loading branch information
yctercero and kibanamachine authored Nov 29, 2023
1 parent 30f3c8e commit 7093176
Showing 1 changed file with 8 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,30 +40,28 @@ import {
findSharedExceptionListItemsByName,
} from '../../../tasks/exceptions_table';
import { visitRuleDetailsPage } from '../../../tasks/rule_details';
import { deleteEndpointExceptionList, deleteExceptionLists } from '../../../tasks/api_calls/common';
import {
deleteAlertsAndRules,
deleteEndpointExceptionList,
deleteExceptionLists,
} from '../../../tasks/api_calls/common';

// https://github.com/elastic/kibana/issues/171235
// FLAKY: https://github.com/elastic/kibana/issues/171242
describe.skip('Add, edit and delete exception', { tags: ['@ess', '@serverless'] }, () => {
describe('Manage exceptions', { tags: ['@ess', '@serverless'] }, () => {
beforeEach(() => {
login();
deleteAlertsAndRules();
deleteExceptionLists();
deleteEndpointExceptionList();
cy.task('esArchiverLoad', { archiveName: 'exceptions' });
createRule(getNewRule()).as('createdRule');
visit(EXCEPTIONS_URL);
});

afterEach(() => {
cy.task('esArchiverUnload', 'exceptions');
});

const exceptionName = 'My item name';
const exceptionNameEdited = 'My item name edited';
const FIELD_DIFFERENT_FROM_EXISTING_ITEM_FIELD = 'agent.name';
const EXCEPTION_LIST_NAME = 'Newly created list';

describe('Add, Edit and delete Exception item', () => {
describe('Add, edit and delete exception item', () => {
it('should create exception item from Shared Exception List page and linked to a Rule', () => {
// Click on "Create shared exception list" button on the header
// Click on "Create exception item"
Expand Down

0 comments on commit 7093176

Please sign in to comment.