The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:
TypeScript analyticsbibusiness-intelligencebusinessintelligenceclojuredashboarddatadata-analysisdata-visualizationdatabasemetabasemysqlpostgrespostgresqlreportingslacksql-editorvisualization
import { screen, within } from "@testing-library/react";
import { checkNotNull } from "metabase/utils/types";
const getCardByLabel = (label: string, text: string) =>
checkNotNull(
screen
.getAllByLabelText(label)
.find((card) => within(card).queryByText(text) != null),
);
export const getTimelineEventCheckbox = (eventName: string) =>
within(getCardByLabel("Timeline event card", eventName)).getByRole(
"checkbox",
);
export const getTimelineCheckbox = (timelineName: string) =>
within(getCardByLabel("Timeline card header", timelineName)).getByRole(
"checkbox",
);