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

#14124 Repro: Date is included when binned "by hour of day" [ci skip] (#14167)

* Run each test in isolation

* Add repro for #14124
parent 840a1014
No related branches found
No related tags found
No related merge requests found
......@@ -5,10 +5,15 @@ import {
openReviewsTable,
popover,
} from "__support__/cypress";
import { SAMPLE_DATASET } from "__support__/cypress_sample_dataset";
const { ORDERS, ORDERS_ID } = SAMPLE_DATASET;
describe("scenarios > admin > datamodel > metadata", () => {
before(restore);
beforeEach(signInAsAdmin);
beforeEach(() => {
restore();
signInAsAdmin();
});
it("should correctly show remapped column value", () => {
// go directly to Data Model page for Sample Dataset
......@@ -75,4 +80,34 @@ describe("scenarios > admin > datamodel > metadata", () => {
cy.findAllByText(rating);
});
});
it.skip("should not include date when metric is binned by hour of day (metabase#14124)", () => {
cy.request("PUT", `/api/field/${ORDERS.CREATED_AT}`, {
special_type: null,
});
cy.request("POST", "/api/card", {
name: "14124",
dataset_query: {
database: 1,
query: {
"source-table": ORDERS_ID,
aggregation: [["count"]],
breakout: [
["datetime-field", ["field-id", ORDERS.CREATED_AT], "hour-of-day"],
],
},
type: "query",
},
display: "table",
visualization_settings: {},
}).then(({ body: { id: QUESTION_ID } }) => {
cy.visit(`/question/${QUESTION_ID}`);
cy.findByText("Created At: Hour of day");
cy.log("**Reported failing in v0.37.2**");
cy.findByText(/^3:00 AM$/);
});
});
});
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