Skip to content
Snippets Groups Projects
Unverified Commit 5e2e4a40 authored by Alexander Polyankin's avatar Alexander Polyankin Committed by GitHub
Browse files

Fix visualization settings for raw tables (#22422)

parent d33fa86a
No related branches found
No related tags found
No related merge requests found
......@@ -565,7 +565,8 @@ export const getRawSeries = createSelector(
if (isShowingRawTable) {
display = "table";
settings = { "table.pivot": false };
settings = _.pick(settings, "column_settings");
settings = { "table.pivot": false, ...settings };
}
// we want to provide the visualization with a card containing the latest
......
import { popover, restore, visitQuestionAdhoc } from "__support__/e2e/cypress";
import { SAMPLE_DATABASE } from "__support__/e2e/cypress_sample_database";
const { ORDERS, ORDERS_ID } = SAMPLE_DATABASE;
const questionDetails = {
name: "21973",
display: "line",
dataset_query: {
type: "query",
database: 1,
query: {
"source-table": ORDERS_ID,
aggregation: [["count"]],
breakout: [["field", ORDERS.CREATED_AT, { "temporal-unit": "month" }]],
},
},
visualization_settings: {
"graph.metrics": ["count"],
"graph.dimensions": ["CREATED_AT"],
},
};
describe("issue 22359", () => {
beforeEach(() => {
restore();
cy.signInAsAdmin();
});
it("should use visualization settings when viewing raw table data (metabase#22359)", () => {
visitQuestionAdhoc(questionDetails);
cy.icon("table2").click();
cy.findByText("Settings").click();
cy.findByTestId("sidebar-left").within(() => {
cy.findByText("Data").click();
cy.findByText("X-axis")
.parent()
.within(() => cy.icon("gear").click());
cy.findByText("January, 2018").click();
});
popover().within(() => cy.findByText("1/2018").click());
cy.findByText("4/2016").should("be.visible");
});
});
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