mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
[ResponseOps][Cases] Fix flaky Cases action Cypress test (#213529)
## Summary - Fixes the flaky functional test added in #210547 by adding a network request intercept and clicking on the correct dropdown button - Unskips the test file ## References Closes #211959 ### Checklist - [x] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed
This commit is contained in:
parent
5f9f88a80e
commit
6c281caceb
1 changed files with 9 additions and 10 deletions
|
@ -38,8 +38,7 @@ import { openRuleManagementPageViaBreadcrumbs } from '../../../../tasks/rules_ma
|
|||
import { CREATE_RULE_URL } from '../../../../urls/navigation';
|
||||
|
||||
// TODO: https://github.com/elastic/kibana/issues/161539
|
||||
// Failing: See https://github.com/elastic/kibana/issues/211959
|
||||
describe.skip(
|
||||
describe(
|
||||
'Rule actions during detection rule creation',
|
||||
{ tags: ['@ess', '@serverless', '@skipInServerless'] },
|
||||
() => {
|
||||
|
@ -114,21 +113,21 @@ describe.skip(
|
|||
});
|
||||
|
||||
it('Forwards the correct rule type id to the Cases system action', () => {
|
||||
cy.intercept('GET', '/internal/data_views/fields*').as('getAlertsFields');
|
||||
visit(CREATE_RULE_URL);
|
||||
fillDefineCustomRuleAndContinue(rule);
|
||||
fillAboutRuleAndContinue(rule);
|
||||
fillScheduleRuleAndContinue(rule);
|
||||
createCasesAction();
|
||||
|
||||
cy.get(CASES_CONNECTOR_GROUP_BY_ALERT_FIELD_SELECTOR).click();
|
||||
cy.get(CASES_CONNECTOR_GROUP_BY_ALERT_FIELD_OPTIONS_LIST).should('be.visible');
|
||||
cy.waitUntil(() => {
|
||||
return cy
|
||||
.get(`${CASES_CONNECTOR_GROUP_BY_ALERT_FIELD_OPTIONS_LIST} button[role=option]`)
|
||||
.then(($items) => {
|
||||
return $items.length > 0;
|
||||
});
|
||||
cy.wait('@getAlertsFields', { timeout: 10000 });
|
||||
cy.get(CASES_CONNECTOR_GROUP_BY_ALERT_FIELD_SELECTOR).within(() => {
|
||||
cy.get('[data-test-subj=comboBoxToggleListButton]').click();
|
||||
});
|
||||
cy.get(CASES_CONNECTOR_GROUP_BY_ALERT_FIELD_OPTIONS_LIST).should('be.visible');
|
||||
cy.get(`${CASES_CONNECTOR_GROUP_BY_ALERT_FIELD_OPTIONS_LIST} button[role=option]`).then(
|
||||
($items) => $items.length > 0
|
||||
);
|
||||
});
|
||||
}
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue