Skip to content
Snippets Groups Projects
Unverified Commit 4f1fa495 authored by Nemanja Glumac's avatar Nemanja Glumac Committed by GitHub
Browse files

Repro #28193: Cannot use custom column with models [ci skip] (#28330)

[ci skip]
parent 35ac31b5
No related branches found
No related tags found
No related merge requests found
import { restore, enterCustomColumnDetails } from "__support__/e2e/helpers";
const ccName = "CTax";
describe.skip("issue 28193", () => {
beforeEach(() => {
cy.intercept("POST", "/api/dataset").as("dataset");
restore();
cy.signInAsAdmin();
// Turn the question into a model
cy.request("PUT", "/api/card/1", { dataset: true });
});
it("should be able to use custom column in a model query (metabase#28193)", () => {
// Go directly to model's query definition
cy.visit("/model/1/query");
cy.findByText("Custom column").click();
enterCustomColumnDetails({
formula: "[Tax]",
name: ccName,
});
cy.button("Done").click();
cy.get(".RunButton").click();
cy.wait("@dataset");
cy.button("Save changes").click();
cy.location("pathname").should("not.include", "/query");
assertOnColumns();
cy.reload();
cy.wait("@dataset");
assertOnColumns();
});
});
function assertOnColumns() {
cy.findAllByText("2.07").should("be.visible").and("have.length", 2);
cy.findAllByTestId("header-cell")
.should("be.visible")
.last()
.should("have.text", ccName);
}
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