Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Security Solution] Unskip remaining Cypress tests from RAC rules migration #122661

Merged
merged 9 commits into from
Jan 13, 2022
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ describe('indicator match', () => {
cy.get(ALERT_RISK_SCORE).first().should('have.text', getNewThreatIndicatorRule().riskScore);
});

it.skip('Investigate alert in timeline', () => {
it('Investigate alert in timeline', () => {
const accessibilityText = `Press enter for options, or press space to begin dragging.`;

loadPrepackagedTimelineTemplates();
Expand Down Expand Up @@ -540,7 +540,8 @@ describe('indicator match', () => {
getNewThreatIndicatorRule().indicatorMappingField
}${accessibilityText}matched${getNewThreatIndicatorRule().indicatorMappingField}${
getNewThreatIndicatorRule().atomic
}${accessibilityText}threat.enrichments.matched.typeindicator_match_rule${accessibilityText}`
}${accessibilityText}threat.enrichments.matched.typeindicator_match_rule${accessibilityText}provided` +
` byfeed.nameAbuseCH malware${accessibilityText}`
);
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,12 @@ describe('Fields Browser', () => {
});
});

it.skip('displays a count of only the fields in the selected category that match the filter input', () => {
it('displays a count of only the fields in the selected category that match the filter input', () => {
const filterInput = 'host.geo.c';

filterFieldsBrowser(filterInput);

cy.get(FIELDS_BROWSER_SELECTED_CATEGORY_COUNT).should('have.text', '5');
cy.get(FIELDS_BROWSER_SELECTED_CATEGORY_COUNT).should('have.text', '4');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@madirey this change is not correct, we are still having 5 fields, this test was catching a legitimate bug.

The problem here is that when we are opening the timeline the new alert's index is not selected by default when it should, that index is the one that contains the missing field.

We should fix the issue and change the number of the test to 5 again, I'll open a ticket with the bug and assign to the alerts team since I'm assuming that as the issue was introduced when the rule registry changes were merged is the alerts team the one that should take care of it. Please note that this change impacts one of new explore team functionalities.

ping @spong @rylnd @stephmilovic

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MadameSheema I only see 4 fields in the ECS field mapping. Is there an additional non-ECS one?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://www.elastic.co/guide/en/ecs/current/ecs-geo.html

As you can see, the test is looking at geo fields that start with c. there are 5

You are only looking at ecs mapping for Data View before it has alerts mappings because alerts index has not been initialized yet. Alerts index has extra field, if i recall correctly geo.continent_code

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stephmilovic @MadameSheema The new alerts mapping doesn't contain the geo.continent_code field so I believe it will only show up on upgrades (since the field exists in the legacy .siem-signals index, which is aliased). New installs will have only 4 fields. Our team will be updating the ECS mappings soon, which should result in that field being added. We should be able to update the test at that point.

});
});

Expand Down