From 470cd869f3981f132a61c94c80e3efd82bcd83ec Mon Sep 17 00:00:00 2001 From: Ashley Harrison Date: Mon, 8 Dec 2025 17:06:18 +0000 Subject: [PATCH] "fix" VerifyEmailPage tests --- public/app/core/components/Signup/VerifyEmail.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/public/app/core/components/Signup/VerifyEmail.tsx b/public/app/core/components/Signup/VerifyEmail.tsx index dfea992a8db..9878e3a6ccc 100644 --- a/public/app/core/components/Signup/VerifyEmail.tsx +++ b/public/app/core/components/Signup/VerifyEmail.tsx @@ -1,4 +1,5 @@ import { useState } from 'react'; +import { flushSync } from 'react-dom'; import { useForm } from 'react-hook-form'; import { Trans, t } from '@grafana/i18n'; @@ -25,7 +26,10 @@ export const VerifyEmail = () => { getBackendSrv() .post('/api/user/signup', formModel) .then(() => { - setEmailSent(true); + // TODO why? + flushSync(() => { + setEmailSent(true); + }); }) .catch((err) => { const msg = err.data?.message || err;