Skip to content

Commit 4781dbc

Browse files
committed
fix: tests
1 parent 239efe1 commit 4781dbc

File tree

3 files changed

+21
-2
lines changed

3 files changed

+21
-2
lines changed

packages/backend/src/graphql/__tests__/mutations/create-step.itest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ describe('createStep mutation integration tests', async () => {
5757
testConnection = await testUser
5858
.$relatedQuery('connections')
5959
.insertAndFetch({
60-
key: 'test-connection',
60+
key: 'postman',
6161
formattedData: { test: 'data' },
6262
verified: true,
6363
draft: false,

packages/backend/src/graphql/__tests__/mutations/execute-step.itest.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ const getMockResolvedValue = (userId: string) => {
2020
key: 'sendTransactionalEmail',
2121
appKey: 'postman',
2222
status: 'completed',
23+
flowId: mockFlowId,
24+
parameters: {},
2325
flow: {
2426
id: mockFlowId,
2527
userId,
@@ -30,6 +32,14 @@ const getMockResolvedValue = (userId: string) => {
3032
},
3133
$query: vi.fn().mockReturnValue({
3234
patch: vi.fn().mockResolvedValue({}),
35+
patchAndFetch: vi.fn().mockResolvedValue({
36+
id: mockStepId,
37+
key: 'sendTransactionalEmail',
38+
appKey: 'postman',
39+
status: 'completed',
40+
flowId: mockFlowId,
41+
parameters: {},
42+
}),
3343
}),
3444
}
3545
}
@@ -231,6 +241,7 @@ describe('executeStep mutation - access control', () => {
231241
key: 'sendTransactionalEmail',
232242
appKey: 'postman',
233243
status: 'completed',
244+
flowId: mockFlowId,
234245
flow: {
235246
id: mockFlowId,
236247
userId: 'owner-user-id',
@@ -241,6 +252,14 @@ describe('executeStep mutation - access control', () => {
241252
},
242253
$query: vi.fn().mockReturnValue({
243254
patch: vi.fn().mockResolvedValue({}),
255+
patchAndFetch: vi.fn().mockResolvedValue({
256+
id: mockStepId,
257+
key: 'sendTransactionalEmail',
258+
appKey: 'postman',
259+
status: 'completed',
260+
flowId: mockFlowId,
261+
parameters: {},
262+
}),
244263
}),
245264
}),
246265
}),

packages/backend/src/graphql/__tests__/mutations/update-step.itest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -624,8 +624,8 @@ describe('updateStep mutation', () => {
624624

625625
const input = {
626626
...genericInputParams,
627-
appKey: 'slack',
628627
key: 'sendMessageToChannel',
628+
appKey: 'slack',
629629
parameters: { channel: 'C1234567890' },
630630
connection: { id: mockConnectionId },
631631
}

0 commit comments

Comments
 (0)