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)');