From 625dea9c621252a7c6dd1b9a08455e07273284a9 Mon Sep 17 00:00:00 2001 From: Jason Date: Mon, 9 Mar 2026 21:11:31 +0800 Subject: [PATCH] test: wait for auto-sync toggle state after confirmation dialog --- tests/components/WebdavSyncSection.test.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/components/WebdavSyncSection.test.tsx b/tests/components/WebdavSyncSection.test.tsx index 1cde9192f..72e647bab 100644 --- a/tests/components/WebdavSyncSection.test.tsx +++ b/tests/components/WebdavSyncSection.test.tsx @@ -231,6 +231,11 @@ describe("WebdavSyncSection", () => { fireEvent.click( screen.getByRole("button", { name: "confirm.autoSync.confirm" }), ); + await waitFor(() => { + expect( + screen.getByRole("switch", { name: "settings.webdavSync.autoSync" }), + ).toHaveAttribute("aria-checked", "true"); + }); fireEvent.click(screen.getByRole("button", { name: "settings.webdavSync.save" })); await waitFor(() => {