From 3d9989a04af12dbe5bf366f9d6e44867dd758ac7 Mon Sep 17 00:00:00 2001 From: Gilles De Mey Date: Thu, 5 Jun 2025 17:46:31 +0200 Subject: [PATCH] Alerting: Update test timeout (#106377) update test timeout --- .../features/alerting/unified/rule-list/GroupedView.test.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/public/app/features/alerting/unified/rule-list/GroupedView.test.tsx b/public/app/features/alerting/unified/rule-list/GroupedView.test.tsx index 19918e21d7e..680101129a4 100644 --- a/public/app/features/alerting/unified/rule-list/GroupedView.test.tsx +++ b/public/app/features/alerting/unified/rule-list/GroupedView.test.tsx @@ -20,6 +20,9 @@ grantUserPermissions([AccessControlAction.AlertingRuleExternalRead]); setupMswServer(); +// increase timeout for this test file, it's a rather slow one since we're testing with a _lot_ of DOM data +jest.setTimeout(60 * 1000); + const mimirGroups = alertingFactory.prometheus.group.buildList(500, { file: 'test-mimir-namespace' }); alertingFactory.prometheus.group.rewindSequence(); const prometheusGroups = alertingFactory.prometheus.group.buildList(130, { file: 'test-prometheus-namespace' }); @@ -64,7 +67,7 @@ describe('RuleList - GroupedView', () => { const mimirNamespace = await ui.namespace(/test-mimir-namespace/).find(mimirSection); const firstPageGroups = await ui.group(/test-group-([1-9]|[1-3][0-9]|40)/).findAll(mimirNamespace); - expect(firstPageGroups).toHaveLength(40); + expect(firstPageGroups).toHaveLength(DATA_SOURCE_GROUP_PAGE_SIZE); expect(firstPageGroups[0]).toHaveTextContent('test-group-1'); expect(firstPageGroups[24]).toHaveTextContent('test-group-25'); expect(firstPageGroups[39]).toHaveTextContent('test-group-40');