Skip to content
Snippets Groups Projects
Unverified Commit c8d86f70 authored by Kamil Mielnik's avatar Kamil Mielnik Committed by GitHub
Browse files

Repro #38354 - Not able to switch between databases after a question is created (#38387)

* Add e2e test for metabase#38354

* Rename file to match issue id

* Tag the test as external since it uses QA DBs

* Fix ORDERS_ID
parent 7c1dd93b
Branches 38394-surface-column-info
No related tags found
No related merge requests found
import {
getNotebookStep,
openNotebook,
popover,
restore,
visualize,
} from "e2e/support/helpers";
import { SAMPLE_DATABASE } from "e2e/support/cypress_sample_database";
const { ORDERS_ID } = SAMPLE_DATABASE;
const QUESTION_DETAILS = {
query: {
"source-table": ORDERS_ID,
limit: 5,
},
};
describe("issue 38354", { tags: "@external" }, () => {
beforeEach(() => {
restore();
restore("postgres-12");
cy.signInAsAdmin();
cy.createQuestion(QUESTION_DETAILS, { visitQuestion: true });
});
it("should be possible to change source database (metabase#38354)", () => {
openNotebook();
getNotebookStep("data").findByTestId("data-step-cell").click();
popover().within(() => {
cy.icon("chevronleft").click();
cy.findByText("QA Postgres12").click();
cy.findByText("Orders").click();
});
// optimization: add a limit so that query runs faster
cy.button("Row limit").click();
getNotebookStep("limit").findByPlaceholderText("Enter a limit").type("5");
visualize();
cy.findByTestId("query-builder-main")
.findByText("There was a problem with your question")
.should("not.exist");
cy.get(".cellData").should("contain", "37.65"); // assert visualization renders the data
});
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment