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

Repro #36631 - A "Default period" is appended for Date columns within Custom...

Repro #36631 - A "Default period" is appended for Date columns within Custom Columns when using Question as Source Data (#42876)

* Add a repro for #36631

* Do not wrap id
parent 802b0d91
Branches
Tags
No related merge requests found
......@@ -2,21 +2,23 @@ import { SAMPLE_DB_ID } from "e2e/support/cypress_data";
import { SAMPLE_DATABASE } from "e2e/support/cypress_sample_database";
import {
addCustomColumn,
entityPickerModal,
restore,
popover,
summarize,
visualize,
openOrdersTable,
openPeopleTable,
visitQuestionAdhoc,
cartesianChartCircle,
checkExpressionEditorHelperPopoverPosition,
createQuestion,
enterCustomColumnDetails,
entityPickerModal,
entityPickerModalTab,
filter,
getNotebookStep,
checkExpressionEditorHelperPopoverPosition,
openOrdersTable,
openPeopleTable,
popover,
queryBuilderMain,
cartesianChartCircle,
entityPickerModalTab,
restore,
startNewQuestion,
summarize,
visitQuestionAdhoc,
visualize,
} from "e2e/support/helpers";
const { ORDERS, ORDERS_ID, PRODUCTS, PRODUCTS_ID } = SAMPLE_DATABASE;
......@@ -70,6 +72,24 @@ describe("scenarios > question > custom column", () => {
cy.findByTestId("query-visualization-root").contains("Math");
});
it("should not show default period in date column name (metabase#36631)", () => {
const name = "Base question";
createQuestion({ name, query: { "source-table": ORDERS_ID } });
startNewQuestion();
entityPickerModal().within(() => {
entityPickerModalTab("Saved questions").click();
cy.findByText(name).click();
});
cy.button("Custom column").click();
enterCustomColumnDetails({ formula: "[cre" });
cy.findAllByTestId("expression-suggestions-list-item")
.should("have.length", 1)
.and("contain.text", "Created At")
.and("not.contain.text", "Default period");
});
it("should not show binning for a numeric custom column", () => {
openOrdersTable({ mode: "notebook" });
cy.icon("add_data").click();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment