mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
[Security Solution][Detection Engine] fixes ES|QL cypress tests (#213553)
## Summary - addresses: - https://github.com/elastic/kibana/issues/184558 - https://github.com/elastic/kibana/issues/184557 - https://github.com/elastic/kibana/issues/184556 bfetch was disabled for Kibana, so I removed spying for this request for ES|QL Cypress tests ✅ [Security Solution Detection Engine - Cypress](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7999): 100/100 tests passed. ✅ [[Serverless] Security Solution Detection Engine - Cypress](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/8000): 100/100 tests passed.
This commit is contained in:
parent
9ea6de27cc
commit
ee8f9676c7
3 changed files with 8 additions and 22 deletions
|
@ -67,8 +67,7 @@ const workaroundForResizeObserver = () =>
|
|||
}
|
||||
});
|
||||
|
||||
// Failing: See https://github.com/elastic/kibana/issues/184558
|
||||
describe.skip(
|
||||
describe(
|
||||
'Detection ES|QL rules, creation',
|
||||
{
|
||||
tags: ['@ess', '@serverless', '@skipInServerlessMKI'],
|
||||
|
|
|
@ -55,10 +55,7 @@ const rule = getEsqlRule();
|
|||
const expectedValidEsqlQuery =
|
||||
'from auditbeat* | stats _count=count(event.category) by event.category';
|
||||
|
||||
// Skipping in MKI due to flake
|
||||
// Failing: See https://github.com/elastic/kibana/issues/184557
|
||||
// Failing: See https://github.com/elastic/kibana/issues/184556
|
||||
describe.skip(
|
||||
describe(
|
||||
'Detection ES|QL rules, edit',
|
||||
{
|
||||
tags: ['@ess', '@serverless', '@skipInServerlessMKI'],
|
||||
|
|
|
@ -978,27 +978,17 @@ export const openSuppressionFieldsTooltipAndCheckLicense = () => {
|
|||
};
|
||||
|
||||
/**
|
||||
* intercepts /internal/bsearch request that contains esqlQuery and adds alias to it
|
||||
* intercepts esql_async request that contains esqlQuery and adds alias to it
|
||||
*/
|
||||
export const interceptEsqlQueryFieldsRequest = (
|
||||
esqlQuery: string,
|
||||
alias: string = 'esqlQueryFields'
|
||||
) => {
|
||||
const isServerless = Cypress.env('IS_SERVERLESS');
|
||||
// bfetch is disabled in serverless, so we need to watch another request
|
||||
if (isServerless) {
|
||||
cy.intercept('POST', '/internal/search/esql_async', (req) => {
|
||||
if (req.body?.params?.query?.includes?.(esqlQuery)) {
|
||||
req.alias = alias;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
cy.intercept('POST', '/internal/search?*', (req) => {
|
||||
if (req.body?.batch?.[0]?.request?.params?.query?.includes?.(esqlQuery)) {
|
||||
req.alias = alias;
|
||||
}
|
||||
});
|
||||
}
|
||||
cy.intercept('POST', '/internal/search/esql_async', (req) => {
|
||||
if (req.body?.params?.query?.includes?.(esqlQuery)) {
|
||||
req.alias = alias;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
export const checkLoadQueryDynamically = () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue