Files
redash/client/cypress/integration/alert/create_alert_spec.js
Omer Lachish de052ff02b Cypress touch-ups (#5109)
* allow non-sequential IDs for DataSources in Cypress tests

* refactor redash-api to a set of Cypress commands

* support mounting Redash endpoints in Cypress routes

* fix some parameter specs by waiting for schema to load

* extract baseUrl from cypress.json

* Restyled by prettier (#5110)

Co-authored-by: Restyled.io <commits@restyled.io>

Co-authored-by: restyled-io[bot] <32688539+restyled-io[bot]@users.noreply.github.com>
Co-authored-by: Restyled.io <commits@restyled.io>
2020-08-19 21:00:06 +03:00

24 lines
739 B
JavaScript

describe("Create Alert", () => {
beforeEach(() => {
cy.login();
});
it("renders the initial page and takes a screenshot", () => {
cy.visit("/alerts/new");
cy.getByTestId("QuerySelector").should("exist");
cy.percySnapshot("Create Alert initial screen");
});
it("selects query and takes a screenshot", () => {
cy.createQuery({ name: "Create Alert Query" }).then(({ id: queryId }) => {
cy.visit("/alerts/new");
cy.getByTestId("QuerySelector")
.click()
.type("Create Alert Query");
cy.get(`.query-selector-result[data-test="QueryId${queryId}"]`).click();
cy.getByTestId("Criteria").should("exist");
cy.percySnapshot("Create Alert second screen");
});
});
});