test: wait for auto-sync toggle state after confirmation dialog

This commit is contained in:
Jason
2026-03-09 21:11:31 +08:00
parent 333b82b4c4
commit 625dea9c62

View File

@@ -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(() => {