test: remove redundant line flex smoke checks
This commit is contained in:
parent
c4880675e1
commit
944a32cf02
@ -6,11 +6,8 @@ import {
|
||||
createActionCard,
|
||||
createCarousel,
|
||||
createNotificationBubble,
|
||||
createReceiptCard,
|
||||
createEventCard,
|
||||
createAgendaCard,
|
||||
createMediaPlayerCard,
|
||||
createAppleTvRemoteCard,
|
||||
createDeviceControlCard,
|
||||
toFlexMessage,
|
||||
} from "./flex-templates.js";
|
||||
@ -150,18 +147,6 @@ describe("createNotificationBubble", () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe("createReceiptCard", () => {
|
||||
it("includes footer when provided", () => {
|
||||
const card = createReceiptCard({
|
||||
title: "Receipt",
|
||||
items: [{ name: "Item", value: "$10" }],
|
||||
footer: "Thank you!",
|
||||
});
|
||||
|
||||
expect(card.footer).toBeDefined();
|
||||
});
|
||||
});
|
||||
|
||||
describe("createMediaPlayerCard", () => {
|
||||
it("includes album art when provided", () => {
|
||||
const card = createMediaPlayerCard({
|
||||
@ -201,21 +186,6 @@ describe("createMediaPlayerCard", () => {
|
||||
});
|
||||
|
||||
describe("createDeviceControlCard", () => {
|
||||
it("creates a device card with controls", () => {
|
||||
const card = createDeviceControlCard({
|
||||
deviceName: "Apple TV",
|
||||
deviceType: "Streaming Box",
|
||||
controls: [
|
||||
{ label: "Play/Pause", data: "action=playpause" },
|
||||
{ label: "Menu", data: "action=menu" },
|
||||
],
|
||||
});
|
||||
|
||||
expect(card.type).toBe("bubble");
|
||||
expect(card.body).toBeDefined();
|
||||
expect(card.footer).toBeDefined();
|
||||
});
|
||||
|
||||
it("includes device image", () => {
|
||||
const card = createDeviceControlCard({
|
||||
deviceName: "Device",
|
||||
@ -242,32 +212,6 @@ describe("createDeviceControlCard", () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe("createAppleTvRemoteCard", () => {
|
||||
it("creates an Apple TV remote card with controls", () => {
|
||||
const card = createAppleTvRemoteCard({
|
||||
deviceName: "Apple TV",
|
||||
status: "Playing",
|
||||
actionData: {
|
||||
up: "action=up",
|
||||
down: "action=down",
|
||||
left: "action=left",
|
||||
right: "action=right",
|
||||
select: "action=select",
|
||||
menu: "action=menu",
|
||||
home: "action=home",
|
||||
play: "action=play",
|
||||
pause: "action=pause",
|
||||
volumeUp: "action=volume_up",
|
||||
volumeDown: "action=volume_down",
|
||||
mute: "action=mute",
|
||||
},
|
||||
});
|
||||
|
||||
expect(card.type).toBe("bubble");
|
||||
expect(card.body).toBeDefined();
|
||||
});
|
||||
});
|
||||
|
||||
describe("createEventCard", () => {
|
||||
it("includes all optional fields together", () => {
|
||||
const card = createEventCard({
|
||||
@ -295,18 +239,6 @@ describe("createEventCard", () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe("createAgendaCard", () => {
|
||||
it("includes footer when provided", () => {
|
||||
const card = createAgendaCard({
|
||||
title: "Today",
|
||||
events: [{ title: "Event" }],
|
||||
footer: "Synced from Google Calendar",
|
||||
});
|
||||
|
||||
expect(card.footer).toBeDefined();
|
||||
});
|
||||
});
|
||||
|
||||
describe("toFlexMessage", () => {
|
||||
it("wraps a container in a FlexMessage", () => {
|
||||
const bubble = createInfoCard("Title", "Body");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user