Files
redash/client/cypress/integration/data-source/create_data_source_spec.js
Gabriel Dutra 29582e3212 Run prettier on cypress folder (#4510)
* Run prettier on cypress folder

* Test Restyled

* Revert "Test Restyled"

This reverts commit 13d43968fe.
2019-12-30 19:40:56 +02:00

29 lines
907 B
JavaScript

describe("Create Data Source", () => {
beforeEach(() => {
cy.login();
cy.visit("/data_sources/new");
});
it("renders the page and takes a screenshot", () => {
cy.getByTestId("CreateSourceDialog").should("contain", "PostgreSQL");
cy.wait(1000); // eslint-disable-line cypress/no-unnecessary-waiting
cy.percySnapshot("Create Data Source - Types");
});
it("creates a new PostgreSQL data source", () => {
cy.getByTestId("SearchSource").type("PostgreSQL");
cy.getByTestId("CreateSourceDialog")
.contains("PostgreSQL")
.click();
cy.getByTestId("Name").type("Redash");
cy.getByTestId("Host").type("postgres");
cy.getByTestId("User").type("postgres");
cy.getByTestId("Password").type("postgres");
cy.getByTestId("Database Name").type("postgres{enter}");
cy.getByTestId("CreateSourceButton").click();
cy.contains("Saved.");
});
});