test(channels): wait for cancellation controls to settle

This commit is contained in:
Xubin Ren committed 2026-10-12 17:38:43 +08:00
1 parent b89ef23df5
commit e148296d5c
1 file changed
+1 -1
@@ -488,7 +488,7 @@ describe("Linear channel UI", () => {
expect(screen.getByRole("button", { name: "Cancel" })).toBeEnabled();
fireEvent.click(screen.getByRole("button", { name: "Cancel" }));
expect(await screen.findByText("Authorization stopped.")).toBeVisible();
expect(screen.getByRole("textbox", { name: "OAuth client ID" })).toBeEnabled();
await waitFor(() => expect(screen.getByRole("textbox", { name: "OAuth client ID" })).toBeEnabled());
expect(requestMutationMock).toHaveBeenCalledWith(
"settings.channel.connect.cancel", { channel: "linear", session_id: "linear-oauth" }, 20_000,
);