mirror of
https://github.com/getredash/redash.git
synced 2026-03-22 01:00:14 -04:00
25 lines
636 B
JavaScript
25 lines
636 B
JavaScript
describe('Create Query', () => {
|
|
beforeEach(() => {
|
|
cy.login();
|
|
cy.visit('/queries/new');
|
|
});
|
|
|
|
it('executes and saves a query', () => {
|
|
cy.getByTestId('SelectDataSource')
|
|
.click()
|
|
.contains('Test PostgreSQL').click();
|
|
|
|
cy.getByTestId('QueryEditor')
|
|
.get('.ace_text-input')
|
|
.type('SELECT id, name FROM organizations{esc}', { force: true });
|
|
|
|
cy.getByTestId('ExecuteButton').click();
|
|
|
|
cy.getByTestId('TableVisualization').should('exist');
|
|
cy.percySnapshot('Edit Query');
|
|
|
|
cy.getByTestId('SaveButton').click();
|
|
cy.url().should('match', /\/queries\/\d+\/source/);
|
|
});
|
|
});
|