Skip to content

Commit 65e896f

Browse files
committed
fix(tests): use numeric id fixtures in flow-config schema tests
1 parent 1c60410 commit 65e896f

8 files changed

Lines changed: 16 additions & 16 deletions

packages/flow-config/__tests__/appointment-scheduling-schema.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ import { describe, expect, test } from "vitest"
22
import { appointmentSchedulingStepSchema, metadataSchema } from "../src"
33

44
const baseStep = {
5-
id: "step-1",
5+
id: "1",
66
stepType: "appointmentScheduling",
77
mode: "checkAvailability",
8-
calendarId: "calendar-1",
8+
calendarId: "1",
99
outputCustomFieldId: "output-field",
1010
states: [
1111
{ id: "1", stateType: "success" },
@@ -46,10 +46,10 @@ describe("appointment scheduling schemas", () => {
4646

4747
test("bookFromCustomField requires dateTimeFieldId", () => {
4848
const step = {
49-
id: "step-1",
49+
id: "1",
5050
stepType: "appointmentScheduling",
5151
mode: "bookFromCustomField",
52-
calendarId: "calendar-1",
52+
calendarId: "1",
5353
states: [
5454
{ id: "1", stateType: "success" },
5555
{ id: "2", stateType: "error" },

packages/flow-config/__tests__/import-export.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@ const buildFixtureFlow = (): FlowExportedFlow => {
4646
detailProps: {
4747
steps: [
4848
{
49-
id: "cond-1",
49+
id: "20",
5050
stepType: stepTypes.enum.condition,
51-
otherwiseId: "otherwise-1",
51+
otherwiseId: "21",
5252
cases: [
5353
{
54-
id: "case-1",
54+
id: "22",
5555
operator: "and",
5656
conditions: [{ field: "name", operator: "equals", value: "Ada" }],
5757
},

packages/flow-config/__tests__/messenger-template.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ describe("extractMessengerFlowButtons", () => {
441441

442442
describe("sendMessengerTemplateMessageStepSchema", () => {
443443
const base = {
444-
id: "step-1",
444+
id: "1",
445445
stepType: "sendMessengerTemplateMessage" as const,
446446
nodeId: "node-1",
447447
template: {
@@ -479,7 +479,7 @@ describe("sendMessengerTemplateMessageStepSchema", () => {
479479
...base,
480480
buttons: [
481481
{
482-
id: "b1",
482+
id: "1",
483483
label: "Accept",
484484
steps: [],
485485
beforeStep: null,
@@ -488,7 +488,7 @@ describe("sendMessengerTemplateMessageStepSchema", () => {
488488
],
489489
})
490490
expect(result.buttons).toHaveLength(1)
491-
expect(result.buttons[0]).toMatchObject({ id: "b1", label: "Accept" })
491+
expect(result.buttons[0]).toMatchObject({ id: "1", label: "Accept" })
492492
})
493493

494494
test("empty template.id (whitespace) → parse fails", () => {

packages/flow-config/__tests__/openai-compatible-ai-steps.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ describe("OpenAI-compatible AI flow steps", () => {
122122
provider: "openaiCompatible",
123123
integrationId: "integration-1",
124124
model: "agent-model",
125-
aiAgentId: "agent-1",
125+
aiAgentId: "1",
126126
message: "Reply from this message",
127127
outputFieldId: "output-field",
128128
})
@@ -133,7 +133,7 @@ describe("OpenAI-compatible AI flow steps", () => {
133133
test("rejects OpenAI-compatible generate text agent without integration or model", () => {
134134
const step = aiGenerateTextAgentDefaultFn({
135135
provider: "openaiCompatible",
136-
aiAgentId: "agent-1",
136+
aiAgentId: "1",
137137
message: "Reply from this message",
138138
outputFieldId: "output-field",
139139
})

packages/flow-config/__tests__/send-multiple-images.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
} from "../src/steps/send-multiple-images"
77

88
const baseStep = {
9-
id: "step-1",
9+
id: "1",
1010
stepType: "sendMultipleImages" as const,
1111
}
1212

packages/flow-config/__tests__/tiktok-text-rules.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ describe("isTiktokCardTitleTruncated", () => {
6464

6565
describe("sendTextValidator", () => {
6666
const step = {
67-
id: "step-1",
67+
id: "1",
6868
stepType: "sendText" as const,
6969
text: "x".repeat(TIKTOK_CARD_TITLE_MAX + 1),
7070
buttons: [button()],

packages/flow-config/__tests__/wa-template-mpm-rules.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const refinedStepSchema =
1212
sendWaTemplateMessageValidator[channelTypes.enum.omnichannel]
1313

1414
const baseStep = {
15-
id: "step-1",
15+
id: "1",
1616
nodeId: "node-1",
1717
stepType: stepTypes.enum.sendWaTemplateMessage,
1818
template: {

packages/flow-config/__tests__/wa-template-quick-reply-buttons.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ describe("seedWaTemplateStepButtons", () => {
161161

162162
describe("sendWaTemplateMessageStepSchema — legacy data and configured buttons", () => {
163163
const baseStep = {
164-
id: "step-1",
164+
id: "1",
165165
nodeId: "node-1",
166166
stepType: stepTypes.enum.sendWaTemplateMessage,
167167
template: {

0 commit comments

Comments
 (0)