Compare commits

...

1 Commits

Author SHA1 Message Date
Claude Code
b304f33a9b test(databases): stabilize flaky SQLAlchemy-form visibility assertion
The form mounts inside DatabaseModal's animated tab pane, and
rc-motion's animation state in jsdom is nondeterministic: toBeVisible
intermittently times out (observed on unrelated PRs' jest shards) even
though the form is rendered. Assert on document presence instead, which
is what the tab-switch regression check actually needs.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 12:17:11 -07:00

View File

@@ -1804,8 +1804,14 @@ describe('DatabaseModal', () => {
userEvent.click(screen.getByTestId('sqla-connect-btn'));
expect(await screen.findByTestId('database-name-input')).toBeVisible();
expect(screen.getByTestId('sqlalchemy-uri-input')).toBeVisible();
// assert on presence rather than visibility: the SQLAlchemy form mounts
// inside an animated tab pane, and rc-motion's animation state in jsdom
// is nondeterministic, so toBeVisible flakes while the form is in fact
// rendered (see the animated={{ tabPane: true }} Tabs in DatabaseModal)
expect(
await screen.findByTestId('database-name-input'),
).toBeInTheDocument();
expect(screen.getByTestId('sqlalchemy-uri-input')).toBeInTheDocument();
});
test.each([