Skip to content
Snippets Groups Projects
Unverified Commit 91a87d81 authored by Ariya Hidayat's avatar Ariya Hidayat Committed by GitHub
Browse files

Support empty card title in the dashboard (#22199)

parent dfcc2a13
No related branches found
No related tags found
No related merge requests found
......@@ -18,7 +18,7 @@ const ChartCaption = ({
actionButtons,
onChangeCardAndRun,
}) => {
const title = settings["card.title"] || series[0].card.name;
const title = settings["card.title"] ?? series[0].card.name;
const description = settings["card.description"];
const data = series._raw || series;
const card = data[0].card;
......
......@@ -3,6 +3,7 @@ import {
restore,
selectDashboardFilter,
expectedRouteCalls,
editDashboard,
showDashboardCardActions,
filterWidget,
sidebar,
......@@ -81,6 +82,24 @@ describe("scenarios > dashboard", () => {
cy.findByText("How many orders were placed in each year?");
});
it("should allow empty card title (metabase#12013)", () => {
visitDashboard(1);
cy.findByTextEnsureVisible("Orders");
cy.findByTestId("legend-caption").should("exist");
editDashboard();
showDashboardCardActions();
cy.icon("palette").click();
cy.findByDisplayValue("Orders")
.click()
.clear();
cy.get("[data-metabase-event='Chart Settings;Done']").click();
cy.findByTestId("legend-caption").should("not.exist");
});
it("should add a filter", () => {
visitDashboard(1);
cy.icon("pencil").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