[v11.3.x] Alerting: AlertingQueryRunner should skip descendant nodes of invalid queries (#97829)

Alerting: AlertingQueryRunner should skip descendant nodes of invalid queries (#97528)

(cherry picked from commit 9c396b74f9)
This commit is contained in:
Gilles De Mey
2024-12-12 16:58:07 +01:00
committed by GitHub
parent d0a31e48d9
commit 706392e357
5 changed files with 93 additions and 46 deletions

View File

@@ -1,19 +1,6 @@
import * as e2e from '@grafana/e2e-selectors';
import { expect, test } from '@grafana/plugin-e2e';
test('should evaluate to false if entire request returns 500', async ({ page, alertRuleEditPage, selectors }) => {
await alertRuleEditPage.alertRuleNameField.fill('Test Alert Rule');
// remove the default query
const queryA = alertRuleEditPage.getAlertRuleQueryRow('A');
await alertRuleEditPage
.getByGrafanaSelector(selectors.components.QueryEditorRow.actionButton('Remove query'), {
root: queryA.locator,
})
.click();
await expect(alertRuleEditPage.evaluate()).not.toBeOK();
});
test('should evaluate to false if entire request returns 200 but partial query result is invalid', async ({
page,
alertRuleEditPage,