Skip to content
Snippets Groups Projects
Unverified Commit b13f672b authored by Cam Saul's avatar Cam Saul Committed by GitHub
Browse files

Remove skipped tests for #13764 (#35571)

parent b547eb7e
No related branches found
No related tags found
No related merge requests found
import {
restore,
popover,
openOrdersTable,
remapDisplayValueToFK,
visitQuestion,
visitQuestionAdhoc,
......@@ -150,33 +149,6 @@ describe("scenarios > question > nested", () => {
cy.findAllByText("13");
});
it.skip("should display granularity for aggregated fields in nested questions (metabase#13764)", () => {
openOrdersTable({ mode: "notebook" });
// add initial aggregation ("Average of Total by Order ID")
summarize({ mode: "notebook" });
// eslint-disable-next-line no-unscoped-text-selectors -- deprecated usage
cy.findByText("Average of ...").click();
// eslint-disable-next-line no-unscoped-text-selectors -- deprecated usage
cy.findByText("Total").click();
// eslint-disable-next-line no-unscoped-text-selectors -- deprecated usage
cy.findByText("Pick a column to group by").click();
// eslint-disable-next-line no-unscoped-text-selectors -- deprecated usage
cy.findByText("ID").click();
// add another aggregation ("Count by Average of Total")
summarize({ mode: "notebook" });
// eslint-disable-next-line no-unscoped-text-selectors -- deprecated usage
cy.findByText("Count of rows").click();
// eslint-disable-next-line no-unscoped-text-selectors -- deprecated usage
cy.findByText("Pick a column to group by").click();
cy.log("Reported failing on v0.34.3 - v0.37.0.2");
popover()
.contains("Average of Total")
.closest(".List-item")
.contains("Auto binned");
});
it("should apply metrics including filter to the nested question (metabase#12507)", () => {
const metric = {
name: "Sum of discounts",
......
......@@ -4,7 +4,6 @@ import * as Lib from "metabase-lib";
import {
columnFinder,
createQuery,
findAggregationOperator,
findBinningStrategy,
findTemporalBucket,
} from "metabase-lib/test-helpers";
......@@ -51,23 +50,6 @@ function createQueryWithTemporalBreakout(bucketName: string) {
};
}
function applyAggregation(
query: Lib.Query,
operatorShortName: string,
stageIndex = 0,
): Lib.Query {
const operator = findAggregationOperator(query, operatorShortName);
const findColumn = columnFinder(
query,
Lib.aggregationOperatorColumns(operator),
);
const column = findColumn("ORDERS", "TOTAL");
const clause = Lib.aggregationClause(operator, column);
return Lib.aggregate(query, stageIndex, clause);
}
function setup(step = createMockNotebookStep()) {
const updateQuery = jest.fn();
......@@ -305,33 +287,5 @@ describe("BreakoutStep", () => {
expect(updateQuery).not.toHaveBeenCalled();
});
it("should support binning for nested numeric fields (metabase#13764)", () => {
const { query: queryWithBreakout, initialQuery } =
createQueryWithBreakout();
const query = applyAggregation(queryWithBreakout, "avg");
setup(
createMockNotebookStep({
topLevelQuery: Lib.appendStage(query),
stageIndex: 1,
itemIndex: null,
type: "summarize",
previous: createMockNotebookStep({
topLevelQuery: initialQuery,
stageIndex: 0,
}),
}),
);
userEvent.click(screen.getByText("Pick a column to group by"));
const option = screen.getByLabelText("Average of Total");
expect(option).toBeInTheDocument();
// TODO [13764]: Enable this test after resolving the issue in MBQLv2
// userEvent.hover(option);
// expect(within(option).getByText("Auto bin")).toBeInTheDocument();
});
});
});
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