Skip to content

Commit

Permalink
remove unused test
Browse files Browse the repository at this point in the history
  • Loading branch information
hughhhh committed Jun 29, 2021
1 parent 22d370d commit 02aa26f
Showing 1 changed file with 0 additions and 75 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,79 +67,4 @@ describe('Add database', () => {
cy.get('input[name="database"]').focus();
cy.get('.ant-form-item-explain-error').contains('The port is closed');
});

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 show preferred dbs', () => {});
xit('should show available dbs in dropdown', () => {});

// big query
xit('should be able to show custom big query', () => {});
xit('should be able to show big query file upload', () => {});
xit('should be able to show big query service account copy/paste', () => {});

xit('should keep create modal open when error', () => {
// open modal
cy.get('[data-test="btn-create-database"]').click();

// values should be blank
cy.get('[data-test="database-modal"] input[name="database_name"]').should(
'have.value',
'',
);
cy.get('[data-test="database-modal"] input[name="sqlalchemy_uri"]').should(
'have.value',
'',
);

// type values
cy.get('[data-test="database-modal"] input[name="database_name"]')
.focus()
.type('cypress');
cy.get('[data-test="database-modal"] input[name="sqlalchemy_uri"]')
.focus()
.type('bad_db_uri');

// click save
cy.get('[data-test="modal-confirm-button"]:not(:disabled)').click();

// should show error alerts and keep modal open
cy.get('.toast').contains('error');
cy.wait(1000); // wait for potential (incorrect) closing annimation
cy.get('[data-test="database-modal"]').should('be.visible');

// should be able to close modal
cy.get('[data-test="modal-cancel-button"]').click();
cy.get('[data-test="database-modal"]').should('not.be.visible');
});

xit('should keep update modal open when error', () => {
// open modal
cy.get('[data-test="database-edit"]:last').click();

// it should show saved values
cy.get('[data-test="database-modal"]:last input[name="sqlalchemy_uri"]')
.invoke('val')
.should('not.be.empty');
cy.get('[data-test="database-modal"] input[name="database_name"]')
.invoke('val')
.should('not.be.empty');

cy.get('[data-test="database-modal"]:last input[name="sqlalchemy_uri"]')
.focus()
.dblclick()
.type('{selectall}{backspace}bad_uri');

// click save
cy.get('[data-test="modal-confirm-button"]:not(:disabled)').click();

// should show error alerts
// TODO(hugh): Update this test
// cy.get('.toast').contains('error').should('be.visible');

// modal should still be open
// cy.wait(1000); // wait for potential (incorrect) closing annimation
// cy.get('[data-test="database-modal"]').should('be.visible');
});
});

0 comments on commit 02aa26f

Please sign in to comment.