Skip to content

The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:

459 B
Raw Blame
import type {
  CreateSubscriptionRequest,
  DashboardSubscription,
} from "metabase-types/api";

export const createPulse = ({
  name = "Pulse",
  cards = [],
  channels = [],
  dashboard_id,
}: Partial<CreateSubscriptionRequest>): Cypress.Chainable<
  Cypress.Response<DashboardSubscription>
> => {
  cy.log("Create a pulse");

  return cy.request<DashboardSubscription>("POST", "/api/pulse", {
    name,
    cards,
    channels,
    dashboard_id,
  });
};