From c761f2e4d93e1361b9c156f4aa479fd1bab7d46e Mon Sep 17 00:00:00 2001 From: Gilles De Mey Date: Tue, 29 Aug 2023 13:12:37 +0200 Subject: [PATCH] Alerting: Fix flakey test in CloneRuleEditor (#73997) --- public/app/features/alerting/unified/CloneRuleEditor.test.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/public/app/features/alerting/unified/CloneRuleEditor.test.tsx b/public/app/features/alerting/unified/CloneRuleEditor.test.tsx index a2fa421db81..65544ad56f6 100644 --- a/public/app/features/alerting/unified/CloneRuleEditor.test.tsx +++ b/public/app/features/alerting/unified/CloneRuleEditor.test.tsx @@ -164,7 +164,9 @@ describe('CloneRuleEditor', function () { }); await waitForElementToBeRemoved(ui.loadingIndicator.query()); - await waitForElementToBeRemoved(within(ui.inputs.group.get()).getByTestId('Spinner')); + await waitFor(() => { + expect(within(ui.inputs.group.get()).queryByTestId('Spinner')).not.toBeInTheDocument(); + }); await waitFor(() => { expect(ui.inputs.name.get()).toHaveValue('First Grafana Rule (copy)');