Skip to content

Commit

Permalink
[Defend Workflows] Rewrite visitRuleActions to make tests more stable (
Browse files Browse the repository at this point in the history
  • Loading branch information
tomsonpl authored May 15, 2023
1 parent c322ac5 commit 49c77f2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,7 @@ describe('Response actions', () => {
cleanupRule(ruleId);
});

// FLAKY: https://github.com/elastic/security-team/issues/6518
it.skip('All response action controls are disabled', () => {
it('All response action controls are disabled', () => {
visitRuleActions(ruleId);
cy.getByTestSubj('response-actions-wrapper').within(() => {
cy.getByTestSubj('Endpoint Security-response-action-type-selection-option').should(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,7 @@ export const fillUpNewRule = (name = 'Test', description = 'Test') => {
export const visitRuleActions = (ruleId: string) => {
cy.visit(`app/security/rules/id/${ruleId}/edit`);
cy.getByTestSubj('edit-rule-actions-tab').should('exist');
// strange rerendering behaviour. the following make sure the test doesn't fail
cy.get('body').then(($body) => {
if ($body.find('[data-test-subj="globalLoadingIndicator"]').length) {
cy.getByTestSubj('globalLoadingIndicator').should('exist');
cy.getByTestSubj('globalLoadingIndicator').should('not.exist');
}
cy.getByTestSubj('globalLoadingIndicator').should('not.exist');
});

cy.getByTestSubj('globalLoadingIndicator').should('not.exist');
cy.getByTestSubj('edit-rule-actions-tab').click();
};
export const tryAddingDisabledResponseAction = (itemNumber = 0) => {
Expand Down

0 comments on commit 49c77f2

Please sign in to comment.