mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[Defend Workflows] Rewrite visitRuleActions to make tests more stable (#157691)
This commit is contained in:
parent
c322ac5048
commit
49c77f22cf
2 changed files with 2 additions and 11 deletions
|
@ -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(
|
||||
|
|
|
@ -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) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue