Skip to content
Snippets Groups Projects
Unverified Commit 81b9fb6f authored by Alexander Lesnenko's avatar Alexander Lesnenko Committed by GitHub
Browse files

Fix table name gets included in pinned dimension names even for the query root table (#18753)

parent 5fcf4a3a
No related branches found
No related tags found
No related merge requests found
......@@ -598,6 +598,10 @@ export class FieldDimension extends Dimension {
});
}
tableId() {
return this.field()?.table?.id;
}
/**
* Return a copy of this FieldDimension that excludes `options`.
*/
......@@ -1225,10 +1229,6 @@ export class TemplateTagDimension extends FieldDimension {
return dimension ? dimension.field() : super.field();
}
tableId() {
return this.field()?.table?.id;
}
name() {
return this.field().name;
}
......
......@@ -45,6 +45,7 @@ describe("scenarios > question > summarize sidebar", () => {
// Displayed in the pinned list
cy.findByTestId("pinned-dimensions").within(() => {
cy.findByText("Orders → Total").should("not.exist");
getDimensionByName({ name: "Total" }).should(
"have.attr",
"aria-selected",
......@@ -60,6 +61,27 @@ describe("scenarios > question > summarize sidebar", () => {
});
});
it("selected dimensions from another table includes the table name when becomes pinned to the top", () => {
getDimensionByName({ name: "State" }).click();
cy.button("Done").click();
cy.findAllByText("Summarize")
.first()
.click();
cy.findByTestId("pinned-dimensions").within(() => {
getDimensionByName({ name: "People → State" }).should(
"have.attr",
"aria-selected",
"true",
);
});
getRemoveDimensionButton({ name: "People → State" }).click();
cy.findByText("People → State").should("not.exist");
});
it("selecting a binning adds a dimension", () => {
getDimensionByName({ name: "Total" }).click();
......
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