-
Nemanja Glumac authored
* Make it easy to add SQLite database * Replace H2 with SQLite in E2E tests * Remove long unused E2E reproduction It's been sufficiently covered with backend tests. * Remove H2 database helper from E2E tests
Nemanja Glumac authored* Make it easy to add SQLite database * Replace H2 with SQLite in E2E tests * Remove long unused E2E reproduction It's been sufficiently covered with backend tests. * Remove H2 database helper from E2E tests
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
18148-save-button-before-it-is-possible-to-save.cy.spec.js 1003 B
import { restore, openNativeEditor } from "e2e/support/helpers";
const dbName = "sqlite";
describe("issue 18148", () => {
beforeEach(() => {
restore();
cy.signInAsAdmin();
cy.addSQLiteDatabase({
name: dbName,
});
openNativeEditor();
});
it("should not offer to save the question before it is actually possible to save it (metabase#18148)", () => {
// eslint-disable-next-line no-unscoped-text-selectors -- deprecated usage
cy.findByText("Select a database");
// eslint-disable-next-line no-unscoped-text-selectors -- deprecated usage
cy.findByText("Save").should("have.attr", "aria-disabled", "true");
// eslint-disable-next-line no-unscoped-text-selectors -- deprecated usage
cy.findByText(dbName).click();
cy.get(".ace_content").should("be.visible").type("select foo");
// eslint-disable-next-line no-unscoped-text-selectors -- deprecated usage
cy.findByText("Save").click();
cy.get(".Modal").should("exist");
});
});