Skip to content
TypeScript

test(web): source control writing settings test waits for the reset button (#30372)

Julius Marmingee402c94034f6
diff --git a/apps/web/src/components/settings/SourceControlWritingSettings.browser.test.tsx b/apps/web/src/components/settings/SourceControlWritingSettings.browser.test.tsx
index 5a44beb50ac..617868432b7 100644
--- a/apps/web/src/components/settings/SourceControlWritingSettings.browser.test.tsx
+++ b/apps/web/src/components/settings/SourceControlWritingSettings.browser.test.tsx
@@ -100,6 +100,9 @@ describe("mixed source control instructions", () => {
}));
await userEvent.click(page.getByRole("button", { name: "Advanced" }));
+ // Mid-open, Playwright scrolls the clipped panel to reach the button, then the growing panel
+ // shifts it between press and release and the click misses. Wait until the panel shows it.
+ await expect.element(resetButton("change request templates")).toBeInViewport({ ratio: 1 });
await userEvent.click(resetButton("change request templates"));
expect(state.updateSettings).toHaveBeenCalledTimes(1);