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

Repro #20229: Custom columns not appearing in result set when selecting subset of fields (#20242)

parent e5ac259d
Branches
Tags
No related merge requests found
import { restore, popover, visualize } from "__support__/e2e/cypress";
import { SAMPLE_DATABASE } from "__support__/e2e/cypress_sample_database";
const { ORDERS, ORDERS_ID } = SAMPLE_DATABASE;
const questionDetails = {
name: "20229",
type: "query",
query: {
"source-table": ORDERS_ID,
expressions: {
Adjective: [
"case",
[[[">", ["field", ORDERS.TOTAL, null], 100], "expensive"]],
{ default: "cheap" },
],
},
limit: 10,
},
};
describe.skip("issue 20229", () => {
beforeEach(() => {
restore();
cy.signInAsAdmin();
cy.createQuestion(questionDetails, { visitQuestion: true });
});
it("should display custom column regardless of how many columns are selected (metabase#20229)", () => {
ccAssertion();
// Switch to the notebook view to deselect at least one column
cy.icon("notebook").click();
cy.findAllByTestId("fields-picker").click();
popover().within(() => {
unselectColumn("Tax");
});
visualize();
ccAssertion();
});
});
function ccAssertion() {
cy.findByText("Adjective");
cy.contains("expensive");
cy.contains("cheap");
}
function unselectColumn(column) {
cy.findByText(column)
.siblings()
.find(".Icon-check")
.click({ force: true });
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment