You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ru...@apache.org on 2026/07/07 01:28:55 UTC

(superset) branch fix-database-modal-flaky-test updated: test(databases): assert form inputs are enabled after SQLAlchemy switch

This is an automated email from the ASF dual-hosted git repository.

rusackas pushed a commit to branch fix-database-modal-flaky-test
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/fix-database-modal-flaky-test by this push:
     new 985ebb796e3 test(databases): assert form inputs are enabled after SQLAlchemy switch
985ebb796e3 is described below

commit 985ebb796e377df48564231aec2563494153e1e0
Author: Evan <ev...@preset.io>
AuthorDate: Mon Jul 6 18:26:41 2026 -0700

    test(databases): assert form inputs are enabled after SQLAlchemy switch
    
    Strengthens the presence check to also confirm the form fields are
    usable, per bito-code-review feedback.
    
    Co-Authored-By: Claude Opus 4.8 <no...@anthropic.com>
---
 .../src/features/databases/DatabaseModal/index.test.tsx       | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/superset-frontend/src/features/databases/DatabaseModal/index.test.tsx b/superset-frontend/src/features/databases/DatabaseModal/index.test.tsx
index 76dfda19e8e..afe1daae599 100644
--- a/superset-frontend/src/features/databases/DatabaseModal/index.test.tsx
+++ b/superset-frontend/src/features/databases/DatabaseModal/index.test.tsx
@@ -1808,10 +1808,13 @@ describe('DatabaseModal', () => {
     // 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();
+    const nameInput = await screen.findByTestId('database-name-input');
+    const uriInput = screen.getByTestId('sqlalchemy-uri-input');
+    expect(nameInput).toBeInTheDocument();
+    expect(uriInput).toBeInTheDocument();
+    // also confirm the form is actually usable, not just present
+    expect(nameInput).toBeEnabled();
+    expect(uriInput).toBeEnabled();
   });
 
   test.each([