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

hugh pushed a commit to branch hugh/cypress-db-conn-ui
in repository https://gitbox.apache.org/repos/asf/superset.git

commit d162e185fc7617ba4ad70381e779f1ddb4ef2420
Author: hughhhh <[email protected]>
AuthorDate: Thu Jun 24 09:06:26 2021 -0700

    added 1 more test
---
 .../cypress/integration/database/modal.test.ts       | 20 ++++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)

diff --git 
a/superset-frontend/cypress-base/cypress/integration/database/modal.test.ts 
b/superset-frontend/cypress-base/cypress/integration/database/modal.test.ts
index 5aa5988..a7510bd 100644
--- a/superset-frontend/cypress-base/cypress/integration/database/modal.test.ts
+++ b/superset-frontend/cypress-base/cypress/integration/database/modal.test.ts
@@ -21,11 +21,10 @@ import { DATABASE_LIST } from './helper';
 describe('Add database', () => {
   beforeEach(() => {
     cy.login();
+    cy.visit(DATABASE_LIST);
   });
 
   it('should open dynamic form', () => {
-    cy.visit(DATABASE_LIST);
-
     // open modal
     cy.get('[data-test="btn-create-database"]').click();
 
@@ -38,19 +37,28 @@ describe('Add database', () => {
     cy.get('input[name="database"]').should('have.value', '');
     cy.get('input[name="password"]').should('have.value', '');
     cy.get('input[name="database_name"]').should('have.value', '');
-    cy.get('.ant-switch').should('be.visible');
+  });
+
+  it('should open sqlalchemy form', () => {
+    // open modal
+    cy.get('[data-test="btn-create-database"]').click();
 
+    // click postgres dynamic form
+    cy.get('.preferred > :nth-child(1)').click();
+
+    cy.get('[data-test="sqla-connect-btn"]').click();
+
+    // check if the sqlalchemy form is showing up
+    cy.get('[data-test=database-name-input]').should('be.visible');
+    cy.get('[data-test="sqlalchemy-uri-input"]').should('be.visible');
   });
 
-  xit('should open sqlalchemy form', () => {});
   xit('show error alerts on dynamic form', () => {});
   xit('show error alerts on sqlalchemy form', () => {});
   xit('should succesfully connect to db w/ dynamic form', () => {});
   xit('should succesfully connect to db w/ sqlalchemy form', () => {});
 
   xit('should keep create modal open when error', () => {
-    cy.visit(DATABASE_LIST);
-
     // open modal
     cy.get('[data-test="btn-create-database"]').click();
 

Reply via email to