mirror of
https://github.com/getredash/redash.git
synced 2025-12-21 18:35:48 -05:00
* 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>
24 lines
739 B
JavaScript
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");
|
|
});
|
|
});
|
|
});
|