mirror of
https://github.com/getredash/redash.git
synced 2026-05-11 00:00:57 -04:00
* Update Cypress element selectors * Add seed data function to Cypress * Change Cypress setup to be part of db-seed * Add DatabaseSource selector to Create Data Source spec * Add getElement command to Cypress * Fix eslint issues * Change Cypress getElement to getByTestId * Add Percy and test it with the CI * Change Percy dependency for CI to Cypress' Dockerfile * Change Percy's execution to the docker container - add --no-save to avoid errors on Dockerfile.cypress - pass PERCY_TOKEN from the CI to docker container * Fix missed char on CircleCI config file * Move Percy execution back to host on the CI * Test adding PERCY_TOKEN to frontend-e2e-tests on CI config * Undo add PERCY_TOKEN to config.yml * Add Percy token and .git folder to Cypress * Remove Percy install from config.yml * Ignore .git folder again and use Percy env vars instead * Update PERCY_PULL_REQUEST to be CIRCLE_PR_NUMBER * Update cypress-server.js to handle other cypress commands - cypress-server.js -> cypress.js - new commands added to cypress.js - CircleCI config updated accordingly - added a Homepage screenshot * Remove trailing spaces * Add Create Query spec * Disable Cypress videos * Update run browser to Chrome * Add missing --browser chrome
22 lines
528 B
JavaScript
22 lines
528 B
JavaScript
describe('Create Query', () => {
|
|
beforeEach(() => {
|
|
cy.login();
|
|
cy.visit('/queries/new');
|
|
});
|
|
|
|
it('executes the 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('DynamicTable').should('exist');
|
|
cy.percySnapshot('Edit Query page');
|
|
});
|
|
});
|